2
votes

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.

enter image description here

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!

1
From your post it is not obvious that you have configured tags (the examples for the actual tag configuration is hidden in the documentation, you need to click the green arrows under each code block to see it) , so for all we can tell there might actually be no tags in your container.Eike Pierstorff
Yes, I had to set up tags first. If you post it as an answer I'll accept it. Thanks!bukowski

1 Answers

3
votes

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).