Will Google Analytics count visits/page views etc if I place a hidden iFrame in my web page ?
- The iFrame source has a Google Analytics tracking code installed.
- My users browse the site from a mobile device such as Android/iPhone.
My purpose is that the 3rd party site will count my page views as their own (As if the user actually visited their web page)
Making the iFrame hidden is possible in several ways:
- Making its style hidden.
- Setting its size to a small size were the user won’t notice it much.
Considering your intentions, Google Analytics will divide the data collections from both sites, even beign inside the iFrame.
Only 2 things to watch out for:
– The UAs have to be different for both sites
– P3P: Some browsers wont allow the site inside the iFrame to write cookies, as it will be considered third party, so you´ll have to use P3P to fix that.