Google Analytics 4 fundamentally changed the way we measure a website. If you’re coming from Universal Analytics, the paradigm shift can be disorienting. This guide covers everything you need to start on solid ground.
Why GA4 is different from Universal Analytics
UA was built on sessions and pageviews. GA4 is built on events and parameters. Everything is an event: a pageview, a click, a scroll, a conversion.
This approach is far more flexible, but it demands more upfront thinking about what you actually want to measure.
1. Create the GA4 property
In Google Analytics, create a new property:
- Account → Property → Data stream
- Choose “Web”
- Enter your URL and the stream name
- Note your Measurement ID (format
G-XXXXXXXXXX)
Don’t spin up multiple streams for the same site without a reason. One web stream per property is the norm.
2. Deploy through GTM (recommended)
The recommended way to deploy GA4 is through Google Tag Manager.
GA4 configuration tag
// In GTM, create a "Google Analytics: GA4 Configuration" tag
// Measurement ID: G-XXXXXXXXXX
// Trigger: All Pages (Initialization)
Parameters to set every single time:
| Parameter | Value | Why |
|---|---|---|
debug_mode | true (dev only) | Turns on real-time debugging |
send_page_view | false | Manual control over pageviews |
page_view tag
Create a separate GA4 Event tag for pageviews:
// Tag: GA4 - page_view
// Event Name: page_view
// Trigger: All Pages (Page View)
Splitting the config from the page_view gives you far more control on SPAs.
3. The automatic events worth knowing
GA4 collects some events automatically:
session_start— start of a sessionfirst_visit— first-time visitorpage_view— ifsend_page_view: truescroll— 90% scroll depthclick— outbound clicks
Plus the Enhanced Measurement events (turn them on in the stream settings):
file_download— downloadsvideo_start,video_complete— YouTube videosform_submit— form submissions
4. Structuring custom events
The GA4 naming convention: snake_case, verb_object.
purchase ✅
add_to_cart ✅
newsletter_signup ✅
ButtonClick ❌ (PascalCase)
btn-click ❌ (kebab-case)
Event parameters
Each event can carry up to 25 parameters:
gtag('event', 'newsletter_signup', {
source: 'hero_cta',
page_location: window.location.href,
page_title: document.title,
});
A critical gotcha: to show up in your reports, parameters must be registered as Custom Dimensions under GA4 Admin → Custom Definitions.
5. Set up conversions
In GA4, conversions are configured under Admin → Events → Mark as conversion.
The events worth marking:
purchasegenerate_leadnewsletter_signupform_submit
GA4 has no Goal Funnels like UA did. Conversion funnels are built in Explore → Funnel Exploration.
6. Verify with DebugView
To check your setup in real time:
- Enable debug mode through GTM Preview
- Open GA4 → Configure → DebugView
- Browse your site
- Events show up in near real time
// You can also force debug_mode from the URL
// Add ?gtm_debug=x to your URL in GTM Preview
7. Essential settings to configure
Data retention
By default, GA4 keeps data for 2 months. Change this right away:
Admin → Data Settings → Data Retention → 14 months
Internal IP filters
Admin → Data Streams → Configure tag settings → Define internal traffic
Add your office/VPN IPs so they don’t pollute your data.
Connect to Google Search Console
Admin → Product Links → Search Console Links
This link pulls organic search data straight into GA4.
Conclusion
A solid GA4 setup takes time, but it’s an investment that pays off. The two most common mistakes:
- Deploying on autopilot — never checking that events actually come through
- Ignoring Custom Dimensions — collecting event parameters that never surface in your reports
In an upcoming article, we’ll look at how to export raw GA4 data to BigQuery for deeper analysis.