AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

2.6K members online now
2.6K 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

Cross Domain Tracking Not Working - Possible Issue w/ iframe For Analytics Scripts?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Right now I cannot attribute sales which means I am flying blind, so I'd really appreciate any help I can get.  I've read a number of posts and help docs about cross domain tracking and really can't figure out what I'm doing wrong - but suspect it has to do with how inserts tracking codes.


I have a blog ( on which I use GA UA and everything tracks fine. On my site I have an embedded (JS, not iframe) SpreadShirt shop. That too tracks fine, as it's under the domain. If you go to check out however, you're sent away from my site to I am tracking the traffic when it gets there, but the referrer is always spreadshirt (checkout/footer, an iframe where they inject analytics code) rather than the original referrer to my session - it is a completely different session than the one the user created when they got to my site.


In other words, we have this flow:

1) User finds a article containing a link to my site, and they click it

2) I see that user's session and can see they're referred by

3) User goes to my shop page, and I see that same session, that they got to the shop from, etc

4) User goes to check out and is sent to

Actual behavior: I see a new session in the checkout, with a referrer of an iframe in the check out (again, spreadshirt puts the analytics code in an iframe)

Expected behavior: I see that same session, with a referrer of, now in my checkout


Things I've done/notes:

  • The UA code is the same for the analytics codes on my site and at Spreadshirt (for my specific shop)
  • I've set all pertinent domains to not show as a referrer
  • The analytics code on my site has a secondary domain of, where the ifram with tracking code loads in the checkout (ga("linker:autoLink", [""])Smiley Wink
  • The analytics code I inject into spreadshirt has a secondary domain of
  • I am injecting my own analytics code into spreadshirt - they give you the option to have them do it, but the result/behavior ends up being the same.
  • I didn't include or any other domain within my tracking code because the analytics fire from that 100151... domain regardless of whether I use SpreadShirt's build in analytics script injection or my own. I've tried though, and it made no difference.
  • If you ask SpreadShirt about analytics, they tell you they can't help the second the see that a-word.

I sincerely appreciate any guidance.

Cross Domain Tracking Not Working - Possible Issue w/ iframe For Analytics Scripts?

Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭

So it seems the issue is that clientID is supposed to be passed, but traffic goes from my site to checkout.spreadshirt, and then the analytics fire from 100151996.spreadshirt, so even if it's passed from checkout, that doesn't matter.  Because there isn't a link or action going from cruisehabit to 100151996 I'm trying to use postMessage to send the clientID from checkout to the 100151996 iframe.  


This seems, in principle, the issue.  Yet I've not been able to solve it.