It slots into the main intake pipe coming off the air box. Item 7 in the diagram below.
I can't stress enough though that you need to view the MAF data to check its operation.
The ideal diagnostics long term is Dice and Vida.
Vida also gives a comprehensive parts catalogue, fault tracing and a repair manual to save you having to rely on dealers who enthusiastically hide information.
Even cheap diagnostics will show you what's happening with the MAF before you go shelling out for a replacement.