Mobile app version of vmapp.org
Login or Join
Jamie184

: Does setting document.domain via script interfere with Google Analytics? I have a site, www.example.com, that displays some secure content from forms.example.com in iframes. To enable cross-frame

@Jamie184

Posted in: #GoogleAnalytics

I have a site, example.com, that displays some secure content from forms.example.com in iframes. To enable cross-frame navigation, pages on both sites use JavaScript to set the document.domain to just "example.com".

I am using Google Analytics on example.com, but the GA site is not showing any data. It indicates that the tracking code is found (the status icon is a green checkmark), but no data is reported.

The GA profile lists the website as "www.example.com".

Is this a supported scenario? Is my script interfering with the GA code in some way?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Jamie184

1 Comments

Sorted by latest first Latest Oldest Best

 

@Sarah324

A search of ga.js would suggest that the string "document.domain" (or the minified variant "E.domain") does not, in fact, appear.

It would appear as though Google Analytics uses window.location.hostname (encoded as b.hostname) to get the domain.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme