Google Analytics 4 (GA4)
Setup
Google Analytics offers both free and enterprise analytics tools to measure website and app data. The most recent offering is Google Analytics 4 (GA4) which has different setup steps to the older analytics package, Universal Analytics.
These steps assume that you use Google Tag Manager and the Design System tracking script to deliver analytics on your site.
-
Create your account and name it appropriately
-
Create your Property
-
Do not turn on Google Signals
-
Turn off ad personalisation
-
Switch Reporting Identity to Device-Based
-
Change the data retention to 14 months
-
Set up GA4 to only run on one domain
-
Turn on automated link tracking within enhanced event measurement
-
Turn off automated site search tracking (instead we do this as we transform site searches to lowercase using Google Tag Manager)
-
Copy your GA4 measurement ID and add it to the Google Tag Manager variables file along with the site’s domain name
As with any site, after doing all of this you’ll still need to sort out your reporting dashboards, cookies controls, privacy statements, manage your access to your accounts, etc.
Additional reading
- A Google Analytics 4 setup checklist
- Some details on how traffic sources work in Google Analytics 4
- Help with metrics and dimensions
Feedback, help and support
If you need help or support you can e-mail us at designsystem@gov.scot
There is a problem
Thanks for your feedback