Google analytics 使用Google Analytics(ga.js)跟踪下载

Google analytics 使用Google Analytics(ga.js)跟踪下载,google-analytics,Google Analytics,我在我们网站上的一些下载中遇到了问题。这是我在页面上插入的代码。当我单击链接时,代码确实会执行,但我没有在live viewer中看到事件显示 $(document).ready(function(){ $("a").click(function(){ if ($(this).attr('href').match(/\/showdocument\?id\=\d+$/ig)) { ); _gaq.push(['_trackEv

我在我们网站上的一些下载中遇到了问题。这是我在页面上插入的代码。当我单击链接时,代码确实会执行,但我没有在live viewer中看到事件显示

$(document).ready(function(){
    $("a").click(function(){
        if ($(this).attr('href').match(/\/showdocument\?id\=\d+$/ig)) {
            );
            _gaq.push(['_trackEvent','DocumentManager','click',$(this).attr('href')])
        }
        if ($(this).attr('href').match(/.*\.mankatomn\.gov.*(\.pdf|\.mp3)$/ig)){
            _gaq.push(['_trackEvent','DocumentManager','click',$(this).attr('href')])
        }
     });
});

我错过了一些明显的东西?除了将过去他们给我的代码粘贴到页面上之外,我没有在GA上做过很多工作。

我发现问题在于我过滤掉了我们的IP地址,因此没有看到结果。一旦我把它取下来,它就开始工作了-/

你试过使用GA调试器来查看命中率是否通过了吗?不知道存在。我来看看。我收到了“发送跟踪信标”,所以它一定在工作。我想我必须在周一等着看它是否会被发布。是的,实时并不总是可靠的,但是只要用GA调试器检查一下,同时检查一下你的网络控制台,看看你是否能看到“utm”的成功。