所有事件在Google Analytics 4调试器中重复。

huangapple go评论65阅读模式
英文:

All events duplicated in Google Analytics 4 Debugger

问题

当通过Google Tag Manager运行调试器并在Google Analytics 4中检查调试视图时,一切都看起来正常...然后突然之间,每个事件的多个实例都出现了。有时会有2个事件实例,有时会有3个,如果停留在页面上足够长时间,有时会出现更多的实例。然后,有时如果重新加载页面,它会看起来它们消失了。但当再次重新加载后,它们会再次出现。我之所以知道这个问题是因为我们设置的一个转化事件(通过GTM触发器)在页面视图事件上触发了多次,而实际上只有1个入口。我还要注意的是,这对内置的自动事件和我通过GTM发送的自定义事件都在发生。

其他细节:

  • 我们通过"Google Ads链接"将Google Ads直接连接到Google Analytics 4。
  • 我们通过"Search Console链接"将Google Search Console连接到Google Analytics 4。
  • 设置相当基本/标准 - 设置没有什么特别的。
  • 我通过Google Tag Manager安装了GA4。
  • 复制的事件中的所有参数都是相同的。

这里有一张屏幕截图:

在GA4中复制的事件

我尝试过的方法:

  • 检查网站是否安装了多个GA4和GTM代码。
  • 直接将Google Analytics 4安装到网站中。
  • 尝试使用和不使用所有过滤器(我设置了一个调试过滤器和一个阻止IP的内部过滤器)。
  • 我尝试使用插件安装GTM,并将其硬编码到header.php文件中(是否直接安装GA4)。
  • 当我暂停Google Tag Manager中的Google Analytics 4配置标签时,Google Analytics页面视图不会触发,但自动和自定义事件会触发。问题仍然存在 - 所有触发的事件都会触发多次。
  • 我确保在Google Analytics 4中没有手动创建的事件 - 所有事件都是在Google Tag Manager中创建的。
  • GA4中的"收集通用分析事件"被切换为关闭。
  • 当从GA4界面中选择Google标签时,GA4属性和Google Ads帐户都被设置为"目标"。并且"忽略重复的页面配置实例(推荐)"被切换为开启。
英文:

When running the Debugger via Google Tag Manager and checking the Debug view in Google Analytics 4, everything looks fine... and then all of the sudden, multiples of every event show up. Sometimes there are 2 instances of events, sometimes 3, sometimes more if I stay on the page long enough. And then, sometimes if you reload the page, it will look like they went away. But then it will come back once it reloads again. I was made aware of the issue because a Conversion we have set up to fire on a page_view event (via a GTM trigger) has fired many times, when we only had 1 actual entry. I want to also note, this is happening for both built-in automatic events, and custom events I'm sending via GTM.

Other details:

  • We have Google Ads connected directly to Google Analytics 4 via the "Google Ads Links"
  • We have Google Search Console connected to Google Analytics 4 via the "Search Console Links"
  • The setup is fairly basic/standard - nothing crazy with the setup.
  • I have GA4 installed via Google Tag Manager.
  • All the parameters in the duplicated events are the same as each other

Here's a screenshot:

Duplicate events in GA4

Here's what I've tried:

  • Swept the site for multiple installations of GA4 and GTM code
  • Installed Google Analytics 4 directly into the site
  • Tried with and without all filters (I had a debugging filter, and Internal filter blocking IP set up)
  • I've tried installing GTM using a Plugin, and hard coded it into the header.php file (with and without GA4 installed directly.
  • When I pause the Google Analytics 4 configuration tag in Google Tag Manager, the Google Analytics pageview doesn't fire, but the automatic & custom events do. The issue still persists - all events that do fire, fire multiple times.
  • I made sure there are NO events that were created in Google Analytics 4 manually - all events are created in Google Tag Manager
  • GA4: "Collect Universal Analytics events" is toggled OFF
  • When selecting the Google Tag from the GA4 interface, the GA4 property AND the Google Ads account are set as "Destinations". And "Ignore duplicate instances of on-page configuration (recommended)" is toggled ON.

答案1

得分: 5

以下是您要翻译的内容:

"Good question. I'll use this as a future reference for similar questions, so I'll keep it a bit general and sometimes overlapping with the debugging you already did.

In short, don't use the GA4 Debugger. GA4 is a raw product, containing many bugs. The debugger is bugged for now. Some people say reloading the debugger eliminates the problem for a short time, but it doesn't seem to be working for others.

Let's look into the basics of front-end tracking debugging.

There are generally two principally different approaches to debugging front-end analytics: from the tracking side and from the data side. Since GA4's interface is bugged and unreliable, it can easily misreport. I will describe both approaches, starting from the technical one since I usually start debugging from tracking, but if I don't see anything quickly enough, I switch to the data.

Tracking Debugging

Your first mistake is using the GA4 debugger as a significant source of truth. GA4 debugger is a good source of truth, but it's not useful and is generally completely ignored in the vast majority of professional tracking implementations. Similarly, for those who use the Google Tag Assistant extension, remove it and in the future, check the last update date of an extension you're using.

Instead, either use the Network tab with the collect? filter like so:

所有事件在Google Analytics 4调试器中重复。

Or better yet, use Adswerve's dataLayer inspector which looks like this:

所有事件在Google Analytics 4调试器中重复。

In either way, you will be able to see exactly what is being sent on every page.

Now the multiple event firing debugging:

  1. Go to the site, check if you see duplicated events firing in the Network/Console. If you don't see double tracking, then either your tracking is fine, or you're looking in the wrong place, like a wrong site or page. Be careful with GA4 events. GA4 molds multiple events into one. It should stop doing that if you look through the GTM preview, but even so, you will be able to see that in the event payload when there's more than one event.
  2. Once you find double firing events, go to the Network tab and filter gtm.js. Make sure that only one network request for GTM is sent per page reload.
  3. Use your devtools drawer to enable the request blocking feature and block gtm there. Or gtag if you're unfortunate enough to use gtag.js directly for tracking.
  4. Reload the page and see if double tracking persists. Or rather if you see any hits to GA4 with GTM blocked. If you do see the hits, it means that besides GTM, something else is doing the tracking in parallel. Likely gtag.js loaded and triggered independently from GTM. That will have to be cleaned up.
  5. If you see no GA hits with GTM disabled and see doubles with it enabled, it indicated a problem within GTM, where now you want to open the GTM preview debugger and inspect how many events are firing on page load/page change.
  6. Debugging double firing in the GTM Preview debugger should be simple. You just inspect the triggers of misfiring events while having the events they fired on selected (not the summary tab) and it will highlight which triggers triggered. It will also show you the values of all variables on the selected event.

Raw Data Debugging

Now, GA4's UI is bugged. It can easily mislead. And it's still in active development. Google definitely pushed GA4 too early. Its data, however, is quite reliable since the whole data framework was just copied from the time-proven Firebase model. Therefore, I often suggest people to make a free Big Query export of their data and inspect sessions in the raw BQ data to make sure there's indeed double tracking problems. It will become very apparent in BQ data.

In BQ, you want to select all columns where you set a fixed client id (pick one at random if your suspected double tracking is in production), then order by the timestamp to get all hits in the sequence they were tracked. It should become immediately obvious if you have a double tracking problem.

In BQ, it will become very easy to compare all dimensions of two hits side by side. The structure is simple: hits are rows and dimensions are columns. Except the custom dimensions. They're in JSON, in one column. Just look at two hits that seem like duplicates and compare their dimensions data. That should give more insight into the problem if there is really a problem.

英文:

Good question. I'll use this as a future reference for similar questions, so I'll keep it a bit general and sometimes overlapping with the debugging your already did.

In short, don't use the GA4 Debugger. GA4 is a raw product, containing many bugs. The debugger is bugged for now. Some people say reloading the debugger eliminates the problem for a short time, but it doesn't seem to be working for others.

Let's look into the basics of front-end tracking debugging.

There are generally two principally different approaches to debugging front-end analytics: from the tracking side and from the data side. Since GA4's interface is bugged and unreliable, it can easily misreport. I will describe both approaches, starting from the technical one since I usually start debugging from tracking, but if I don't see anything quickly enough, I switch to the data.

Tracking Debugging

Your first mistake is using the GA4 debugger as a significant source of truth. GA4 debugger is a good source of truth, but it's not useful and is generally completely ignored in vast majority of professional tracking implementations. Similarly, for those who use the Google Tag Assistant extension, remove it and in the Future, check the last update date of an extension you're using.

Instead, either use the Network tab with the collect? filter like so:

所有事件在Google Analytics 4调试器中重复。

Or better yet, use Adswerve's dataLayer inspector which looks like this:

所有事件在Google Analytics 4调试器中重复。

In either way, you will be able to see exactly what is being sent on every page.

Now the multiple event firing debugging:

  1. Go to the site, check if you see duplicated events firing in the Network/Console. If you don't see double tracking, then either your tracking is fine, or you're looking in a wrong place, like a wrong site or page. Be careful with GA4 events. GA4 molds multiple events into one. It should stop doing that if you look through the GTM preview, but even so, you will be able to see that in the event payload when there's more than one event.
  2. Once you find double firing events, go to the Network tab and filter gtm.js. Make sure that only one network request for GTM is sent per page reload.
  3. Use your devtools drawer to enable the request blocking feature and block gtm there. Or gtag if you're unfortunate enough to use gtag.js directly for tracking.
  4. Reload the page and see if double tracking persists. Or rather if you see any hits to GA4 with GTM blocked. If you do see the hits, it means that besides GTM, something else is doing the tracking in parallel. Likely gtag.js loaded and triggered independently from GTM. That will have to be cleaned up.
  5. If you see no GA hits with GTM disabled and see doubles with it enabled, it indicated a problem within GTM, where now you want to open the GTM preview debugger and inspect how many events are firing on page load/page change.
  6. Debugging double firing in the GTM Preview debugger should be simple. You just inspect the triggers of misfiring events while having the events they fired on selected (not the summary tab) and it will highlight which triggers triggered. It will also show you the values of all variables on the selected event.

Raw Data Debugging

Now, GA4's UI is bugged. It can easily mislead. And it's still in active development. Google definitely pushed GA4 too early. Its data, however, is quite reliable since the whole data framework was just copied from the time-proven Firebase model. Therefore, I often suggest people to make a free Big Query export of their data and inspect sessions in the raw BQ data to make sure there's indeed double tracking problems. It will become very apparent in BQ data.

In BQ, you want to select all columns where you set a fixed client id (pick one at random if your suspected double tracking is in production), then order by the timestamp to get all hits in the sequence they were tracked. It should become immediately obvious if you have a double tracking problem.

In BQ, it will become very easy to compare all dimensions of two hits side by side. The structure is simple: hits are rows and dimensions are columns. Except the custom dimensions. They're in json, in one column. Just look at two hits that seem like duplicates and compare their dimensions data. That should give more insight into the problem if there is really a problem.

答案2

得分: 2

刷新分析中的调试视图页面,查看重复项是否仍然存在。

我遇到相同的问题;事件越旧,副本就越多。当我刷新页面时,一切都如预期一样。然后,过一段时间,它们再次开始复制,包括 25 分钟前触发的事件。

英文:

Refresh the debug view page in analytics and see if the duplicates persist.

I have the same issue; the older the event the more copies there are. When I refresh the page everything looks as expected. Then, after some time, they start to duplicate again, including events fired 25 mins ago.

答案3

得分: 2

同样的问题,直到昨天和今天都没有见过。相当有信心我在网站上正确地实施了GTM。

英文:

Same problem never seen it happen until yesterday and today. Pretty confident I implemented GTM correctly on the site

所有事件在Google Analytics 4调试器中重复。

答案4

得分: 2

面对相同的问题。两周前开始出现。在我这种情况下,刷新似乎可以修复不到10-15秒。我正在解决 GA4 事件上的重复事件调试,而在调试视图中出现的这个错误只会让找到根本原因变得更加困难。

英文:

Facing the same issue. Started occurring 2 weeks back. Refreshing seems to fix for less than 10-15 seconds in my case.
I was working on debugging duplicate events on my GA4 events itself, and this bug in debug view has only made it harder to find the root cause.

huangapple
  • 本文由 发表于 2023年3月15日 20:57:55
  • 转载请务必保留本文链接:https://go.coder-hub.com/75745048.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定