简体   繁体   中英

Google Tag Manager - There are no Tags in the container

So I tried to implement google tag manager following this: https://developers.google.com/tag-manager/enhanced-ecommerce . But none of my events are firing.

在此处输入图片说明

Nothing is being POSTed and nothing shows up in Tag manager admin ... Here is simple code snippet taken from tutorial:

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
             }]
          }
        }
      });

I've installed Tag Assistant and it says that Tag Manager is loaded with correct container ID. Any ideas why nothing is POSTed and Tag manager admin console is empty?

Thnks!

Creating the dataLayer does not send any data by itself, you have to configure tags in GTM first.

Setup instructions for the tags are somewhat hidden in the documentation, one has to click the green arrows under each code block to see them.

So if you create and publish your tags after creating the dataLayer you should start to see information in Google Analytics (allow up to 24 hours for processing latency, although realtime view should display data almost immediately).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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