【问题标题】:google analytics to track goal conversions - re directs谷歌分析跟踪目标转化 - 重定向
【发布时间】:2023-03-04 09:36:01
【问题描述】:

我正在使用谷歌分析来跟踪目标转化,使用一个桥页,然后将用户重定向到附属网站。

我有一个关于重定向前超时的问题。您可以将页面设置为重定向以便 Google 收集分析目标转化数据的最快时间是多少?

下面是我在重定向之前在桥页面上使用的代码,它设置为:1500 - 1 秒半延迟。

<script type="text/javascript">
    setTimeout(function(){ window.location = "http://www.example.com"; },1500);
</script>

如有任何反馈,我们将不胜感激。

非常感谢 保罗

【问题讨论】:

    标签: javascript google-analytics data-conversion


    【解决方案1】:

    您可以使用analytics events 确保在重定向之前记录了重定向。

    //Fires after page load
    addListener(document, 'load', function() {
    //Sends an event for page which where the action was redirect and the value is the current page
      ga('send', 'event', 'page', 'redirect', document.location);
    //Refferes to new location after recording the action.
      window.location = NEW_LOCATION
    });
    

    【讨论】:

    • 您好 Raam86,感谢您的回复。我正在使用 setTimeout(function(){ window.location = "example.com"; },1500);我很想知道 Google 获取目标转化代码的速度有多快,时间限制是多少?我想我可以让页面重定向更快,但不确定?
    • 这总是会立即重定向
    猜你喜欢
    • 1970-01-01
    • 2012-10-13
    • 2013-09-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多