新分析代码中调整后的跳出率

问题描述

我使用了一个名为“调整跳出率”的小插件,它被放弃了,但它一直在工作,直到分析代码发生变化,现在使用标签管理器 (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 (将#修改为@)