gpt4 book ai didi

javascript - Google Analytics 事件跟踪未显示

转载 作者:可可西里 更新时间:2023-11-01 01:36:44 30 4
gpt4 key购买 nike

我在使用 google analytics 时遇到了这个问题,我无法在 Behavior > Events > Top Events 下找到显示的计数数据。

我正在使用经典分析。这是我的代码:

    <script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-xxxxxxxx-1']);
_gaq.push(['_setDomainName', 'domain.com']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script>


<script>
// custom events:

$(function() {

$('button').each(function(){
$(this).html($(this).data('event'));
});

$('button').click(function(){
var event = $(this).data('event');
_gaq.push(['_trackEvent', 'USER_INTERACTION', event, 'whatever babe']);
console.log(event);
});

});


</script>


<button type="button" data-event="CLICKS_BUTTON_1"></button><br />
<button type="button" data-event="CLICKS_BUTTON_2"></button><br />
<button type="button" data-event="CLICKS_BUTTON_3"></button><br />
<button type="button" data-event="CLICKS_BUTTON_4"></button><br />
<button type="button" data-event="CLICKS_BUTTON_5"></button><br />
<button type="button" data-event="CLICKS_BUTTON_6"></button><br />
<button type="button" data-event="CLICKS_BUTTON_7"></button><br />
<button type="button" data-event="CLICKS_BUTTON_8"></button><br />
<button type="button" data-event="CLICKS_BUTTON_9"></button><br />
<button type="button" data-event="CLICKS_BUTTON_10"></button><br />
<button type="button" data-event="CLICKS_BUTTON_11"></button><br />
<button type="button" data-event="CLICKS_BUTTON_12"></button><br />
<button type="button" data-event="CLICKS_BUTTON_13"></button><br />
<button type="button" data-event="CLICKS_BUTTON_14"></button><br />
<button type="button" data-event="CLICKS_BUTTON_15"></button><br />

然而,在实时部分下,事件跟踪数据出现并且没问题。是否有任何其他必要的东西(代码)需要实现才能使其出现在行为 > 事件部分?

最佳答案

阿尔迪,

如果事件显示在实时报告中,那么您肯定没问题并且您的设置是正确的。

实时报告也反射(reflect)过滤器设置,因此如果您可以看到用户在您的网站上触发的事件,请耐心等待原始数据被处理并显示在事件报告中。

数据处理最近发生了变化,您可以在官方 GA 文档中找到所有详细信息 - 请参阅 Data Limits section .

Processing latency is 24-48 hours. Standard accounts that send morethan 200,000 visits per day to Google Analytics will result in thereports being refreshed only once a day. Daily processing begins at12:00 UTC and continues for approximately 10 hours. This can delayupdates to reports and metrics for up to two days. To restoreintra-day processing, reduce the number of visits you send to <200,000 per day.

希望这对您有所帮助。

关于javascript - Google Analytics 事件跟踪未显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21153171/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com