简体   繁体   English

GA4 的页面加载问题

[英]Page load issue with GA4

We have a problem related to execution times are observed related to GA4:我们观察到与 GA4 相关的执行时间问题:

Basically, the page loads so fast that once an action is signalled and, in most cases, GA4 does not have time to execute.基本上,页面加载速度如此之快,以至于一旦发出动作信号,并且在大多数情况下,GA4 没有时间执行。 We did not see this problem with UA.我们没有看到 UA 存在这个问题。

With 'Preview Mode'in GTM, GA4 executes as it should do, and so, the information is sent to GA4 servers.使用 GTM 中的“预览模式”,GA4 会按应有的方式执行,因此信息会发送到 GA4 服务器。

About the "normal" execution: the website behaves way too fast, and so, even though GA4 executes, it does not have enough time to send the information to GA4 servers (pending requests which information does never reach GA4 servers).关于“正常”执行:网站运行速度太快,因此,即使 GA4 执行,它也没有足够的时间将信息发送到 GA4 服务器(待处理的请求,其信息永远不会到达 GA4 服务器)。

We investigated and tested different implementation ways to fix it but the problem is still there.我们调查并测试了不同的实现方法来修复它,但问题仍然存在。

Any of you have an idea about this?你们中有人对此有任何想法吗?

We also attach the screenshots of the tests carried out:我们还附上​​了所进行测试的屏幕截图:

UA run times, approx. UA 运行时间,大约100-200 ms. 100-200 毫秒。 - Image 1 -图 1

GA4 runtimes, approx. GA4 运行时间,大约5 seconds - Image 2 5 秒 -图 2

GA4 execution times with the GA Debug extension activated, approx.激活 GA Debug 扩展的 GA4 执行时间,大约100-200 ms. 100-200 毫秒。 - Image3 -图片3

Many thanks,非常感谢,

Do you still see the issue between UA and GA4?你还看到UA和GA4之间的问题吗?

Based on the google document from GA4, GA4 will use sendBeacon to send events, this is to fix some problems with the old UA using XMLHttpRequest to send events, the problem with the XMLHttpRequest is that if events send during the unload page event, the events might not send by the browser.根据 GA4 的 google 文档,GA4 会使用sendBeacon发送事件,这是为了解决旧的 UA 使用XMLHttpRequest发送事件的一些问题, XMLHttpRequest的问题是如果事件在卸载页面事件期间发送,事件可能不会由浏览器发送。

Also, depending on the scenarios, most GA4 events will batch together and send from the browser, so if you're in debugging mode, events are sent immediately, that's why you see the time faster.此外,根据场景的不同,大多数 GA4 事件将一起批处理并从浏览器发送,因此如果您处于调试模式,事件会立即发送,这就是您看到时间更快的原因。

So, in normal mode, GA4 might send events in delay but it batch events altogher, the good thing is if you go to a different page, the event will continue to fire sine GA4 using the sendBeacon API.因此,在正常模式下,GA4 可能会延迟发送事件,但它会批量处理事件,好消息是如果您转到不同的页面,事件将继续使用sendBeacon API 触发正弦 GA4。

You can also refer to this article from GA4 about event batching for GA4.您还可以参考 GA4 中关于 GA4 事件批处理的这篇文章

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

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