I am getting crazy trying to get this to work. I am pretty new to the whole Google Tag Manager thing, but after reading documentation, I got the basic google analytics to work.
Having said that, I am trying to set up an eCommerce transactions using dataLayer but I cannot seems to get it to work.
I am using the basic example taken on the main site:
var dataLayer = dataLayer || [];
dataLayer.push({
'ecommerce': {
'purchase': {
'actionField': {
'id': 'T12345',
'affiliation': 'Online Store',
'revenue': '35.43',
'tax':'4.90',
'shipping': '5.99',
'coupon': 'SUMMER_SALE'
},
'products': [{
'name': 'Triblend Android T-Shirt',
'id': '12345',
'price': '15.25',
'brand': 'Google',
'category': 'Apparel',
'variant': 'Gray',
'quantity': 1,
'coupon': ''
},
{
'name': 'Donut Friday Scented T-Shirt',
'id': '67890',
'price': '33.75',
'brand': 'Google',
'category': 'Apparel',
'variant': 'Black',
'quantity': 1
}]
}
}
});
In my GTM configuration, I have the following: - Tag Type: Universal Analytics - Track Type: Page View - Google Analytics Settings: {{gaTrackingID}} - Enable overriding settings in this tag: ticked - Enable Enhanced Ecommerce Features: true - Use Data Layer
and in the Trigger i have: - Trigger Type: Page view - Trigger fires on: "Page URL contains /checkout
I forgot to mention that I have two tags enabled, one to log activity on all pages and the second one which should log the purchase.
I can in google Analytics that the visit worked correcty, but the transaction does not.
Also, can someone tell me if the section "CONVERSATIONS -> Ecommerce" displays the standard or Enhanced Ecommerce?
I am a bit confused..
Why the above does not work?