作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想使用 google analytice 电子商务来满足某些要求。
所以,我使用了以下来自谷歌的代码片段。
_gaq.push(['_setAccount', 'UA-XXXXX-X']);
_gaq.push(['_trackPageview']);
_gaq.push(['_addTrans',
'1234', // order ID - required
'Womens Apparel', // affiliation or store name
'28.28', // total - required
'1.29', // tax
'15.00', // shipping
'San Jose', // city
'California', // state or province
'USA' // country
]);
_gaq.push(['_addItem',
'1234', // order ID - necessary to associate item with transaction
'DD44', // SKU/code - required
'T-Shirt', // product name
'Olive Medium', // category or variation
'11.99', // unit price - required
'1' // quantity - required
]);
_gaq.push(['_trackTrans']);
最佳答案
All other variables within the addTrans method are optional.
The affiliate field is not required, and was removed from the Google Analytics Ecommerce reports. You can still use the affiliate field for custom reports and filtering.
Tax and shipping appear in the transactions report if you have access to those variables.
The city, state, and country are currently not being used by Google Analytics, but the information is still being collected. You can however use these fields within the profile filters if you have a use for them.
关于google-analytics - 如何在谷歌分析电子商务跟踪中查看城市/州/国家?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12935586/
我是一名优秀的程序员,十分优秀!