简体   繁体   English

Google跟踪代码管理器未将电子商务数据发送到Google Analytics(标准电子商务)

[英]Google Tag Manager Not Sending Ecommerce Data to Analytics (Standard Ecommerce)

I have been racking my brain on this one and not sure why our Google Tag Manager code isn't sending data to our Google Analytics account. 我一直在绞尽脑汁而不确定为什么我们的Google跟踪代码管理器代码没有向我们的Google Analytics帐户发送数据。

I have researched multiple questions on here that have similar issues, but haven't worked for me. 我在这里研究了几个有类似问题的问题,但对我没用。 In addition this is a great guide I've followed https://www.analyticsmania.com/post/ecommerce-tracking-with-google-tag-manager/ - but still no luck in sending the ecommerce data to GA. 此外,这是一个很好的指南我遵循https://www.analyticsmania.com/post/ecommerce-tracking-with-google-tag-manager/ - 但仍然没有运气电子商务数据发送给GA。

Below is the data layer that we're using on our /ticketing/confirm/ page where our customers go when they complete checkout: 以下是我们在/ ticket / confirm / page上使用的数据层,我们的客户在完成结账时会去:

    <script>
        dataLayer = [{
            'theatreLocation': 'xxxx',
            'theatreState': 'xx',
            'userID': '0',
            'userEmail': 'xxx',
            'movieTitle': 'xxx',
            'transactionId': 'xxx',
            'transactionTotal': xxx,
            'transactionProducts': [
            ]
        }];
    </script>

These variables are automatically updated based on the product that is purchased. 这些变量会根据购买的产品自动更新。 This tag is also placed above our Google Tag Manager script, which fires just below this one. 此标记也位于我们的Google跟踪代码管理器脚本上方,该脚本位于此标记之下。

Within Google Tag Manager, we have an ecommerce tag connected to our GA account that is a transaction type tag. 在Google跟踪代码管理器中,我们有一个与我们的GA帐户相关联的电子商务代码,该帐户是一种交易类型代码。 This tag is set to fire on a trigger of the order confirmation URL. 此标记设置为在订单确认URL的触发器上触发。 At this point the data should be sending to GA 此时数据应该发送给GA

Tag setup - https://i.imgur.com/M5LhUuO.png Trigger setup - https://i.imgur.com/dRIZyaJ.png 标签设置 - https://i.imgur.com/M5LhUuO.png触发设置 - https://i.imgur.com/dRIZyaJ.png

When checking an order confirmation page with the tag manager extension, it shows our tags being fired on page view of the confirmation page: https://i.imgur.com/mPncBqc.png 在使用标签管理器扩展程序检查订单确认页面时,它会在确认页面的页面视图中显示我们的标签: https//i.imgur.com/mPncBqc.png

View of the overall summary: https://i.imgur.com/TUMxhKS.png 整体摘要视图: https//i.imgur.com/TUMxhKS.png

Detailed view of the eCommerce tag: https://i.imgur.com/84ZQaW7.png 电子商务标签的详细视图: https//i.imgur.com/84ZQaW7.png

I also have the tag assistant extension installed and here is what that looks like: https://i.imgur.com/PGgNp4S.png 我也安装了标签助手扩展程序,这就是: https//i.imgur.com/PGgNp4S.png

And the detailed view of the Analytics tag: https://i.imgur.com/7PDTqgb.png 以及Analytics标记的详细视图: https//i.imgur.com/7PDTqgb.png

According to the article I linked above, the detailed view of that analytics tag within tag assistant should have an "other event" listed which should be the transaction info being sent to GA - but as you can see from our screenshot mine does not have that. 根据我上面链接的文章,标签助手中的分析标签的详细视图应该列出“其他事件”,这应该是发送给GA的交易信息 - 但是从我们的屏幕截图中可以看出我的没有。 I'm not sure where I'm going wrong as I think I have everything setup correctly, but clearly there is a break somewhere. 我不知道我哪里出错了,因为我认为我已经正确设置了所有设置,但显然在某个地方有一个休息时间。

Any help or input is really appreciated. 任何帮助或输入真的很感激。

Remove the settings variable from the tracking ID field in the tag setup. 从标记设置中的跟踪ID字段中删除设置变量。 Assuming you want to use the tracking ID you set in the settings variable, uncheck the option to override the settings variable. 假设您要使用在设置变量中设置的跟踪ID,请取消选中该选项以覆盖设置变量。

If you do want to override the tracking ID from your settings variable, this needs to be a string or variable that returns a tracking ID and not an entire settings variable. 如果您确实要覆盖设置变量中的跟踪ID,则需要使用返回跟踪ID而不是整个设置变量的字符串或变量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM