COVID-19. Revisa las medidas que puedes adoptar para responder rápidamente ante esta contingencia. Consúltalas aquí.

Carl Heyerdahl

GTM Best Practices for Enhanced E-commerce

Thinking about implementing Google Tag Manager(GTM) to measure your online business? Before you start we recommend reading this guide that will be very useful to know the best way to proceed with the implementation before you call the IT team.


The following best practices are the result of the collection and the challenges that we are constantly encountered, to carry out the implementation of Google Tag Manager (GTM) with our customers, and we want you to be able to make more effective use of the tool and in a simpler way during implementation.

Of course we recommend sticking to these practices to make the deployment and management of tags optimal.


The first thing you need to do is choose a measurement model(and stick with it!),to make sure we don’t generate additional tags that send extra information and complicate the analysis process by changing the data. This may have sounded complicated, simplifying: choose an attribution model and stay with it

Implementing Tags (TAGS)

For the implementation of the tags to be measured, you can perform it using GTM and by adding a Data Layers directly to the site:

  • By GTM: it has the advantage that there is no need to modify the site code, however if there are changes to the page (such as a redesign or a new structure, product change, etc.) it can result in the need to change tags in GTM or lose information.
  • By DataLayers: This means including extra code to the site, however, it usually prevents tags from being obsolete with site changes, since we set the value in the code we don’t extract it from the content.

In general we recommend via DataLayer, because normally sites change constantly and having the code present allows you to easily move it and preserve data transmission.


Using naming correctly becomes necessary when we have to manage an account of considerable size, that is, with many tags, triggers and variables. Then we have to name everything to be able to locate it correctly, for this purpose we recommend:

Tags and variables

Type Provider Tipo Description
GA (Google Analytics) DLV(DataLayer Value) Login


Type Description
CE(Custom Event) Attempt login

This nomenclature is recommended so that all team members can track the implementation and administration of the account, changing the DLV values to which corresponds that may be the product name, price or other and description, in this case we are measuring logins without modifying the tags, we are only sending the value of the tags.

For triggers we can measure events such as login attempt, that is, when the tag is being fired and raises an event.


Using filters in Google Analytics helps us limit or modify the data in a view. They are very useful and the most common uses of filters are:

  • Exclude traffic from IP addresses (such as your own).
  • Include data from specific subdomains.
  • Convert dynamic page URLs to readable text strings for reports (transform “pageId-2” into “Page 2 listing blog”).

The filters to be used regularly are:

Enhanced E-Commerce

Enhanced e-commerce (or Enhanced Ecommerce) is an analytics feature that gives us the ability to analyze the behavior of users and their interaction with products through the purchase, in case we could only write an entire book of it, and yes, we are in constant work to be able to provide you with information about it but to be able to start we highly recommend you read Google’s official development documentation.

To make the most of this feature it is necessary to have it well coordinated with GTM, since each product, article, service, etc., sends information to Analytics through dataLayers and this in turn interprets it and with E.Ecommerce helps us to visualize the information in an understandable and useful way.

The best practices for the interaction between GTM and GA EE that we have collected for you are mainly:

  1. Send a maximum of 15 elements in each DataLayer, although it will depend considerably on the amount of information that is sent, the observation that after 15 you are at increased risk of interruption in the transmission of the information and of course a poor reading of the data.
  2. In case you need to send some data but we do not have the best thing is NOT to send the empty data, for numeric cases place ‘0’ and for alphanumeric an “N/A” as the DataLayer value (DLV), so that the GA reports are more accurate and there is no problem measuring the empty fields.
  3. Verify that during the entire e-commerce journey, the data of each product or promotion do not change tag, name, value, etc.


We hope you find this guide super useful and we want to know your opinion, send us your feedback and if you think this guide may be helpful to someone don’t forget to share.

Share the love 😉

We leave you the bibliography we use to complement this guide:


Share on facebook
Share on twitter
Share on linkedin
Share on print
Share on email