作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
带撇号的品牌没有出现在我的Google Analytics(分析)报告中。这是我的代码:
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-52143532-4', 'auto');
ga('require', 'ec');
ga('ec:addProduct', {
'id': 'pay-q39-instead-of-q90-fo', 'name': 'Pay Q39 instead of Q90 for haircut (2018-09-17)', 'category': 'Other',
'brand': 'The Barber's Shop', 'variant': 'male', 'price': '5.07' });
// Transaction level information is provided via an actionFieldObject.
ga('ec:setAction', 'detail'); ga('send', 'event', 'ecommerce', 'detail'); </script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-52143532-4', 'auto');
ga('require', 'ec');
ga('ec:addProduct', {
'id': 'pay-q39-instead-of-q90-fo', 'name': 'Pay Q39 instead of Q90 for haircut (2018-09-17)', 'category': 'Other',
'brand': 'The Barber\'s Shop', 'variant': 'male', 'price': '5.07' });
// Transaction level information is provided via an actionFieldObject.
ga('ec:setAction', 'detail'); ga('send', 'event', 'ecommerce', 'detail'); </script>
'brand': 'The Barber\'s Shop'
而不是
'brand': 'The Barber's Shop'
。但是,我仍然没有在Google Analytics(分析)中看到有关名称中带有撇号的品牌的数据。这是在Google Analytics(分析)中转义撇号的正确方法吗?谢谢。
'brand': 'The Barber\'s Shop'
解决方案而不是
'brand': 'The Barber's Shop'
,那么我打算编写一些代码以完全删除撇号的外观,而改为使用
'brand': 'The Barbers Shop'
。但是,如果Google Analytics(分析)无法以某种方式处理撇号,那会让我感到惊讶。
最佳答案
这听起来可能很愚蠢,但是您是否尝试过以下操作?
<script>
(function(i, s, o, g, r, a, m) {
i["GoogleAnalyticsObject"] = r;
i[r] = i[r] || function() {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, "script", "//www.google-analytics.com/analytics.js", "ga");
ga("create", "UA-52143532-4", "auto");
ga("require", "ec");
ga("ec:addProduct", {
"id": "pay-q39-instead-of-q90-fo",
"name": "Pay Q39 instead of Q90 for haircut (2018-09-17)",
"category": "Other",
"brand": "The Barber's Shop",
"variant": "male",
"price": "5.07"
});
// Transaction level information is provided via an actionFieldObject.
ga("ec:setAction", "detail");
ga("send", "event", "ecommerce", "detail");
</script>
关于google-analytics - 如何在Google Analytics(分析)增强型电子商务中转义撇号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52582653/
我是一名优秀的程序员,十分优秀!