我正在尝试使用google分析度量协议(https://developers.google.com/analytics/devguides/collection/protocol/v1/reference)发送增强的电子商务数据,但是点击率没有出现,我真的不知道如何寻求帮助。我使用python请求库发送如下数据:
HTTP发布
网址:
https://www.google-analytics.com/collect
标题:
'User-Agent': 'python-requests/2.18.4'
有效载荷:
{
'cid': 'e60da0b9e312442fb1fe3e30c0f2d679',
'ea': 'Confirmed Booking',
'ec': 'Booking',
'el': 'SpeediShuttle-Shared Ride Van-oneway-from-HNL',
'ev': 18,
'pa': 'purchase',
'pr1br': 'SpeediShuttle',
'pr1ca': 'Shared Ride Van',
'pr1nm': 'SpeediShuttle-Shared Ride Van-oneway-from-HNL',
'pr1pr': 18.16,
'pr1qt': 1,
'pr1va': 'oneway-from-HNL',
't': 'event',
'ta': 'Airportshuttles.com',
'ti': '2IIMVM.GO',
'tid': 'UA-10350251-1',
'tr': 18.16,
'ts': 0.77,
'tt': '1.17',
'v': 1,
'z': 707523808
}
有什么明显的我做错了吗?你知道吗
如果您查看一下documentation,就会发现负载应该是FormData格式,而不是json格式。我认为它不会接受json,但是为了确保您的请求是正确的,您可以通过将端点更改为“/debug/collect”来验证您的请求(请参见docs)
相关问题 更多 >
编程相关推荐