简体   繁体   中英

Tracking with Google Tag Manager Ecommerce to Analytics

I need your help about GTM and UA.

Like this exemple i catch the Event in Google Analytics that's work fine :

// Measure the removal of a product from a shopping cart.
dataLayer.push({
  'event': 'removeFromCart',
  'ecommerce': {
    'remove': {                               // 'remove' actionFieldObject measures.
      'products': [{                          //  removing a product to a shopping cart.
          'name': 'Triblend Android T-Shirt',
          'id': '12345',
          'price': '15.25',
          'brand': 'Google',
          'category': 'Apparel',
          'variant': 'Gray',
          'quantity': 1
      }]
    }
  }
});

In Analytics i can catch the "Event" but where is products data ?

Thanks in advance for your help.

The products data is in the datalayer. You can set set the GA tag to read the dataLayer (alternatively you can set it to use an E-commerce-Variable containing the product data). This is just not very visible in the documentation , you need to click the little green arrow below the code example to expand the description of how to configure your tag (the example assumes you are using and event to send e-commerce data):

在此处输入图片说明

If you use a GA setting variable you might need to click "override settings" in the GA tag first.

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