Google Analytics
This guide provides a step-by-step process for setting up Google Analytics 4 (GA4) on your website, including how to integrate tracking in compliance with GDPR requirements. You'll learn how to create a GA4 property, find and use your Measurement ID, and configure your tracking code to activate only after user consent is given. This document also explains how GDPR compliance may impact data accuracy due to cookie consent restrictions.
For additional support, refer to these helpful resources:
Setting Up Google Analytics 4 (GA4)
Step 1: Create a Google Analytics Account
Go to Google Analytics and sign in with your Google account.
Click on Admin in the lower-left corner.
Under Account, select Create Account and follow the prompts to set up your account name and configure data sharing settings.
Step 2: Create a GA4 Property
After creating the account, click Create Property.
Enter the property name, select the reporting time zone, and currency.
Follow prompts to configure business details, then click Create.
Step 3: Get Your Measurement ID
In your GA4 property, go to Data Streams and select Web.
Enter your website URL and a stream name, then click Create Stream.
In the stream details, locate the Measurement ID at the top right (it starts with "G-").
Copy this Measurement ID — you’ll need it to set up tracking on your site.
Step 4: Add the Tracking Code with Cookie Consent Tag
Open Wavecast Publishing to your Settings > Analytics page.
Paste in the Measurement ID in the Measurement ID input field.
In the
<head>
section of this page, paste the tracking code.Modify the code by adding
data-cookieconsent="analytics"
to the script tag if you're using a cookie consent solution. The updated tag should look like this:Save and publish your changes.
Enabling User-ID in Google Analytics 4
To accurately track user interactions across different devices and sessions, you can enable User-ID in Google Analytics 4. This feature allows you to gain deeper insights by associating multiple events and sessions with a unique, persistent ID for each user.
IMPORTANT: Before implementing User-ID on your website, you must first enable User-ID in your GA4 account settings. Without enabling it, User-ID tracking will not function as intended.
Important: GDPR Compliance
If you are implementing Google Analytics, you must ensure compliance with EU GDPR laws.
This means that you are required to implement a cookie management solution to inform users and obtain their consent for data collection.
To comply:
Use a cookie consent management tool that allows users to accept or reject cookies.
Ensure that analytics tracking only activates after the user has given explicit consent.
Clearly communicate in your privacy policy how Google Analytics is used and what data is collected.
Due to these regulations and the requirement for cookie consent, your Google Analytics data may not be fully accurate. Find out more about types of cookie and how acceptance rates affect website analytics.
Note that the hub dashboard provides some information about page views and overall hub activity. This is GDPR compliant, as rather than tracking the user, we are analysing the pages themselves instead and, where applicable, have anonymised the data.
Last updated