Google 标签管理器 - 容器中没有标签

Google Tag Manager - There are no Tags in the container

所以我尝试实施 google 标签管理器如下:https://developers.google.com/tag-manager/enhanced-ecommerce。但是我的 none 个事件正在触发。

没有发布任何内容,标签管理器管理中也没有显示任何内容...这是从教程中摘录的简单代码片段:

dataLayer.push({
        'event': 'addToCart',
        'ecommerce': {
          'currencyCode': 'EUR',
          'add': {                                // 'add' actionFieldObject measures.
            'products': [{                        //  adding a product to a shopping cart.
              'name': 'Triblend Android T-Shirt',
              'id': '12345',
              'price': '15.25',
              'brand': 'Google',
              'category': 'Apparel',
              'variant': 'Gray',
              'quantity': 1
             }]
          }
        }
      });

我已经安装了 Tag Assistant,它说 Tag Manager 加载了正确的容器 ID。知道为什么什么都没有发布并且跟踪代码管理器管理控制台是空的吗?

谢谢!

创建dataLayer本身不会发送任何数据,你必须先在GTM中配置标签。

标签的设置说明有些隐藏在文档中,必须单击每个代码块下方的绿色箭头才能看到它们。

因此,如果您在创建数据层后创建并发布标签,您应该会开始在 Google Analytics 中看到信息(允许最多 24 小时的处理延迟,尽管实时视图应该几乎立即显示数据)。