The implementation of Google Tag Manager (and Google Analytics via it)

Mar
13

Google provides users all over the world with their free-to-use tools in order to smooth the process of designing and managing different web resources, and to bring a better user experience when exploring the web. We have previously described the benefits of some of these services, such as Google Search Console and Google Analytics (Goals & Filters). Today we continue with Google Tag Manager.

What is Google Tag Manager (GTM) useful for?

Google Tag Manager makes it easier for you to add and update tags, or snippets of JavaScript code. This tool replaces hard-coded tags with its dynamic tags on your site or app, so there is no need to rewrite any code. This Tag Management System, with its understandable and friendly UI, is especially useful for digital marketers, IT specialists and webmasters.

How to implement Google Tag Manager?

First you have  to create an account in Tag Manager in “Admin” section, using your Google account. Give it the name of your company or brand.

create an account in Tag Manager

Choose the name and location of a container, which will eventually contain all of your tags.

create an account in Tag Manager

After the log-in confirmation, you will see a pop-up window with the code.

google tag manager

Here there are two possible ways to proceed:

  1. Copy the proposed code snippets and insert all of them at the beginning of your each page’s code.
  2. If you have too many pages, we recommend you save time and efforts by using the Google Tag Manager module. Install it as you normally install Drupal modules on your website and then enable it. Copy from the pop-up window just a container ID (highlighted in the screenshot) and paste it only once in the "Container ID" field on your Drupal site (Configuration→Google Tag Manager→Container ID). Then click the blue button "Save configuration."

Now, after the GTM is implemented on your website, you can connect it with GA.

How to install Google Analytics via Google Tag Manager?

To do this, go to your GTM account. Find “WORKPLACE,” then “Tags” and press the red button titled “NEW.”

install Google Analytics via Google Tag Manager

Choose “Tag Configuration.” You’ll see a list. Select “Universal Analytics,” which is listed first in “Featured” section. After clicking on “Universal Analytics” in GTM account, you will see this:

install Google Analytics via Google Tag Manager

Here in the field “Tracking ID” you have to paste the ID that you copied in your Google Analytics account. To do this, look at a screenshot below, go to your GA account, find “Property Settings” → “Basic Settings” → “Tracking Id” and copy the needed information.

 install Google Analytics via Google Tag Manager

After the tracking ID from the Google Analytics account is inserted in the GTM account, the work is completed. It’s pretty easy, isn’t it? You have successfully implemented Google Analytics through Google Tag Manager into your Drupal site. Now you can track data, see statistics, make conclusions and optimize your business. If you have any questions, feel free to ask our specialists.

Recent Posts

09
Mar
The Brightcove Video Connect module for Drupal 8

As you know, a web resource containing only textual content looks boring and requires more of a visitors’ time to process its information. By implementing video, you’ll increase the attractiveness of your site and therefore the average time spent by users on it.

06
Mar
The Easy Breadcrumb module in Drupal 8: improve your navigation easily

Websites of the future should be both easy to use and easy to build. We love to discuss how Drupal 8, the latest framework’s release, fits both criteria.

About us and this blog

 
Request a free quote
Our friendly Help Team can be reached Monday through Friday, from 9am to 6pm, Eastern European Time Zone.

Contact now

Get new blog posts by email: