How to activate standard e-commerce with Google Tag Manager (GTM) in Woocommerce

What is the Traditional Electronic Commerce or Google Analytics Standard

Google Analytics has an electronic commerce tracking functionality for websites with a sales process. If you have a digital store you have the possibility to track your sales and to know details about your buyers.  buy youtube views
Google offers two versions, the traditional or the improved one.

What should I activate: traditional e-commerce or improved e-commerce?

The traditional electronic commerce (e – commerce standard) allows you to easily track your sales within GA. Specifically, it allows you to combine transaction data (amount of sale, type of item, …) with information from the analytics about the buyers of your products, for example where they came from, that is, did they come through a search engine? , advertising, social networks or another website? Also the type of browser they used, the type of device or the country from which they come.

Example: your X product is bought mainly by users who find your website on Google, who use a mobile phone with IOS and who reside in Madrid and Barcelona.

These are invaluable data, because any attempt to improve your digital store is to know who your customers are and how they behave, so activating GA’s electronic commerce is not an option, it is a necessity.

When to use standard electronic commerce?

Standard e-commerce is based on detecting the completion of a purchase process, usually identifying the thank-you page. It is useful when you have a linear sales process and a few steps.

Improved electronic commerce

It allows to obtain much more information than the traditional one:

  • Behavior of the buyer before, during and after the purchase.
  • Buy media, items per purchase, etc.
  • Affiliate monitoring
  • Abandoning the purchase along the conversion funnel.
  • Buy with coupons

Mucho más completo, pero también más complicado de configurar y de interpretar.

Image result for buy youtube views

Por tanto, si eres novato empieza por el tradicional y pasa más adelante al mejorado.

¿Cómo se activa el comercio electrónico tradicional?

Tanto el tradicional como el mejorado requieren una instalación que no es inmediata ni evidente.

En este artículo vamos a analizar la puesta en marcha del comercio electrónico tradicional con ayuda de Google Tag Manager y para el caso concreto de Woocommerce, el plugin más habitual para crear y gestionar una tienda digital en WordPress.

Para otros tipos de tiendas digitales puedes mirar:

Empecemos:

El paso más complicado del proceso es lograr que GA y la tienda digital se entiendan. Para eso hay que instalar unas líneas de código. Para un programador es tarea fácil, pero nosotros lo vamos a hacer con un plugin:

Carga el plugin Duracell Tomi’s Google Tag Manger para WordPress y actívalo.

Ve a tu cuenta de GTM o crea una nueva para tu web.

Ve a Ajustes y selecciona Google Tag Manager. Introduce el identificador de GTM, que encontrarás en la cabecera de tu cuenta GTM.

Now you will have to enter this line of code in the file header.php: <? Php if (function_exists (‘gtm4wp_the_gtm_tag’)) {gtm4wp_the_gtm_tag (); }?>

Edit it from the WordPress editor or access via ftp to the Themes folder of your wordpress and edit it.

You must paste it just below the opening tag <body ..>. 
Some themes like Divi give you the option Add code to the <body> from the Theme Options, so you can enter it there.

The GTM for WordPress plugin Duracell automatically introduces the Google Analytics tracking code, so if you had previously installed a Google Analytics or GTM tracking code, delete it or you risk having it double.

Check in GA Real Time that your code works. 
Now go to the tab for Integration and brand traditional e-commerce:

With this, your WordPress and your Google Analytics account are ready.

We have some homework left in GTM:

Create a Universal Analytics tag, type “Transaction”. In Google Analytics Settings, select your Google Analytics ID. If it does not appear, you have not yet defined a variable with your ID. Go to Variables and create a new one of the type Google Analytics Configuration. Enter your ID and save it.

Above you see the mysterious term ” gtm4wp.orderCompleted ” that you entered in the tag you created. And it is that the label, what it does is to announce to Google Analytics a transaction just when the page loads this term. In addition, it passes to GA name of the product, units purchased, price and other parameters.

You can see this data in the Conversions / E-commerce tab of your Google Analytics, although for this you must wait a bit because it is not seen in Real Time and, therefore, it may take a few hours before it appears :