Google Analytics和Colorbox iframe - 跨域跟踪

时间:2014-07-09 07:09:51

标签: jquery html google-analytics colorbox

我坚持以下问题。

我有一个带有查询按钮的页面,可以在彩盒中启动iframe的联系人。

主页位于www.domain1.com,iframe位于www.domain2.com

我并不完全了解Google Analytics如何处理多个域名,但我认为GA可以接受domain1.com GA帐户中的domain2.com跟踪信息。请澄清我是不是错了。

这是我试图用来将cookie从domain1传递到domain2的代码

$( document ).ready(function() {

        $(document).bind('cbox_complete', function(){
            console.log ('Passed to iframe');
            var pageTracker = _gat._getTrackerByName();
            var href = $.colorbox.element().attr('href');
            if (href) {
                _gaq.push(function() {
                  var pageTracker = _gat._getTrackerByName();
                    setTimeout(function(){
                        $('#cboxLoadedContent iframe').attr('src',pageTracker._getLinkerUrl(href));
                        console.log (pageTracker._getLinkerUrl(href));
                    },1000);
                });
            }
        }); 
    }); 

我尝试过这样的解决方案:Google Analytics and Colorbox - Cross domain tracking

0 个答案:

没有答案
相关问题