Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Analytics and Iframe cross domain problem

We host iframes on CloudFront but we call the Google Analytics code and iframe on a Dropbox page. The problem is Google Analytics code runs on the server that has been called(Dropbox) not in the parent(CloudFront). I have looked into this: http://code.google.com/apis/analytics/docs/tracking/gaTrackingSite.html#trackingIFrames

But we don't want to grab the iframe by the id and do pageTracker._getLinkerUrl on that. We will put this iframe code on a client side and don't want to put more code in the iframe that we will give to the client. I have also tried doing an Ajax load but still doesn't work. Does anybody have any ideas?

like image 554
Sait Mesutcan Ilhaner Avatar asked Mar 20 '26 05:03

Sait Mesutcan Ilhaner


1 Answers

I think document.domain could help you out, but there's a little more to it, as explained here: http://www.nczonline.net/blog/2009/09/15/iframes-onload-and-documentdomain/

like image 132
Jamie Mason Avatar answered Mar 21 '26 20:03

Jamie Mason



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!