Chat with us, powered by LiveChat

This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

Say hello to redesigned Cloudways, an empowering Startup Program, enhanced Staging, a new Let’s Encrypt Wildcard SSL certificate feature, and more. GET STARTED

How to Setup Google Analytics for Drupal 7

Updated on  6th November

2 Min Read
Reading Time: 2 minutes

Google Analytics is one of the most powerful analysis tool for websites available right now, so much so that it should be a vital part of a website owner’s arsenal. In my previous guide, I showed you how to setup Google Analytics on Drupal 8 site. In this guide, I’ll be taking you through the steps involved in setting up Google Analytics on your Drupal 7 site.

setup google analytics drupal 7

As with most of the other added functionalities for Drupal, we will be doing this through a dedicated Google Analytics module for Drupal 7. The process is pretty straight-forward and easy to implement. The steps involved are:

  1. Create Google Analytics Account
  2. Copy Tracking ID
  3. Install Google Analytics Module
  4. Paste Tracking ID in Module Configuration
  5. Test Analytics

Create Google Analytics Account

The very first thing you need is a Google Analytics account. If you don’t already have one, then you’ll have to sign up. After signing up for a Google Analytics account, you will have to add your website to it. You will need to add the following details:

  • Account Name
  • Website Name
  • Website URL
  • Industry Category
  • Reporting Time Zone
  • Data Sharing Settings

Copy Tracking ID

After you are done adding your site to the Google Analytics account, you will be presented with a Tracking ID. This is the ID you will use to integrate your Analytics account in your Drupal site. Copy the code and save it somewhere safe.

Install Google Analytics Module

Now, go here and download the Google Analytics Module for Drupal 7. Once downloaded, go to your Drupal site’s admin panel and install the module.

Paste Tracking ID in Module Configuration

After installing the module, navigate to it’s configuration. Here you will use the Tracking ID from your Analytics account. Simply paste the code in the Web Property ID field.

Test Analytics

Now, it’s time to reap the benefits of what we’ve sowed. To check if everything works as expected, go to your Analytics account’s dashboard. You should now be able to see the number of online users (one user in this case, i.e you).


Harnessing the power of Google Analytics can prove to be a very valuable skill for a webmaster. It is an extremely versatile tool that allows one to track each and every aspect of the website. Thanks to the Analytics module, the process of integrating Analytics into a Drupal site is made incredibly easy as seen from this guide. Hope you found this rundown useful. If you have any questions, please leave a comment below.

Share your opinion in the comment section. COMMENT NOW

Hamza Zia

Hamza is a Drupal Community Manager at Cloudways - A Managed Drupal Hosting Platform. He loves to write about Drupal and related topics. During his free time, he can be seen obsessing over Football, Cars, Android and Gaming.

Create interactive Drupal websites easily on the Cloud.

Host your website on optimized Drupal hosting servers.

Get Our Newsletter
Be the first to get the latest updates and tutorials.