Drupal Module User Guide: Google Analytics Module

  • Tech
  • March 20 2018
  • 4 min read

One needs to research, assess, and evaluate in order to grow. While most people believe the basic formula for higher traffic is the higher number of keywords. Keyword ranking is one of the key measures of SEO and so an important part of the SEO strategy. But it is not the only way to measure the success of your SEO. One of the best ways to measure the success of your SEO is through Google Analytics Module!

Introduction To Google Analytics Module

Google Analytics is a powerful business tool which enhances Drupal’s potential, and you only need to integrate Google Analytics with your Drupal site. The key feature of the module is - it allows you to copy the tracking code you wish to track.

Installation Of Google Analytics

Step One: Sign up for Google Analytics and get your Tracking Id which is later needed when configuring the Drupal module. Click here to signup.

signing up at Google Analytics
Click on "Get tracking Id”

Get your “Tracking ID”  which would be like  “UA-99999999-99 ”.

Step Two: Install Drupal module to your Drupal site.
Installation by zip file extraction: Add Google Analytics module on your Drupal SitG and login to your website. Go to

Administrative toolbar > Extend tool > Install new module 

Go to the link to download Google Analytics module for your Drupal website.

Clicking on “Install new Module”
Click on “Install new Module” link  for this page 
Searching for Google Analytics module in
Search for Google Analytics
Google Analytics module profile in
Copy the zip link address
Version compatibility for Drupal 8 and Drupal 7
Select the version compatible with your Drupal version and just copy the link.

Now come back to your Drupal website and paste the link of Google Analytics version on the page obtained after clicking on ”add new module” in the form given below.

installing the module by copying the link
 Click on install

The installation will take place in a few seconds (or minutes). Go back to “extend” tool in the administrative toolbar and find your Google Analytics module in the statistics section.

Selecting the Google Analytics to enable it
Selecting the Google Analytics

Mark "Google analytics” and click on install at the bottom left of the page.

With this “Google Analytics“ module has been installed on your Drupal Site.

Click on the rightmost black icon
Giving the Drush command
Typing the drush command “drush dl google_analytics”


Type the drush command “drush dl google_analytics”
Module downloaded


Why Use Google Analytics?

Google Analytics is a business intelligence tool used for measuring and analyzing the traffic on a website, in fact, it is the best tool for this purpose. 

Google Analytics allows you to know the detailed information about the number of visitors from where they are to how much time they have spent on any selected webpage of your Drupal website. Everything. Since traffic on any website is the solid indicator of the popularity of the website as well as in engines and not only this it can also track and present hundreds of visitor-focused parameters. For any business oriented website, there is a vital role of “Google Analytics” for the good doing of that website.

It is the “Google Analytics“ integration that adds another dimension to Drupal. The “Google Analytics” is also known as the “lifeblood of the digital marketer”.

This module makes the use and customization of a long list of statistics figures at your fingertips, right in the Drupal user interface.

It adds the Google Analytic web static tracking system and an administration interface for it to your Drupal website.

With the integration of Google Analytics module, you can track site searches and track users selectively who have visited on the particular pages according to the configuration of this module.

Some Features of Google Analytics 

  • Tracks single/multiples domains 
  • Keeps an eye on the content being trapped (links and downloads).
  • Keeps an eye on the type of files being downloaded.
  • It enhances link Attribution support.
  • Tracking of change in URL fragments as page wise.


Configuring Google Analytics

In this content, we will be configuring the installed “Google Analytics” module continuing from the very first content of this article.
For this you have to select the “configuration” from the “administrative toolbar”  and then select ‘“system” > “Google Analytics”.

selecting Google Analytics from the Menu
Select Google Analytics from menu

Enter the in the “Web property ID”  which is the tracking Id you generated after signup on Google Analytics.

Enter the property id
Enter the property ID

Now you will be encountering with the “tracking scope items” and the configuration settings will be as follows:

Configuring the domains settings
Configuring the domain settings

As in the screenshot, you need to opt for “A Single domain” which is a default value , but its not mandatory, you can do that according to your site’s requirement.  

configuring the page settings
Configuring the page settings

Pagers settings include adding tracking to the specific page, just for Tracking Scope.

Configuring the Roles
Configuring the roles 
Configuring the users settings
Configuring the user's settings

Users settings will help the users to customize tracking on their account page, for now just select “No customization allowed “ option or you can also select another accordingly. 
Don’t forget to check “Track user id”. 

Changing the links and downloads settings
Changing the Links and downloads settings

The screenshot shows the “links and download settings”, you don’t need to go deep into it, just go with the basic settings and continue to the other settings. 

Changing the messages settings
Changing the messages settings

In the “message settings”  you can check the type of message you want to receive in a custom manner . For now , just go with the  “warning messages” . 

Changing the search and advertising setting
Changing the search and advertising settings

In the “search and advertising settings”  , you can track the type of searches being held , in the screenshot i have checked “Track internal search” . 

changing the privacy settings
Changing the privacy settings

 Enabling “ Anonymize visitor’s IP address, “ tells Google not to specify the tracker’s information i.e., IP address. 

saving all the configurations
Saving all the configurations

After saving the configuration your “Google Analytics module is all set to be used and perform its functionality, this is all for this content.

To Sum Up

With this module installation, you can do internal searching to monitor keywords being searched on your Drupal site and the path for this is:  

Behavior →  Site →  Search →  Overview

You can also go ahead of its basic settings and configurations in the Google Analytics module according to your business.