I have a site that contains the following characteristics:
- Header is defined by code my team controls on subdomain B and is loaded via iframe
- Body is defined by third-party code and platform on subdomain A and is the parent page
- Footer is defined by code my team controls on subdomain B and is loaded via iframe
I am using Google Analytics (GA) to track pageviews. I would like the load of each page (consisting of all three elements) to register in GA as one pageview. In addition, clicks in the header and footer should not count as referred visits. How can I accomplish this?
I know that I can solve the referrer issue with cross-domain tracking:
However, I also have to track the pageview to make it take effect:
This would result in 3 pageviews tracked for one actual page load as far as the user is concerned. Since this particular site nets millions of visitors a month, tripling that is not ideal and would put us over the 10 million events Google Analytics will track reliably on the free plan.