Sebus
Sebus

Reputation: 3892

Page with Google Tag Manager and manually added Google Analytics

Current Situation:

The Plugin above (Tag Manager) also suppoerts automatic events for "add to cart", "checkout" or "purchase" like this:

dataLayer.push({
  event: "checkout",
  ecommerce: {
    checkout: {
      actionField: {step: "1"},
      products: [
        {
           // ...
        }
      ]
    }
  },
  google_tag_params: {ecomm_pagetype: "cart", ecomm_prodid: ["123456"], ecomm_totalvalue: "29.9"},
  gtm.uniqueEventId: 3
})

The event is fired (Checked with Google Tag Assistant)

Problem:

Nothing is tracked. Is it because google_tag_params are only accpeted by GTM and due to the fact that I included GA manually, no tracking happens?

I was thinking about adding GA to GTM, but at first, I want to understand the problem and know if that's the correct solution.

Upvotes: 0

Views: 511

Answers (1)

liav
liav

Reputation: 21

The code you've added is meant for implementing enhanced ecommerce using GTM only. So you will need to configure GTM to send this ecommerce data to your analytics property.

For that, you'll need to configure dataLayer variables, triggers, and tags.

You can read Simo's guide for more information and detailed instructions.

Upvotes: 1

Related Questions