Install and configure Google Analytics module

Overview on how to install and configure Google Analytics module on your Drupal website

It is important to generate a full backup of your Drupal website before any new installations or major changes on it. This way, if something goes wrong with your website, you will always have a working copy that can be restored. This is a good practice, which will allow you to edit and manage your Drupal installation without worrying that it may get corrupted.

 

Drupal backup

We have an excellent tutorial on how to generate a full backup of your Drupal website and the database it is using. Read more

 

This tutorial will review the process of installing Google Analytics module on your Drupal website and then configure it properly.

 

Step 1 Download the module

The Google Analytics module is available via the official Drupal website. There is a modules section, where you can locate the module and download it on your personal computer. The download link for Drupal 7.x is available at the bottom of the page.

 

Download Google Analytics for Drupal

 

Step 2 Install the module

Once you download the module on your local computer, you need to install it on your Drupal website. Log into your website as administrator and click on the Modules tab from the main menu.

 

Access modules menu in Drupal

 

Click on the Install new module button at the top of the page.

 

Install a new module in Drupal

 

Upload the module via one of the following two options:

 

  • Install from a URL: You can simply enter the URL to the download page of the module.
  • Upload a module or theme archive to install: Upload the downloaded archive of the module.

 

Upload module package in Drupal

 

Click on the Install button to complete the process.

 

Step 3Activate the module

Access the Modules tab from the main menu again and check the Enabled box next to Google Analytics.

 

Activate Google Analytics in Drupal

 

Scroll down to the bottom and click on the Save configuration button.

 

Step 4 Configure the module

Access the Modules tab from the main menu again and then locate the Google Analytics module and click on Configure.

 

Configure Google Analytics in Drupal

 

Enter your Web Property ID and click on the Save configuration at the bottom to keep the changes.

 

Set web ID for Google Analytics in Drupal