由于有效负载大小问题而拆分大请求 [英] Splitting up large requests due to payload size issues

查看:47
本文介绍了由于有效负载大小问题而拆分大请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚发现gtag将命中有效载荷限制为8k.如果您的请求较大,则会被拒绝并显示413错误.

I've just found out that gtag limits hit payloads to 8k. If your request is larger it get rejected with a 413 error.

就我而言,它正在发送包含约50种产品的GA4 view_item_list事件.

In my case it's sending the GA4 view_item_list event with about 50 products.

是否可以将数据拆分为多个有效载荷,并且仍将其注册为一个列表视图?

Is it possible to split up the data into multiple payloads, and still have it register as one list view?

在GA4中,由于将多个事件捆绑到一个有效负载中,即使它会使有效负载过大,也会使情况变得更糟.因此,其他小事件也丢失了.

In GA4 it's made a little worse as it bundles multiple events into the one payload, even if it would make the payload too large. Thus other small events are also lost.

使用产品数据上传不是一个很好的选择,因为我们的解决方案将用于许多站点,这些站点很难让他们管理那些产品列表.

Using product data uploads would not be a great option as our solution will be used on many sites where it would be hard to get them to manage those product lists.

仅在可见产品上发送事件可能有效,但是这样会大大增加列表视图的数量.

Sending events on only visible products may work, but it would then greatly inflate the list view counts.

推荐答案

您可以通过保留产品编号来将产品发送到不同的事件.这也是在Universal Analytics中的增强型电子商务中通常也通过印象来完成的,这样,当用户进入用户的查看端口时,就会发送有关用户实际查看的产品的信息.因此,例如,在第一个事件中,列表"A"的前4个产品的位置分别为1、2、3和4.在另一个事件中,显示的第二组产品将始终在列表"A"和位置5的情况下发送6、7和8等.

You can send products to different events by keeping the numbering of their position. This is what is normally done with impressions also in Enhanced Ecommerce in Universal Analytics, so that the information on the products actually viewed by the user is sent when they enter the user's view port. So for example, in the first event the first 4 products of list 'A' will have positions 1, 2, 3 and 4. The second group of products displayed will be sent in another event always with list 'A' and position 5, 6, 7 and 8 and so on.

注意:由于上述原因,一次发送列表中的所有产品,会使您失去 impressions 的含义,因为在打开页面时,位置80的产品将是对于Google Analytics(分析)来说,它是排名1的产品,但很可能永远不会看到排名80的产品(因此,在实际显示之前,不应发送该产品).

Note: sending all the products of a list together in one shot, for the reason mentioned above, makes you lose the meaning of impressions, since on opening the page the product in position 80 will be seen for Analytics as the product in position 1, but most likely the one in position 80 will almost never be seen (so it should not be sent until it has actually been displayed).

这篇关于由于有效负载大小问题而拆分大请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆