Google Analytics Measurement Protocol 衡量交易但不衡量产品数据
Google Analytics Measurement Protocol Measuring Transaction but not Product Data
给定有效载荷:
v=1
&tid=UA-REDACTED
&ds=web
&cid=REDACTED
&uid=15844
&uip=REDACTED
&ua=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f68.0.3440.106+Safari%2f537.36
&ul=en-gb
&dp=%2f
&dh=www.devserver.com
&t=transaction
&ti=TestTxn8TI
&tr=105
&tt=10
&ts=5
&cu=EUR
&ds=web
&pr1id=testsku
&pr1nm=test%20product%20description
&pr1ca=hardware
&pr1pr=100
&pr1qt=1
&pr2id=testsku2
&pr2nm=another%20description
&pr2ca=hardware
&pr2pr=20
&pr2qt=2
&pa=purchase
它正在正确衡量交易:
但是没有关联的产品数据。如何显示产品数据?
在我看来,您将电子商务命中率与增强型电子商务命中率混合在一起。
根据 Enhanced Ecommerce Tracking 的 Measurement Protocol 文档:
Important: Enhanced Ecommerce parameters must be sent with an existing hit (e.g. pageview, event), but cannot be sent with the Ecommerce transaction or item hit types.
话虽如此,继续发送 Ecommerce Tracking 下的命中:
触发交易命中
v=1
&tid=UA-XXXXX-Y
&cid=555
&t=transaction
&ti=TestTxn8TI
&tr=105
&ts=5
&tt=10
&cu=EUR
交易中每个产品的触发项目命中
v=1
&tid=UA-XXXXX-Y
&cid=555
&t=item
&ti=testsku
&in=test%20product%20description
&ip=100
&iq=1
&iv=hardware
&cu=EUR
v=1
&tid=UA-XXXXX-Y
&cid=555
&t=item
&ti=testsku2
&in=another%20description
&ip=20
&iq=2
&iv=hardware
&cu=EUR
如果您有兴趣在增强型电子商务跟踪下发送命中,只需将命中类型从 transaction
更改为 pageview
,例如:
v=1
&tid=UA-XXXXX-Y
&cid=555
&t=pageview
&dh=www.devserver.com
&dp=%2f
&ds=web
&uid=15844
&uip=REDACTED
&ua=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f68.0.3440.106+Safari%2f537.36
&ul=en-gb
&ti=TestTxn8TI
&tr=105
&tt=10
&ts=5
&cu=EUR
&pa=purchase
&pr1id=testsku
&pr1nm=test%20product%20description
&pr1ca=hardware
&pr1pr=100
&pr1qt=1
&pr2id=testsku2
&pr2nm=another%20description
&pr2ca=hardware
&pr2pr=20
&pr2qt=2
希望对您有所帮助!
给定有效载荷:
v=1
&tid=UA-REDACTED
&ds=web
&cid=REDACTED
&uid=15844
&uip=REDACTED
&ua=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f68.0.3440.106+Safari%2f537.36
&ul=en-gb
&dp=%2f
&dh=www.devserver.com
&t=transaction
&ti=TestTxn8TI
&tr=105
&tt=10
&ts=5
&cu=EUR
&ds=web
&pr1id=testsku
&pr1nm=test%20product%20description
&pr1ca=hardware
&pr1pr=100
&pr1qt=1
&pr2id=testsku2
&pr2nm=another%20description
&pr2ca=hardware
&pr2pr=20
&pr2qt=2
&pa=purchase
它正在正确衡量交易:
但是没有关联的产品数据。如何显示产品数据?
在我看来,您将电子商务命中率与增强型电子商务命中率混合在一起。
根据 Enhanced Ecommerce Tracking 的 Measurement Protocol 文档:
Important: Enhanced Ecommerce parameters must be sent with an existing hit (e.g. pageview, event), but cannot be sent with the Ecommerce transaction or item hit types.
话虽如此,继续发送 Ecommerce Tracking 下的命中:
触发交易命中
v=1 &tid=UA-XXXXX-Y &cid=555 &t=transaction &ti=TestTxn8TI &tr=105 &ts=5 &tt=10 &cu=EUR
交易中每个产品的触发项目命中
v=1 &tid=UA-XXXXX-Y &cid=555 &t=item &ti=testsku &in=test%20product%20description &ip=100 &iq=1 &iv=hardware &cu=EUR v=1 &tid=UA-XXXXX-Y &cid=555 &t=item &ti=testsku2 &in=another%20description &ip=20 &iq=2 &iv=hardware &cu=EUR
如果您有兴趣在增强型电子商务跟踪下发送命中,只需将命中类型从 transaction
更改为 pageview
,例如:
v=1
&tid=UA-XXXXX-Y
&cid=555
&t=pageview
&dh=www.devserver.com
&dp=%2f
&ds=web
&uid=15844
&uip=REDACTED
&ua=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f68.0.3440.106+Safari%2f537.36
&ul=en-gb
&ti=TestTxn8TI
&tr=105
&tt=10
&ts=5
&cu=EUR
&pa=purchase
&pr1id=testsku
&pr1nm=test%20product%20description
&pr1ca=hardware
&pr1pr=100
&pr1qt=1
&pr2id=testsku2
&pr2nm=another%20description
&pr2ca=hardware
&pr2pr=20
&pr2qt=2
希望对您有所帮助!