如何解决新分析代码中调整后的跳出率
我使用了一个名为“调整跳出率”的小插件,它被放弃了,但它一直在工作,直到分析代码发生变化,现在使用标签管理器 (gtag) 而不是 analytics.js。
我在跟踪代码的末尾添加了一行代码,跳出率又恢复了。
现在我的代码如下:
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXX-19"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js',new Date());
gtag('config','UA-XXXXXXXX-19');
setTimeout("gtag('event','adjusted bounce rate',{'event_label':'more than 60 sec'})",60000 );
</script>
<!-- End Google Analytics -->```
The problem is that the "time on site" dropped from 5 minutes as it was with the bounce rate plugin down to 1.5 minutes.
The bounce rate is back to 30% as before but the time spending on one-page views are not counting towards the average time on site.
What I am searching for is another line of code or a modification to this to force analytics tracking to count the time spent even on single-page visits.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。