Adilo Blog

How to Add Google Analytics to Drupal Sites for Visitor Tracking & Site Performance Analysis

Unlock valuable insights! Discover step-by-step how to add Google Analytics to Drupal site for enhanced visitor tracking and site analysis.

Check out: Everything you should know about Google Analytics.

Have you ever heard of Drupal Google Analytics? Let’s take the ride into the excellent benefits your Drupal sites will get from integrating Google Analytics.

Let’s begin by exploring what Drupal is and how to integrate Google Analytics.

What is Drupal?

Drupal Google Analytics
Drupal Google Analytics

Drupal is a Content Management System (CMS) form that allows you to create, publish and edit websites, blogs, stores, etc. 

It is a Free and Open Source (FOSS) web service that allows anyone to copy, change and use its software. 

Its source codes are also open to anyone to make changes that can improve the design of the software. 

Drupal allows the personalization of websites and supports one-to-one marketing such that each web experience is tailored to every visitor’s likes based on their browsing history or activities on your website. 

Although Drupal is mighty yet customizable, it is still quite complex for beginners with little to no knowledge of programming languages. 

It may be beneficial but not required to know languages such as Hypertext Markup Languages (HTML) or Cascading Style Sheets (CSS) to enjoy the full features of Drupal’s customization prowess. 

Since we know that Drupal is used to create websites, what kind of websites does it support? These include:

  • Blogs or news and personal or business websites;
  • E-commerce sites or online stores;
  • Social media websites;
  • Portfolio, art, music sites, etc. 

The power of Drupal cannot be overemphasized. It is used and trusted by the world’s leading organizations such as:

Entertainment Weekly: An entertainment magazine that covers various niches from books, music, and movies to pop culture. This platform receives approximately 10 million visitors per month as of 2021.

Tesla: Elon Musk’s array of self-driving electric cars is showcased neatly in his billion-dollar company website powered by Drupal.   

University of Oxford: The website of this prestigious university provides a very sophisticated yet simple look that shows off the school’s information and allows you to find what you want quickly. Drupal gave it a perfect combination of design and efficiency. 

Others include NASA, Arsenal, Warner Bros. Etc. 

Like any other website on the World Wide Web, Drupal sites are created with visitors’ interests in mind. 

They are made to attract visitors, increase conversion rates, and boost traffic, sales, and revenue. 

Often the traffic on a website is the essential metric website administrators look out for. 

To boost your site’s performance and visitor tracking, you must use an analytics tool to track your site’s data and report it effectively. 

Google Analytics is known as the best website analytics tool available. It provides details about your website’s visitors, their location, how much time they spent on your web pages, etc. 

Essentially, the reports are visitor-focused to help you make well-informed decisions that can take your website to the next level. 

Before we discuss how to add Google Analytics to your Drupal account, let us talk about how to create an actual Drupal account. 

Let’s begin.

Handpicked For You:

How to Create a Drupal Account

The steps are as follows:

Step 1: Set Up Web Hosting

You need to choose a hosting web service that will make your website accessible on the internet. It would be best to consider the following factors before choosing one for your Drupal account. 

Drupal support: Ensure you choose a web host with the proper requirements to run Drupal. Bluehost provides a “One-Click-Install” option for content management systems such as Drupal. 

Page load speed: The average page load speed is 850ms. Ensure your web hosting service meets or exceeds this average. 

Uptime: Your uptime percentage is when your website is up and running. Your hosting web service is recommended to meet or exceed 99.9%, which is the industry’s standard. 

Customer support: Ensure you select a reliable and responsive web hosting service. 

Price: Choose the right web host based on your budget. 

Step 2: Drupal Installation

Drupal can be installed automatically using Bluehost or manually. 

AUTOMATICALLY USING BLUEHOST:

Drupal Google Analytics
Drupal Google Analytics
  • First, you must sign up for blue host by purchasing a domain. Log in to your account > “Advanced” > “Categories”, select “Portals/CMS”. Once open, use the search tab to find “Drupal.” Click on “Install now.” Next, click on “Quick install.”
Drupal Google Analytics
How to Set up Drupal Google Analytics
  • Input your admin username, password, and email and click on “Install.” An error message may pop up. Ignore that and check the box that follows. Click on “Install now.” This begins the installation process. 

Drupal Google Analytics
Drupal Google Analytics
  • When the installation is complete, your Drupal has been added to your Bluehost domain. Use the links to check out your new website and get to the login prompt. 
Drupal Google Analytics
How to Set up Drupal Google Analytics

Download and Install Drupal Manually

Go to the official Drupal website and select “Try Drupal.” Click on “Download Drupal zip.” 

Unzip the file, connect to an FTP (FileZilla) and upload the file. By doing this, the Drupal contents will be uploaded to the place where your domain is located. 

It would be best if you also created a database dedicated to your Drupal installation. Note down your database name, username, password, and host address. 

Step 3: Run the Installation

Go to your site’s domain and start the installation process.

  • Select the language you want your website to operate on. 
  • Choose a profile: this depends on your website’s appearance. It may be standard (pre-configured), minimal (not configured; for advanced users), or a demo version. 

This article will continue with the English language and the standard version. 

Drupal Google Analytics
How to Set up Drupal Google Analytics

  • After that, the installation will check whether your environment can run the software. If there are issues with the installation, they will pop up for you to address. 
  • Set up a database: input your database name, username, and password. 
Drupal Google Analytics
How to Set up Drupal Google Analytics

  • Under advanced options, you can change your host, port number, and table name prefix. 
  • Configure your site: input your site’s name, email address, and other essential information. Click on “Save and Continue.
Drupal Google Analytics
How to Set up Drupal Google Analytics
  • You can choose to either get notified of updates automatically or not. Click “Save” again. 

This successfully creates your Drupal website. 

Change Your Drupal’s Site’s Theme

Sign in to your Drupal website > Appearance > Install new theme.

However, you cannot install new themes directly from the main Drupal website. You should go to the official Drupal theme directory. Find the link at the top of the installation page. Here, select the theme of your choice and move on. 

Download the theme of your choice or copy the URL and upload it to your website. On the “Install new theme” section, select “Install and set as default” when your theme has been uploaded. 

Drupal Google Analytics
How to Set up Drupal Google Analytics

This installs and activates your chosen theme. 

Drupal Google Analytics
How to Set up Drupal Google Analytics

  • Configure your theme in the “Appearance”> “Settings” section. Here, you can make changes as you wish; set different backgrounds, colors, filters, logos, etc. When you are done, save the Configuration and notice the changes in the backend look. 
Drupal Google Analytics
How to Set up Drupal Google Analytics

Step 4: Create a Front Page

Please create a new front page for visitors to visit your website. To do this, go to “Content,” click on “Add content,” and then “Basic page.” Here, you can add your page title, summary for your page, body of the content, and choose the text format (HTML, etc.). 

Add and edit your content and define your URL aliases. You can do this by typing “/front page” in the answer space. 

Drupal Google Analytics
How to Set up Drupal Google Analytics

You can choose to preview or delete the page. Click on “Published” and select “Save.” 

To make your new page the front page of your website, go to Configuration> System > Basic site setting. Navigate to “Default front page” and input the same URL slug as before (/front page). Next, click on “Save.” 

Drupal Google Analytics
How to Set up Drupal Google Analytics

Step 5: Create a Menu List

  • You can create an about and add it to the menu. To do this, follow the same steps as the front page, but before publishing, Go to the “Menu settings” and tick the “Provide a menu link” box. 

Drupal Google Analytics
How to Set up Drupal Google Analytics

Fill in the prompts such as the menu link title; put “About or About Me.” description, which shows when you hover over the menu link. You can create other sub-items under the “Parent item” section. Also, you can choose the weight, which allows you to determine how you want your menu items to appear on your front page.

When this is done, click on “Publish.” This takes you back to your front page, where your menu item will be active.

If your menu is arranged incorrectly, click on the pin icon at the top right corner and select “Edit menu.” Drag and drop the items to rearrange them in the order you want. Next, click “Save.” 

Drupal Google Analytics
How to Set up Drupal Google Analytics

You can also set up a blog page, configure the view of your pages and delete or modify content on your website. 

These basics give you an idea of the power of Drupal and its functionalities. Other features of  Drupal include:

These are programs that add features to your website. The Drupal core software comes with some essential modules, while others can be added manually.

To do this, log in to your Drupal site, go to the official Drupal directory, download one of your choices or copy the URL. Head to “Extend” on your website and select “Install new module.” 

These are contents such as sidebars that can be added to your website. You can add different types of blocks, adjust their appearance, shape, size, location, etc. or create a custom block. You can manage them by clicking Home > Administration > Structure > Block layout. 

How to Add Google Analytics to Drupal

Now that we know how to create an essential Drupal website and add blog posts and other features, we need to know how to track the number of visitors your website receives, the site’s performance, and other activities. 

To do this, we must install and activate Google Analytics on the website. 

Let us dive into how to set up Google Analytics for the various versions of Drupal websites. The steps are as follows:

1. First, you must sign in to your Google Analytics account. 

To do this, log in to the official Google Analytics website. 

2. Add your Drupal to your Google Analytics account. 

To create a Drupal Google Analytics account, navigate to “Admin”> Create account > add your Drupal website. 

Drupal Google Analytics
How to Set up Drupal Google Analytics

This takes you to the “Data streams” section. Fill in all the necessary details, such as your Drupal website URL. 

If you use a Universal Analytics account, you can copy your measurement ID; if you use a Google Analytics 4 account, copy your tracking ID.

Want to know about Google Analytics 4? Check here

Drupal Google Analytics
How to Set up Drupal Google Analytics

3. Log in to your Drupal website and install the Google Analytics module. 

To do this, go to the Google Analytics module page on your Drupal website, install it, and activate it. 

Ensure you select the Drupal Google Analytics version of the module for your Drupal website. 

For example, Drupal 8 Google Analytics version for Drupal 8 website and Drupal 7 Google Analytics version for Drupal 7 website. 

For this guide, we will use the Drupal 8 Google Analytics version. 

Drupal Google Analytics
How to Set up Drupal Google Analytics

4. Paste the measurement or tracking ID

Go to your Drupal website > Configuration > Google Analytics > Web property. Paste the measurement or tracking ID you copied from your Drupal Google Analytics account.

You can make some changes as you wish and click “Save” when you are done. The Drupal 8 Google Analytics has been installed and set up on your website. 

5. Test that Google Analytics was correctly installed on your Drupal website. 

For this, Sign in to your Google Analytics account, navigate to the “Real-time” section and select “Overview.” 

If your Drupal analytics were set up correctly, you would see the traffic and statistics of your Drupal website. 

This process is followed if you use Drupal 7 or the latest Drupal nine websites. Once Everything is set, you can view your website’s metrics directly on your Google Analytics dashboard. 

Drupal Google Analytics
How to Set up Drupal Google Analytics

Handpicked For You:

Final Thoughts On Adding Google Analytics to Drupal

Drupal is a website builder that offers elegant websites for free. 

You can also add Google Analytics to your Drupal website to track your site’s performance and other activities. 

The Google Analytics module can be easily integrated into your Drupal website to get accurate data reports, which will, in turn, help you make data-informed decisions for the success of your website. 

Ultimately, your visitor conversion rates, traffic, and site performance increase. 

For more insightful content like this, kindly follow Adilo on Twitter

+ posts

I am what they call an Ambivert

Senior Content Editor and Strategist at ADILO | Website | + posts

Felix is the Senior Content Editor and Strategist at Adilo, where he harnesses his expertise in social video marketing, online video platforms, video editing, e-commerce, e-learning, and marketing to to help businesses drive results. With a keen eye for storytelling and a pulse on industry trends, Felix crafts actionable content that empowers brands to elevate their video marketing strategies and thrive in the digital landscape.

Felix is the Senior Content Editor and Strategist at Adilo, where he leverages his deep understanding of social video marketing, online video platforms, video editing, e-commerce, e-learning, and marketing to drive tangible results for businesses. With a passion for storytelling and a finger on the pulse of industry trends, Felix creates actionable content that empowers brands to elevate their video marketing strategies and achieve success in the dynamic digital world.

Experience

Felix has amassed extensive experience in the ever-evolving landscape of digital marketing. His journey has seen him wear many hats, from hands-on video editing and production to developing comprehensive video marketing strategies. This diverse background allows Felix to approach content creation with a holistic perspective, ensuring that every piece of content aligns with broader business goals.

Expertise

Felix’s expertise spans a wide spectrum within the digital marketing realm:

  • Social Video Marketing: Felix understands the nuances of different social media platforms and how to optimize video content for maximum reach and engagement.
  • Online Video Platforms: He possesses in-depth knowledge of various video hosting and sharing platforms, enabling him to guide businesses in selecting the right tools for their needs.
  • Video Editing: Felix is skilled in video editing techniques that captivate audiences and convey brand messaging effectively.
  • E-commerce and E-learning: He recognizes the power of video in driving sales and enhancing online learning experiences.
  • Marketing Strategy: Felix develops data-driven content strategies that align with business objectives and deliver measurable results.

Education

Felix holds a Bachelor’s degree in Marketing with a specialization in Digital Media. His academic foundation, combined with his practical experience, provides him with a well-rounded understanding of the digital marketing landscape.

Dream

Felix envisions a future where businesses of all sizes harness the full potential of video marketing to connect with their audiences on a deeper level. He is committed to empowering brands with the knowledge and tools they need to create compelling video content that drives growth and fosters lasting relationships with customers.



Related Articles