How to Setup Google Analytics to Drupal 8

Here I am again, eager to share with you all about my recent experience using Drupal 8: the Google Analytics module! This module could easily get translated into: the temptingly flexible and rock-solid GA integration we have all been “craving” for while building/managing our Drupal sites. Or it could also get translated into: a powerful, web statistics tracking tool put right at our fingertips, easy to use and to customize right from Drupal's administrative interface. Drupal sure is all about simplicity and empowering the end-user! And where do you add that you get to setup Google Analytics to Drupal 8 in just 6 easy steps. Just follow my step-by-step tutorial here below:

“Fuel” Your Efforts With a Powerful Google Analytics Integration 

Data-fueled business decision making has been and will continue to be one of the most influential digital trends in 2017. But this is no news for you, right?

Your work “depends on” a data tracking system, whether you're:

  • a business owner: it's the data that you track, through this website statistics tracking tool, that will eventually help you turn your visitors into customers (or future partners); it's the charts that it delivers to you that will empower you with detailed information on which sections (content) on your website are performing well and which ones still need optimization

     
  • a digital marketer: empowering you with such a feature-rich tool Google Analytics practically enables you to section your audience into several segments, to examine each segment's particularities and preferences in order to tailor your content accordingly; a handy tool right at your fingertip in this era of hyper-personalization!

     
  • a Drupal developer: you, too, will get your share of major benefits from this website data tracking system; you'll get to “fuel” your page load “predictions” with the data that Google Analytics provides you with, not to mention the highly valuable information regarding the devices that your visitors use.

As you can see: Google comes with its share of “benefits” for each type of “drupalist”, no matter his/her role within a company. 

Probably the one (benefit) perfectly aligned with the latest digital trends is that of smoothing the whole process of “hyper-personalizing” the content delivered on your website.

And you can't properly tailor content without the right “fuel” of relevant, visitor-focused data, charts and all kinds of reports, right?

Well, the real news (for I bet that all my above “rambling” about Google Analytics hasn't been any “news” for you, after all) is that now Drupal 8, through its own dedicated module, makes the whole data tracking and analyzing experience far more accessible. It seamlessly integrates it to your whole Drupal website managing experience.

Another solid proof of Drupal 8's "eliminating the middlemen” and “empowering the non-technical end user” major goals!

It's easy to embed Google Analytics in your site, to setup Google Analytics to Drupal 8, and even easier to use it, since all the relevant data get displayed right in your Drupal user interface. 

And Now, Let's Virtually Setup Google Analytics to Drupal 8

 

1. First of All: Login to Your Google Analytics Account

Let's take baby steps! So, first things first: log into your GA account.

 

2. Next, Add Your Drupal Site To Google Analytics

Now that you're logged into your account, go ahead and add your Drupal 8 website (go to New Account... you know the procedure!).

Once you've reached the screen where you get your script and tracking ID to be embedded into your Drupal site, remember to leave it open and to... move to step no. 3 of this step-by-step setup Google Analytics to Drupal 8 "tutorial".

 

3. Login To Your Website 

Now it's time to leave your Google Analytics account (just for a few minutes), and to go to your Drupal admin login page. Type in your credentials and log in!

 

4. Install and Enable Your Google Analytics Module

Let's get this much-talked-about Drupal 8 module installed on your virtual website, shall we!

Access the Google Analytics module page and run the installation. In no time you'll have your more-then-useful data tracking module up and running on your Drupal 8 site!

Tip: remember to go for the module's Drupal 8 version!

5. Get Your Drupal Website's Tracking ID

Remember that you've left your Google Analytics screen opened at step 2? Go back to that specific tab and copy the Tracking ID that you'll need to embed in your website. It's in the "Property Settings" tab!

6. Configure Your Module and Setup Google Analytics to Drupal 8

All this back-and-forth might get you discouraged, but hang in there: there are just 2 quick and easy steps left and you're done!

Go back to your Drupal site and access Google Analytics through the Configuration tab. Paste the Google Analytics Tracking ID that you will have copied. Where? Well, in the Web Property ID field that you'll see there!

The module's installation is almost complete now: you just need to set the extra settings, to save the configuration and you're done!

You'll have a Google Analytics-fueled Drupal 8 site!

7. Now You Can Test Your Installation

Each Drupal 8 module's installation process should be followed by a proper testing session, right?

And this is what we'll do now (even if just virtually): access your Google Analytics account, then go to Overview, after you've clicked on the real-time tab.

It's there that you can check whether you've successfully installed and enabled your Google Analytics module to your site. The traffic-related data that you'll see there, relevant for your own Drupal website, will be the best indicator that you will have properly integrated Google Analytics with your Drupal site! That you've setup Google Analytics to Drupal 8!

 

What Conclusions Can We Draw?

What have we "learned" from this virtual setup Google Analytics to Drupal 8 tutorial?

That it's not just about the “data-generated superpower” that you'll supercharge your Drupal 8 website with, upon the installation of your Google Analytics module, but about “website statistics tracking done easy (and even easier to customize)”. About a data tracking tool which, moreover, it's far simpler to setup through this module, compared to the “standard”, discouragingly complex process of embedding Google Analytics tracking code to a website.