Analytics

How To:  Setup Google Analytics 4

By on 19th May 2022

Reading Time: 4 minutes

  • LinkedIn
  • Twitter
Analytics

What Is Google Analytics 4 (GA4)?

Google Analytics 4 is the new reporting tool set to replace the Universal Analytics we all know and begrudgingly love.

You may or may not know, but if you’re reading this, I assume you do know, that Google are phasing out Universal Analytics to push everyone over to GA4 moving forward.

Here is the official announcement:

https://blog.google/products/marketingplatform/analytics/prepare-for-future-with-google-analytics-4/

What Is The Univeral Analytics / Google Analytics 4 Deadline?

As of July 2023, Universal Analytics will no longer be collecting data.  You will still have access to your historical data for a further 6 months or so, then it will be gone.  Forever.  

(Well not quite forever I can offer solutions that will store historical data indefinitely for reference, get in touch if this is of interest).

In any case, now is the time to get set up on GA4 so that when the deadline does come, you will have at least 12 months or so data to look back on for those year-on-year comparisons.

This guide assumes you already have a universal account setup.

It is the first instalment of several guides I will be producing to help you get set up on GA4 and configure your tracking – down the line there will be guides on events, conversions, ecommerce tracking, and all the other UA features you have got used to over the years.

This is part 1 – how to get configured and get basic page view tracking in place.

How To Create a GA4 Account

  1. In your existing Universal Analytics account, select the property you wish to get set up on GA4 and select “GA4 Setup Assistant”:

    GA4 Setup Assistant
  2. Click “Get Started”:

    Get Started
  3. Tick the box for “Enable data collection using your existing tags” and then “Create Property”. To be honest, at this stage, I’m not sure what happens whether this box is unticked or not. If you click “no thanks”, this guide has come to a premature end. Good luck.

    Create a bew Google Analytics 4 property
  4. Upon creation you will see the following screen. Click “See your GA4 Property” to get to the setup assistant.
    Note: The property ID displayed here IS NOT used for tracking purposes

    Google Analytics 4 Property Setup Assistant
  5. From the Setup Assistant, click through to “Tag Installation”:

    Setup Assistant
  6. Select your newly created “Data Stream” from the list:

    Data Streams
  7. Make A Note of Your Measurement ID:

    Web Stream Details

By default, your tag will track:

a. Page views
b. Scrolls
c. Outbound clicks
d. Site search
e. Video engagement
f. File downloads

How To Implement GA4 Page View Tracking On Your Website

If you wish to add the tracking code directly into your site’s template, click on:
“Tagging Instructions”-> “Add new on-page tag” -> Global Site Tag (gtag.js)
This will give you the code you need to copy and paste into your site, and is as follows:

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-XXXXXXXXXX');
</script>


Add this into the <head> section of the site and away you go.

How To Configure GA4 and Set Up Page View Tracking Using Google Tag Manager

If, like me, you are a Google Tag Manager Fanboy, you will want to set up your tracking using tags and triggers.

Again, this assumes you have a GTM account already set up on your site, and if you’ve got this far into this guide, then surely you have.

Create a new tag of type “Google Analytics: GA4 Configuration”:

Choose Tag Type


Here, you have 2 choices, you can add your measurement ID as a custom variable, or, enter it manually.  Either way, enter this into the “Measurement ID” box and tick “Send a page view event when this configuration loads”:

Config Tag

Then add a trigger for this to applied on “all pages”:

Trigger

And that’s it, submit your changes and you are good to go.

Once your account has collected some data, you have a whole new range of reports and configurations to get your head around:

GA4 Report

Stayed tuned for more GA4 config guides, and if you have any questions or need any assistance getting set up, please don’t hesitate to get in touch, am always happy to help.

Useful Resources

Get In Touch

Fill in the form below if you want to enhance your website's organic visibility