登陆了google应用去试了下发现不会用,然后找到了说明怎么使用的网站
这是网页里的一段
Here's an example of how the data layer code might be implemented in JavaScript:
<script>
window.dataLayer = window.dataLayer || []
dataLayer.push({
'transactionId': '1234',
'transactionAffiliation': 'Acme Clothing',
'transactionTotal': 38.26,
'transactionTax': 1.29,
'transactionShipping': 5,
'transactionProducts': [{
'sku': 'DD44',
'name': 'T-Shirt',
'category': 'Apparel',
'price': 11.99,
'quantity': 1
},{
'sku': 'AA1243544',
'name': 'Socks',
'category': 'Apparel',
'price': 9.99,
'quantity': 2
}]
});
</script>
Place this code above the Google Tag Manager container snippet so that the data layer is ready when Google Tag Manager fires the Google Analytics tag asynchronously.
这是原文网址:
https://support.google.com/tagmanager/answer/6107169?hl=en&ref_topic=6333310
请问下各位大大,,
container snippet 是个啥 是加在哪,js里面吗。
然后现在手头有个任务是改 datalayer中transactionId 的id长度(让长度固定为10)
不知道如何下手。
怎么改呢 谢谢~