I build pages on my clients website that can be iframe on their partners websites.
I included this GA code on the website.
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-1494300-1']);
_gaq.push(['_setDomainName', 'mysite.com']);
_gaq.push(['_trackPageview']);
(function () {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
_gaq.push(['_trackEvent', 'iframe', '/products/default.aspx', 'Petersburg- Zip Code:26847',, false]);
})();
I've verified that the code shows and is being called when the site is pulled in from and iframe, However, we are not getting any event data in GA. I've read up on iframes and GA tracking and most of the issues seem to be the result of cross domain limitation. However, with this implementation i do not need any info from the parent and the parent doesnt need any info from me I just need the event data. Any ideas?