我正在尝试将一些事件从我的网站后端发送到 GA。我从客户端收集了
client_id
,并使用以下请求发送 purchase
事件:
POST /mp/collect?api_secret=xxxxxxxxxxxxxxxxxxxxxxxxxx&measurement_id=G-XXXXXXXX&measurement_id=G-XXXXXXXX HTTP/1.1
{
"client_id": "1079763317.1697693644",
"events": [
{
"name": "purchase",
"params": {
"currency": "IRR",
"transaction_id": "78248861",
"value": "8792000",
"coupon": null,
"items": [
{
"item_name": "Item 1",
"price": "4396000",
"item_category": "ADL",
"quantity": 1,
"item_variant": "Variant 1"
},
{
"item_name": "Item 1",
"price": "4396000",
"item_category": "ADL",
"quantity": 1,
"item_variant": "Variant 2"
}
]
}
}
]
}
请求已成功接受,代码为
204
。我有所有请求的日志,并且我确信该请求每天以这种方式发送和接受超过 7000 次。
但是当我看到 GA 中的报告时,这些事件的数量比应有的要少很多,也许大约 800 个。这意味着不知何故错过了很多这些事件。
你知道这里出了什么问题吗?
价值和价格值必须是数字(不带引号)。