Google Analytics Enhanced Ecommerce in Adobe DTM - google-analytics

Is there even support for Ecommerce in the DTM implementation of Google UA? I'm not seeing a way to tell it to load the ecommerce library, let alone a way to include ecommerce related tags in your rules. There isn't even a "custom page code" option on the Rules with GUA like I have with Site Catalyst so not sure how to even add them manually. Am I missing something obvious? Or is there a work-around to doing the ecommerce tagging in DTM?

DTM do not support ecommerce tracking nativly as other Tag Management System do (TealiumIQ for example).
To include ecommerce or advanced ecommerce library you have to setup the require in the GA tool pageCode. Something like:
ga('dtm_ga_standard.require', 'ec');
To use it you have to create custom third party tag in the correct pageLoad rule in order to setup advanced ecommerce tracking, something like:
ga('dtm_ga_standard.ec:setAction', 'purchase', {
id: s_orderid,
affiliation: s_orderid,
revenue: order_total,
tax: '0',
shipping: pageViewData.shipment_cost,
coupon: ''
});
ga('dtm_ga_standard.send', 'pageview');
Be sure to prevent in the tool custom page code the standard page view using the commend:
return false
When the ecommerce page load rule is running.
Claudio.

Related

GA enhanced e-commerce not tracking events through tagmanager

We have a GA enhanced e-commerce set up on our e-commerce, and it's working fine. Now, we want to use tagmanager because we are using many other tags like mousestats, criteo, etc.
I had set up an UA tag in tagmanager with "Page View" trigger and with: "Enable Enhanced Ecommerce Features", "Use data layer" and "Enable Display Advertising Features" enabled.
It was tracking user access but was not tracking "add to cart", "purchase", "product details", etc. I think it's not tracking because all those events are ajax requests, so it happens after a "page view".
Everything seems to be working fine with "preview mode", i can see all events (e.g: add to cart) there, and all scripts are following the https://developers.google.com/tag-manager/enhanced-ecommerce. But no e-commerce results appears at analytics.
Should i create an UA event trigger for each of those events? or are we doing something wrong? I thought that if we used datalayer it would automatically track all events.
Thanks in advance.
Yes, to capture any information after the pageview has loaded (either actions like add to cart, or Ajax) you will be required to send an event with the Enhanced Ecommerce data.
In the link you provided, there are sections after each of the required tags named "See the Tag Configuration for this Example". https://developers.google.com/tag-manager/enhanced-ecommerce
If you click on this, it will provide the basic information for the required tags, e.g. add to cart events.
As for ajax (which I assume is for loading your product details) you might need to send additional events when the Enhanced Ecommerce data is available.

Google Tag Manager and e-commerce don`t see purchase

Now I am testing e-commerce using Google Tag Manager on http://shtrafua.com/test-2 but Analytics don`t see this purchases.
E-commerce in Analytisc activated.
GA debug show
ga("gtm1478156958663.ecommerce:addTransaction", {id: undefined, affiliation: undefined ....
but dataLayer is full fill.
I would be grateful for any advice.
I decide problem. I use Enhanced Ecommerce dataLayer syntax. I change Transaction Tag to a Page View with Enable Enhanced Ecommerce and Use Data Layer checked. Now its work. If you use dataLayer.push you dont need dataLayer declaration above the GTM code
This is not much information to go on, but my guess would be that your GA tag is set to be fired on page load. Since your datalayer is filled only after the GTM tag there is no e-commerce data available on page load, hence all values are undefined and the ecommerce portion of the tag is ignored.
You can easily test this by changing the trigger for your GA to "DOM ready", so the tag fires only after the transaction has been pushed to the datalayer. Or, if at all possible, move the datalayer declaration above the GTM code.

Drupal google tag manager e-commerce data not flowing

I'm having some trouble setting up Universal Analytics in combination with Google Tag manager in Drupal more specific to the e-commerce data. Normal google analytics is working but I can't seem to get the e-commerce data to show up. This is my configuration:
Drupal side:
Installed and configured Google Tag manager module with my project code.
Installed the Commerce Google Tag manager module (this sends the required data to the tag)
Google Tag manager side:
Created a new tag with the following settings
Tag type Universal Analytics
Linked the correct Universal Analytics project
Trigger on pageview
Enabled e-commerce setting
Use datalayer setting
Universal analytics side: On view level I enabled the e-commerce setting and enhanced e-commerce setting. Normal page traffic is flowing into Universal analytics verifying the tag is working.
When debugging the page calls with the Tag assistant I can verify that upon completion of an order data is being sent to the tag, this is the sent data:
[
{
"event": "trackTrans",
"transactionId": "606",
"transactionAffiliation": "Name Hidden",
"transactionTotal": 50,
"transactionTax": 0,
"transactionShipping": 0,
"transactionProducts": [
{
"sku": "211",
"name": "211",
"category": "",
"price": 50,
"quantity": 1
}
]
},
{
"gtm.start": 1465502292047,
"event": "gtm.js"
},
{
"event": "gtm.dom"
},
{
"event": "gtm.load"
}
]
I'm pretty new to Google Tag manager but this are my observations.
The analytics data is sent to the Tag => shouldn't it be sent to the Analytics code instead? Or does the tag manager take care of this?
The documentation mentions this:
Add a tag of type Universal Analytics; track type of Page View or Event.
Does this imply the tag also needs to fire on an event like checkout completion? Or is it a real "OR" case where you can decide for yourself to use either pageview or event.
If you need more information I will be happy to provide so!
Thank you for helping out.
A few things to note regarding the GTM setup, which may help:
Since you're using standard Ecommerce (ie. not Enhanced Ecommerce), your Track Type needs to be Transaction, not Pageview or anything else. It will follow that you won't have the option to check the Enhanced Ecommerce checkbox once you select that track type. There's also no further configuration regarding the dataLayer.
The analytics data is sent to the Tag => shouldn't it be sent to the Analytics code instead? Or does the tag manager take care of this?
The analytics data (assuming you mean the dataLayer) is read by the tag. GTM will handle everything for you (provided things are configured correctly).
Everything else should follow and you shouldn't need to do anything else. Your firing rule for the tag could be the event you are pushing in trackTrans.
If you need to use Enhanced Ecommerce, then you would need to restructure/redo your entire dataLayer (unfortunately, but for the better, as you'd get better and more insights into shopping and checkout behaviours in GA).

GTM eCommerce tracking

I would like to start tracking e-commerce with Google Analytics, to do this I need to pass the values of my data layer into GA using GTM. I have read endless amounts of documentation on the subject and as far as I can tell it should work, however I am still having problems.
The online store we use is actually a third party system (quote engine) so we can't change what is passed to the dataLayer, everything we need is passed to the dataLayer but I can't figure out how to send this data using GTM to GA.
My data layer looks something like this on the checkout page of the site:
dataLayer = [{
'u12': '18000011', 'u10': '31903296', 'u11': '159328761', 'u3': 'XXLX', 'u7': '58.97'
}];
The custom HTML tag in GTM I'm using is firing in the correct place but not sending the information to GA, the tag looks like this:
<script>
ga('require', 'ecommerce', 'ecommerce.js');
ga('ecommerce:addTransaction', {
id: '{{u12}}',
revenue: '{{u7}}'
});
ga('ecommerce:addItem', {
sku: '{{u12}}',
name: '{{u3}}',
price: '{{u7}}',
quantity: '1'
});
ga('ecommerce:send');
Unfortunately this is not working and my Google Analytics is empty in terms of e-commerce transactions, any help on this would be greatly appreciated.
Google pushes the enhanced ecommerce tracking thing. It is hard to find the old documentation of the standard ecommerce tracking.
GA Ecommerce Tracking with Google Tag manager
The solution was a combination of the two answers. I used Mindbreakers link as a template to create the custom data layer suggested by Eike Pierstorff and then used a standard transaction tag in GTM to send the information.
I would like to say a huge thanks to Eike Pierstorff and Mindbreaker for helping me with this.

Google tag manager with enhanced ecommerce, but no ecommerce data in analytics

I am trying to implement the google tag managers UA Ecommerce features.
I've followed all steps from https://developers.google.com/tag-manager/enhanced-ecommerce.
According to the Google Analytics quick preview all my tags are being send with the DataLayer to GTM, but the ecommerce data isn't visible in Google Analytics.
Example tag im sending to GTM:
{
"ecommerce":{
"detail":{
"actionField":{
"list":"Product Page"
},
"products":
[
{
"name":"Twin Time",
"brand":"Fromanteel",
"price":"499.00",
"category":"watch"
}
]
}
}
}
I know the normal analytics works, since i do receive sessions.
Website in question: https://fromanteel.nl/
If I understand correctly, the pushes to the dataLayer succeed. I'm guessing that the corresponding tag might not be triggered. Actually had this happen to me a few weeks ago :-)
In the Tag Manager settings, under tags > your specific tag(s), verify that the trigger fires on everything that applies. For example, select 'all pages' and 'clicks' (not just the first).
I suggest using preview mode to see if the tag actually triggers.

Resources