Universal Analytics was discontinued in July 2023. This guide gives you step-by-step instructions for setting up GA4.
Setting up GA4 now means you will have data ready for several months by the time UA stops working.
Getting the Measurement ID
Admin → Data Streams → Web → copy the Measurement ID for Google Tag Manager setup.
Data retention settings
GA4 data expires after 14 months. Admin → Data Settings → Data Retention → 14 months.
Event tracking
GA4 configuration tag in GTM
Create a new GA4 configuration tag with the Measurement ID and an Initialization - All Pages trigger.
Filtering IP addresses
Define internal traffic rules to exclude office IP addresses.
Form tracking
- Built-in trigger - GTM automatic form detection
- Thank-you page - track the URL that signals a successful submission
- Visible element method - monitor success messages
Additional events
- Phone / email clicks: triggers on links with tel: or mailto:
- Button clicks: Click Classes variable
Conversion events
Mark events as conversions in GA4 Exploration reports.