Data is valuable. Collecting reliable data lets you pilot your web marketing strategy with informed decisions. Without data, you’re navigating blindly. Tracking the behavior of your users will enable you to collect information about the following:
- Where do they come from?
- What are they looking for on your site?
- Why did they leave without buying?
But more is needed to collect information. The challenge is to analyze it optimally with web analytics.
Google Tag Manager is a tag management tool. This tool allows you to centralize all your tags in a container, a unique location. This way, you avoid using too much code on your site.
GTM allows for precisely tracking user behavior on your website or mobile application. Generally not very useful on a blog or corporate site, it is essential on e-commerce sites (where Google Analytics reaches its limits).
To collect data, tracking code, audience marker, or title) must be placed on all site pages.
Many tags are available to analysts, thanks to the different tracking tools (Google Ads tracking code, Google Analytics, Facebook pixel, etc.). These tags, therefore, send information to Google Tag Manager.
Google Tag Manager has four primary functions:
- Integration of tracking codes without modifying the source code of your WordPress site. The principle of Google Tag Manager simplifies: add two pieces of code to your site, and tag management is done from the GTM interface. This code contains a data layer where information about visitors and behavior on the site is placed. This tool has significant advantages in efficiency and speed.
- Adding tags affects loading time. Loading speed is a crucial criterion for Google’s ranking of your site. The GTM system preserves page loading time.
- Google Tag Manager allows you to add tags that will send information to Google Analytics without touching the code. You won’t need a web developer. However, the services of a data analyst may be helpful for a more complex project.
- Google Tag Manager allows you to measure the impact of your web marketing campaigns. Data is an integral part of the process of managing a campaign. GTM allows for precise statistical measurements to improve the distribution and allocation of a marketing budget.
How does Google Tag Manager’s dataLayer work?
The dataLayer is a JavaScript object that sends your website’s information to your GTM container. This information is then exploited by assigning values to the variables you have selected.
To understand the data layer, it is essential to understand the architecture of a container.
A container is a script that contains tags (for example, the Google Analytics tag). A trigger triggers the title. The trigger will send up information according to the selected variable.
Container -> Trigger -> Tag -> Variable
Google Tag Manager and GDPR: What about user data?
You have certainly noticed that for some time, more and more websites have asked you for your information when you browse their site. Following the GDPR law passed in 2016, then implemented in 2018, websites must inform their users about the data collected. Only now, some respected this law, as few sanctions had been taken.
However, in early 2021, the CNIL issued a reminder: “.”
The Axeptio solution:
Allows you to manage user consent;
Allows you to use their tool with a “user-first” approach to cookie management, respecting the law and user, with well-designed pop-ups, etc. This solution allows for a reasonable rate of cookie acceptance. You can continue to measure the performance of your site and your campaigns.
How does the Axeptio cookie acceptance solution work?
Here is a schematic representation of the traditional use of GTM:
Website > GTM > Trigger (All pages by default) > Tags > Variables
When using Axeptio:
Website > GTM > Axeptio > Custom Event (cookie accepted: Yes/No) > Tags (triggered if the user clicked on Yes) > Variables
How to use the solution?
- Create an account on Axeptio.
- Retrieve the code to be integrated into the footer of your pages.
- Add the code to GTM, selecting the “All Pages” trigger.
- Add the tags you want to use on your Axeptio back-office (Facebook Pixel, GA, etc.).
- Add the custom events that will trigger your tags in GTM. In the “Event Name” field, add the name of the title in this format: axeptio_activate_{{tag_name}}. You will find the name of your tag on your Axeptio back office.
What are the Google Tag Manager variables to know for your website?
There are many variables available natively on GTM. Here are some of the most valuable and well-known variables used on Google Tag Manager:
- Pages: tracking searches in the search bar of your website;
- Clicks: tracking clicks on buttons (add to cart, buy, or other controls), tracking contact links (a mailto: or tel: in the menu, for example), tracking clicks on affiliate links, etc.;
- Forms: tracking contact or quote requests (abandonment, form submission), tracking checkbox selections, dropdown field selections, etc.;
- Error: it is possible to trigger the variable if a mistake occurs in the URL or to trigger the variable if there is an error in the page’s source code.
What are the Google Tag Manager tags to know for your website?
Google Tag Manager centralizes the tags of four essential tools to know for your site:
- Google Analytics is undoubtedly the most important way to measure a website’s performance in web marketing. It identifies your key performance indicators (KPIs). Statistics related to past marketing events are instrumental data to optimize your future web marketing campaigns.
- The pixel tag allows Facebook to collect user data from your site and link this information to Facebook Ads campaigns. Among other things: conversion tracking, audience targeting optimization, retargeting, etc.
- Google Surveys have a survey feature to measure your website’s users’ satisfaction level. Google Surveys website satisfaction offers standard surveys. The survey is distributed to 500 respondents.
- Conversion Linker makes it easier to collect data related to actions you have defined as conversion actions.
- Google Ads Remarketing aims to engage in remarketing campaigns and thus stimulate new engagement from potential customers visiting your WordPress site.
How to install Google Tag Manager?
To set up and install GTM, first, you must log in to the unified advertising platform and click to create your GTM account. You will need to have at least a Gmail account. Using your Google Analytics account is also recommended if you have one. Several fields are required. Accept the conditions, including those related to GDPR data protection.
A window will open and submit two lines of code, “head” and “body,” to manually insert into your website. If you want to do it without a plugin, do the following:
- The “head” code line should be injected into the <head> tag of your site (as high as possible in the head tag). If you have a WordPress site, ensure your theme can accommodate the snippet provided by Google (compatibility). The head tag is generally common to all pages of your site. Thus, when you put the GTM script in it, it deploys throughout the area at the same time.
- The second piece of code, “body,” should be integrated into the <body> tag of the site, present in the “index.php” file.
You can use an extension if you prefer not to touch the code. Install it from your WordPress CMS Admin interface.
- Click on “Plugins” then “Add new.”
- Enter “Google Tag Manager” (top right).
- Install the extension; remember to activate it.
- Enter your GTM ID (the Google Tag Manager ID is on the homepage and starts with GTM).
After registering the changes, Google Tag Manager will deploy on your site!
If you are on PrestaShop, you can install the Google Tag Manager Enhanced Ecommerce (UA) – Pro extension.
After purchasing the module (priced at €70 on the PrestaShop store), click “Install custom hooks.” This allows for automatic deployment throughout the site. For configuration:
- Enable Google Tag Manager: YES.
- Google Tag Manager ID: add your GTM-145… ID retrieved from your GTM account.
- Enable Automatic Re-send Orders: YES.
- Always display variant ID: NO.
Regarding the User ID, we recommend keeping it in the dataLayer. As for remarketing, you will enable its configuration by clicking on YES.
Installing GTM script on Shopify
There are several ways to install the GTM script on Shopify. If you have already installed the Google Analytics script, go to Settings > Online Store > Preferences > Google Analytics.
If and only if Google Analytics is installed on your Shopify, a “Add custom JavaScript code” button will be visible under the “Google Analytics Account” field. You can then add your GTM script there.
If you have never set up GA on your Shopify site, you must modify the “theme. liquid” and “checkout. liquid” files.
To do so:
- Settings > “Online Store” > “Theme” > “Action” > “Edit code.”
- Add your GTM script just after your “head” tag begins. Save. Do the same in the “checkout. liquid” file.
- Add your GTM script just after the front of your “body” tag. Save. Do the same in the “checkout.liquid” file.
You can then verify your installation with the Google Tag Assistant Chrome extension.
GTM configuration
Once GTM is installed on your site, you must configure it: add tracking tags, custom events, etc.
SEARCH-Factory is a web marketing agency specializing in Paid Media, SEO, website development, and web analytics. We can assist you with your Google Tag Manager setup, tagging plans, and the configuration of your Google Analytics.
Feel free to contact us for the implementation of an optimal web analytics strategy while respecting the framework of personal data protection laws.