I'm implementing enhanced ecommerce through Google Tag Manager (GTM) using the dataLayer and I'm having issues with some values that are being reported double to the reports.
The value reported double is 'Product Checkouts' that can be seen in the 'Product List Performance' report in Google Analytics (GA).
I've spent a lot of time on this and I'm sure, I don't have one of the following common pitfalls:
There is absolutely only one GTM snippet in the code.
When the user refreshes the page the value isn't reported again (as after refreshing nothing is pushed to the dataLayer)
Triple checked for spelling mistakes
Pushed the values to the dataLayer before GTM snippet
In the image below I'm showing an example;
First, the add_to_cart is reported properly; only once.
While the checkout is reported twice every single time for every product (doesn't matter how many products reported)
This is the list of Tags in GTM:
1
Tag type : Universal Analytics
Track type : Pageview
Enable Enhanced Ecommerce Features: true
Use Data Layer: true
Trigger: event equals gtm.dom
2
Tag type : Universal Analytics
Track type : Event
Event Category: Ecommerce
Event Action: Product Click
Enable Enhanced Ecommerce Features: true
Use Data Layer: true
Trigger: event equals productClick
3
Tag type : Universal Analytics
Track type : Event
Event Category: Ecommerce
Event Action: Add to Cart
Enable Enhanced Ecommerce Features: true
Use Data Layer: true
Trigger: event equals addToCart
4
Tag type : Universal Analytics
Track type : Event
Event Category: Ecommerce
Event Action: Remove from Cart
Enable Enhanced Ecommerce Features: true
Use Data Layer: true
Trigger: event equals removeFromCart
5
Tag type : Universal Analytics
Track type : Event
Event Category: Ecommerce
Event Action: Checkout
Enable Enhanced Ecommerce Features: true
Use Data Layer: true
Trigger: event equals checkout
6
Tag type : Universal Analytics
Track type : Pageview
Enable Enhanced Ecommerce Features: no
Trigger: All Pages
I see an issue with the configuration of your tags. You have first tag as;
1
Tag type : Universal Analytics
Track type : Pageview
Enable Enhanced Ecommerce Features: true
Use Data Layer: true
Trigger: event equals gtm.dom
This above tag is going to fire on all pages (including the final confirmation page). While you have another tag that you have configured to fire on final confirmation page that is.
5
Tag type : Universal Analytics
Track type : Event
Event Category: Ecommerce
Event Action: Checkout
Enable Enhanced Ecommerce Features: true
Use Data Layer: true
Trigger: event equals checkout
So actually the tag 1 is duplicating "all" the data including the transaction one, transaction one is more visible as you are checking this. For debugging purpose you can turn off the 1st tag, and than test you should be able to see single transaction instead of duplicate.
This is a pitfall of the official docs, using pageview to send ecommerce data will indeed duplicated the pageviews and interact with which events is sent when. To avoid this, better use only custom events as trigger and code when they fire.
This could be because of anther event that fires using a tag with enhanced ecommerce settings on
Related
I am implementing the purchase tracking according to the google documentation.
I have a small problem with the purchase tag configuration.
If i create a tag with the provided configuration:
Tag type : Universal Analytics
Track type : Pageview
Enable Enhanced Ecommerce Features: true
Use Data Layer: true
Trigger: event equals gtm.dom
it triggers on every page, which i don't want as it doubles my page views.
(page views are usually tracked via a AllPages-Pageview trigger).
I could add an event property to the object pushed to the dataLayer as it is done for the other ecommerce events (addToCart etc.) and an according trigger.
But as the documentation suggests a different way i assumed there is a reason and way to get the correct behavior using the provided documentation.
What am i missing and what is the correct trigger configuration?
First of all if you are adding Enhanced Ecommerce on website you can have 1 page view tag with "enhanced ecommerce" feature turned on (dataLayer = true) and that will handle your page views as well as Enhanced Ecommerce data. However if you want page views to be tracked as we do in usual way you can send Enhanced Ecommerce data in "Events".
So for example for EE impressions you can create an event;
Event Category = Enhanced Ecommerce
Event Action = Product Impressions
Event Label = {{Page Path}}
And enable Enhanced Ecommerce feature on -> dataLayer = True
And add trigger for this event.
Similarly for Purchase EE you can create another event
Event Category = Enhanced Ecommerce
Event Action = Purchase
Event Label = {{Page Path}}
And enable Enhanced Ecommerce feature on -> dataLayer = True
Add trigger =
Trigger Type = Dom
Page Path = /checkout/success (or what ever your final confirmation page is)
If your EE purchase dataLayer contains an event you can create event trigger as well.
Hope this helps.
A client has requested that we implement google tag manager on to track submission of all the forms on his website. We have set up all of the tags and triggers per the instructions that we found online but it appears that only 1 tag is actually working. We the Solids Conveying Case Studies event appear in the behavior > events> overview screen of analytics but not in the Real Time screen. All other tags do not appear to fire at all. We did view the preview/debug mode and see what appears to be a glimpse of a tag after the form submits and the page reloads. Also during our debugging process we tried setting the action to trigger on the form id, and we tried checking Wait for Tags. Any assistance would be greatly appreciated.
Here is a link to the website: https://foxvalve.com
Here is an example of a tag that we set up.
Tag Type: Universal Analytics
Track Type: Event
Category: Air Gas Ejectors (Different Depending on the Form)
Action: Submit
Label: Form
Value: empty
Non-Interaction Hit: True
Google Analytics Settings: Google Analytics Variable
Trigger Configuration
Trigger Type: Form Submission
Trigger Fires On Page URL equals (the page URL of the form)
I need help in creating a Goal with funnel into a Google Analytics for New Registrations using virtual pageview tag on GTM.
I am not sure what trigger should be use for this tag? Tag is here:
Can anyone help/guide me to setup a trigger?
You will need to push your own custom event on the dataLayer every time a "virtual" page is shown. You could do this as follows:
dataLayer.push({'event' : 'virtualPageview', 'virtualPageName' : 'virtual/registration/complete'});
You would then create a GTM trigger of type Custom Event and the name of the event would be virtualPageview. This will cause your Google Analytics page view tracking tag to fire every time a virtual page is shown. You would also need to pass the value of the virtualName dataLayer key to the GA page view tag. You can do this using the "Fields to Set" section of the tag configuration as follows:
. The Virtual Page Name variable would be defined as follows:
Then, when defining your goal funnel in Google Analytics, you would enter some/virtual/page/name as the funnel step as follows:
In my product page detail, i have a crosselling section which loads a product list when user scroll down. I can trigger a custom event when products in this section are loads (like productsDowloaded).
How can i send product impressions with google tag manager ?
Implement the data layer following these specifications to track product impressions. If you are sending the data asynchronously, push an event to the data layer (eg: event: 'crossSellReady') and fire your custom event GA tag with a rule based on event = crossSellReady. In the custom event tag, make sure to enable enhanced eCommerce tracking, and the tag should automatically pick up the product impression data contained in the data layer. Let me know if you encounter any issue.
When the page is first loaded the first batch of cross sell products are pushed to the dataLayer as impressions and a GA pageview is sent. The GA pageview is a simple GA tag that is fired after the page is loaded.
After that, when the cross sell products are loaded asynchronously, i.e. whenever the user scrolls down, only those products are pushed to the dataLayer and a custom dataLayer event is fired in the success handler of the ajax request. For example:
// Inside Ajax success handler...
dataLayer.push({
'event': 'Custom'
'eventCategory': 'ecommerce',
'eventAction': 'ajax-load'
'eventLabel': 'cross sell'
});
You create a separate generic GA tag that sends events and is fired when the Custom event is pushed to the dataLayer. Inside the generic GA event tag you set all the of the following macros which are of type dataLayer variable:
{{event category}} -> eventCategory
{{event action}} -> eventAction
{{event label}} -> eventLabel
You can also add a nonInteraction macro in the generic GA event tag as well. Your use case, in my opinion, is considered a user interaction (user scrolled down) so the nonInteraction macro should not be set.
If you are using product lists, be careful of the positions of the cross sell items. Whenever those products are asynchronously loaded, you should note down their positions so you can track their positions in the product list tab of the GA dashboard correctly.
P.S. The generic GA event tag has multiple benefits, you can find more information about what I'm saying by reading the relevant article in Simo Ahava's blog.
I've attempted to use the new version of Google Tag Manager to track virtual pageviews and send those to Google Analytics, but they don't seem to be sending properly.
For my Trigger, I've used the builtin History Change event type and have placed that in a tag with my Google Analytics id. The tag is set to Page View track type.
In Google Analytics, I see a pageview, but it just says the user is on the root directory. Also, I'm working in Localhost.
Is there something I missed?
I'm not sure to get the complete description of your setup but maybe an other way of tracking your virtual pageview could be directly by adding data layers directly in your code.
dataLayer.push({
'event':'VirtualPageview',
'virtualPageURL':'/order/step1',
'virtualPageTitle' : 'Order Step 1 – Contact Information'
});
For the trigger, you will then be able to send the fire on of your virtual pageview as a event matches VirtualPageview.
Your Tag need to be set up as a pageview.
Also, using this article for GTM v1 : http://www.lunametrics.com/blog/2014/09/10/fire-virtual-pageview-google-tag-manager/, you can set up your {{virtualPageURL}}
In GTM V2, in your tag, you will have to use the - More settings / Field to set field Name = Page, Value = {{virtualPageURL}}.
Are we talking here about a one page iOS/Android App?