Analytics
1.9K members online now
1.9K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Cross Domain Tracking on IFRAMES with universal

[ Edited ]
Follower ✭ ✭ ☆
# 1
Follower ✭ ✭ ☆
Hi

I've been asked to test a setup of cross domain tracking in pages with IFRAMES to a number of domains. The setup is:

  • An index page with.
  • Same domain.
  • Subdomain.
  • External domain.
The IFRAMES look like this:

<h2>Iframe to same domain</h2>
<iframe src="about:blank" data-iframe-src="//example.com/test/child.html" name="same_domain" height="300" width="600">
<p>Your browser does not support iframes.</p>
</iframe>
<noscript>
<iframe src="//example.com/test/child.html" name="same_domain_no_script" height="300" width="600">
<p>Your browser does not support iframes.</p>
</iframe>
</noscript>

I need help with a script that will wait till the page loads, ga.js loads which then grabs the data-iframe-src in each IFrame, decorates it with the CID and then sets the src to this value.

How should we go about checking this even work? 

For example, would viewing a:
  • source medium encoded URL with a source/medium set to my_test.
  • in a source/medium filtered real-time view (with my_test as a filter).
  • be expected to show 4 hits  view every time the page loads?

 

1 Expert replyverified_user

Re: Cross Domain Tracking on IFRAMES with universal

Top Contributor
# 2
Top Contributor
Hi Oren,

Did you came across this article?
http://www.lunametrics.com/blog/2015/11/18/tracking-complex-interactions-in-iframes-google-analytics...
Hope it helps.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital