How to Integrate Google Analytics with Drupal

Google Analytics is a powerful business tool that generates details statistics about a website’s traffic, traffic sources, conversions and sales. When paired with your Drupal website, Google Analytics allows user experience designers and marketers to gather important information about your website that can be used to make continuous improvements and drive positive change for your business. 

Google Analytics

Why Use Google Analytics

Google Analytics is the most widely used website analytics tool. The tool can support high-level dashboards for casual users while also being able to drill down into more in depth data for users that want to dive deeper into the tool.

Some features of Google Analytics include:

  • Audience demographic reporting including language, location, device and operating system.
  • Acquisition reporting to understand where your users are coming from including traffic source reports.
  • Event tracking to measure activities on your website.
  • Goal tracking to measure sales, downloads, conversions or your own custom business goals.
  • In-site reporting to understand how your users are engaging with the content on your site to increase your conversion rates.
CTA 1 - Don't Wait to MIGR8

Don’t Wait to MIGR8

Let Duo guide you on the right path to Drupal 8.

Integrating Google Analytics with Drupal

Luckily, Drupal makes it easy for you to gain insights from Google Analytics with the Google Analytics module. This module adds the Google Analytics tracking code to your website in the easiest and most admin-friendly way possible.

The biggest advantage to using this module as opposed to integrating Google Analytics on your own is that you don’t need to add the tracking code individually to different pages on your website. By pasting your Google Analytics tracking code directly into the module’s configuration page, you will be adding it to your entire website in one step.

Before starting to integrate Google Analytics with your Drupal site, you must already have an analytics account. If you don’t have an account set up, follow these quick steps:

  1. Go to
  2. Click “Sign In” in the top right corner and choose “Google Analytics” from the dropdown menu
  3. Click “Sign Up” and follow the steps to create your new account
  4. Follow the instructions to set up web tracking

After setting up your account, take your Tracking ID and add it to the Google Analytics module by going to the “Configuration” tab. Under General Settings, find the “Web Property ID” and add your Tracking ID from Google Analytics.

For most users, the default module settings should be enough to get you started. If you’d like to customize the modules, you can explore the different tabs in the “Tracking Scope” section.

After enabling and configuring the module, you will be able to track your website data using Google Analytics.

CTA 5 - We Build Digital Experiences - Our Recent Work

We Build Digital Experiences

Duo is a web design agency that expertly creates custom web solutions for our clients