简体   繁体   English

Google Analytics(分析)跟踪目标转化-重新定向

[英]google analytics to track goal conversions - re directs

I am using google analytics to track goal conversions, using a bridge page which then re directs the user to the affiliate website. 我正在使用Google Analytics(分析)来跟踪目标转化,使用一个桥接页面,该页面然后将用户重定向到联属网站。

I have a question regarding the time out before it re directs. 我有一个关于超时的问题,然后重新定向。 What's the quickest time you can set your page to redirect so Google can collect the analytics goal conversions data? 您可以将页面设置为重定向的最快时间是什么,以便Google可以收集分析目标转化数据?

Below is the code I use on my bridge page before it redirects, it's set to: 1500 - 1 and a half seconds delay. 以下是我在网桥页面上重定向之前使用的代码,其设置为:1500-1个半秒的延迟。

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

Any feedback would be appreciated. 对于任何反馈,我们都表示感谢。

Many Thanks Paul 非常感谢保罗

You can use analytics events to make sure the redirect was recorded before it's redirected. 您可以使用分析事件来确保在重定向之前已记录重定向。

//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
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM