Topic 29 of 30 · Digital Marketing Essentials

Topic 29 : About GA-4

Lesson TL;DRTopic 29: About GA4 📖 8 min read · 🎯 advanced · 🧭 Prerequisites: understandingmobileadvertisingappmarketing, introduction Why this matters Here's the thing — most beginners think analytics means co...
8 min read·advanced·google-analytics · ga4 · event-tracking · analytics

Topic 29: About GA-4

📖 8 min read · 🎯 advanced · 🧭 Prerequisites: understanding-mobile-advertising-app-marketing, introduction

Why this matters

Here's the thing — most beginners think analytics means counting how many people visited your website. And that's where the old tools stopped. But GA-4 is a completely different mindset. It tracks what people do — every tap, every scroll, every video play — not just where they land. It works across your website and your app as one connected picture. And because the internet is moving away from cookies, GA-4 was built from scratch for that future, using machine learning to surface patterns you wouldn't even know to look for. Once you understand GA-4, you stop guessing about your audience and start making decisions based on what's actually happening.

What You'll Learn

  • Understand how GA-4's event-based model differs from Universal Analytics' session-based approach
  • Create a GA-4 property, install the tracking code, and configure Enhanced Measurement
  • Explore GA-4's core features: event tracking, cross-platform analysis, machine learning insights, and custom reporting
  • Apply best practices to align GA-4 goals with business objectives and act on predictive metrics

The Analogy

Think of Universal Analytics as a turnstile counter at a stadium entrance — it tells you how many people walked in and how long they stayed, but nothing about what they did once inside. Google Analytics 4 is more like a team of attentive ushers stationed throughout every section, every concession stand, and every exit, each carrying a radio that reports every interaction back to a central command room. They follow the same fan whether she arrived by subway or car, bought nachos in section A or merch in the team store, and left via the north gate. The command room doesn't just log events — it notices patterns, predicts which fans are most likely to buy season tickets, and flags anomalies the moment they appear.

Chapter 1: Introduction to Google Analytics 4

Google Analytics 4 (GA-4) is the next generation of Google Analytics, built to address the evolving needs of businesses in a digital-first world. It delivers a more comprehensive view of customer journeys and offers advanced insights powered by machine learning.

Key Differences Between GA-4 and Universal Analytics

GA-4 introduces several fundamental changes over Universal Analytics:

  • Event-Based Tracking: GA-4 uses an event-based data model instead of a session-based one, allowing more flexible and granular tracking of user interactions. Every action — a click, a scroll, a purchase — is an event with its own parameters.
  • Cross-Platform Tracking: Seamlessly tracks user interactions across websites, mobile apps, and other digital platforms under a single property.
  • Enhanced Measurement: Automatically tracks key events (e.g., scrolls, outbound clicks, site search) without additional configuration.
  • Machine Learning Insights: Utilizes machine learning to provide predictive insights and identify emerging trends before they become obvious.
  • Privacy and Compliance: Designed with privacy in mind, supporting cookie-less tracking and user consent features to meet modern regulatory requirements.

Example: GA-4 can track a user's journey from a mobile app to a website, providing a complete view of their interactions with your brand — something Universal Analytics could not do natively.

Chapter 2: Setting Up Google Analytics 4

Getting started with GA-4 involves creating a new property and configuring your tracking pipeline.

Step 1 — Creating a GA-4 Property

  1. Sign in to Google Analytics: Go to https://analytics.google.com/ and sign in with your Google account.
  2. Create a New Property:
    • Click the Admin tab, then Create Property.
    • Select GA-4 as the property type.
    • Enter your property name, reporting time zone, and currency.
    • Click Next and provide your business information.
    • Click Create to finalize the new GA-4 property.

Example: Create a GA-4 property named "FitLife Gear Analytics" for a fitness e-commerce site, setting the time zone to your primary market and currency to USD.


Step 2 — Installing the GA-4 Tracking Code

  1. Get the Tracking Code:
    • In your GA-4 property, go to Data Streams and select your data stream (web or app).
    • Click Tagging Instructions and copy the GA-4 tracking snippet.
  2. Add the Tracking Code to Your Site:
    • Paste the GA-4 tracking code into the <head> section of your website's HTML.
    • If using a CMS like WordPress, use a plugin (e.g., Site Kit by Google) to inject the code automatically.
<!-- GA-4 Global Site Tag (gtag.js) — replace G-XXXXXXXXXX with your Measurement ID -->
<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>

Example: Paste this snippet into the <head> of your fitness website's HTML. Within minutes, GA-4 will begin recording page views and enhanced measurement events.


Step 3 — Configuring Enhanced Measurement

GA-4 automatically tracks key interactions when Enhanced Measurement is enabled.

  1. Access Enhanced Measurement:
    • Navigate to Data Streams inside your GA-4 property.
    • Click on your data stream and confirm that Enhanced Measurement is toggled on.
  2. Customize Events:
    • Review the automatically tracked events — page views, scrolls, outbound clicks, site search, video engagement, file downloads — and toggle any on or off as needed.

Example: Enabling Enhanced Measurement on a fitness website automatically records scroll depth, outbound clicks to affiliate partners, and internal site searches, all without writing a single line of custom JavaScript.

Chapter 3: Exploring GA-4 Features

GA-4 provides a rich feature set for deeper audience insights and flexible analysis.

Event-Based Tracking — The Flexibility

GA-4's event-based model lets you track virtually any user interaction with precision.

Key Concepts:

  • Events: Discrete user interactions to track — clicks, video views, form submissions, add_to_cart, purchase, etc.
  • Parameters: Additional contextual data attached to an event — e.g., button_color, video_title, item_id, value.
  • User Properties: Persistent attributes or characteristics of a user — e.g., age bracket, gender, membership status, loyalty tier.
// Fire a custom GA-4 event with parameters
gtag('event', 'add_to_cart', {
  currency: 'USD',
  value: 49.99,
  items: [{
    item_id: 'SKU_FLG_001',
    item_name: 'FitLife Resistance Bands',
    item_category: 'Equipment',
    quantity: 1,
    price: 49.99
  }]
});

Example: Track add_to_cart and purchase events on an e-commerce site to understand user behavior throughout the conversion funnel.


Cross-Platform Analysis — The Holistic View

GA-4 unifies data from websites, mobile apps, and other digital touchpoints into a single, coherent view.

Key Benefits:

  • Unified Reporting: Combine data streams from web properties, Android apps, and iOS apps inside one GA-4 property.
  • User-Centric Insights: Understand how users interact with your brand across different devices and sessions — identified by User ID or Google Signals rather than cookies alone.

Example: Track a user who discovers the FitLife Gear brand in a mobile app, browses on a tablet, and completes a purchase on a desktop — all attributed to the same user journey in a single GA-4 report.


Machine Learning Insights — The Predictive Power

GA-4 leverages Google's machine learning to surface predictive insights and detect data anomalies automatically.

Key Features:

  • Predictive Metrics: Metrics such as purchase probability (likelihood of a user transacting within 7 days) and churn probability (likelihood of a user becoming inactive).
  • Anomaly Detection: Automatically flags significant, statistically unusual changes or trends in your data.
  • Automated Insights: Surfaced in the GA-4 home dashboard, these highlight important patterns — traffic spikes, conversion drops, emerging segments — before you manually discover them.

Example: Use the purchase probability predictive metric to build an audience of high-intent users, then target them with a personalized remarketing campaign in Google Ads.


Custom Reporting and Analysis — The Customization

GA-4's Explorations hub gives analysts a flexible workspace for tailored reporting.

Key Features:

  • Exploration Reports: Build custom, ad-hoc reports using a drag-and-drop interface with multiple techniques: free-form, funnel exploration, path exploration, segment overlap, user lifetime, and cohort exploration.
  • Segments: Define subsets of users based on criteria such as demographics, behavior, or acquisition source for comparative analysis.
  • Funnels: Visualize user journeys step by step and pinpoint exactly where drop-off occurs.

Example: Use a funnel exploration report to analyze the checkout flow on the FitLife Gear site — identifying that 42% of users abandon between the cart and the shipping-info step.

Chapter 4: Best Practices for Using GA-4

Regularly Review and Update Goals

Ensure your GA-4 conversion events and key events align with your current business objectives.

Tips:

  • Set Specific Goals: Define clear conversion events that map directly to business KPIs — e.g., purchase, lead_form_submit, newsletter_signup.
  • Monitor Progress: Schedule a recurring review (weekly or monthly) of conversion performance and adjust event configuration as campaigns or priorities evolve.

Example: Set a key event on purchase to track average order value growth, then review it monthly against your revenue targets in GA-4's Monetization report.


Leverage Enhanced Measurement

Take full advantage of GA-4's automatic event tracking to reduce implementation overhead.

Tips:

  • Enable Enhanced Measurement for all active data streams from day one.
  • Review Tracked Events Regularly: As your site evolves (new video content, new download assets), confirm the right Enhanced Measurement toggles are active.

Example: Enable file download tracking under Enhanced Measurement to automatically log every PDF guide download on a fitness website — no custom event code required.


Utilize Machine Learning Insights

Act on GA-4's predictive metrics and automated insights rather than waiting for manual analysis.

Tips:

  • Monitor Predictive Metrics: Check purchase probability and churn probability weekly in the GA-4 audience builder.
  • Act on Insights: Use automated insights surfaced on the GA-4 home screen to inform campaign adjustments and A/B test hypotheses.

Example: Use the churn probability audience to trigger a re-engagement email sequence for users GA-4 predicts will go inactive within the next 28 days.


Customize Reports and Dashboards

Build reporting environments that surface the metrics your team actually needs, reducing noise and improving decision speed.

Tips:

  • Use Exploration Reports: Build and save custom explorations for recurring analyses — weekly funnel reviews, cohort retention checks, source/medium breakdowns.
  • Share Dashboards: Use GA-4's built-in sharing features to distribute custom reports and collections with teammates for collaborative, data-aligned decision-making.

Example: Create a custom collection in GA-4 that surfaces traffic sources, conversion rates, and average order value in one view — pinned to the top of the left-nav for the entire FitLife Gear marketing team.

🧪 Try It Yourself

Task: Fire a custom sign_up event from a web page and verify it arrives in GA-4's real-time report.

  1. Add the GA-4 snippet to an HTML file (use your real Measurement ID or the GA-4 DebugView with a test property).
  2. Add a button that fires a custom event when clicked.
  3. Open GA-4 → Reports → Realtime and click the button.

Starter snippet:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>GA-4 Event Test</title>
  <!-- Replace G-XXXXXXXXXX with your Measurement ID -->
  <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>
</head>
<body>
  <button id="signupBtn">Join FitLife</button>
  <script>
    document.getElementById('signupBtn').addEventListener('click', function () {
      gtag('event', 'sign_up', {
        method: 'button_click',
        campaign: 'homepage_hero'
      });
      console.log('sign_up event fired');
    });
  </script>
</body>
</html>

Success criterion: Within 30 seconds of clicking the button, you should see a sign_up event appear under Event count by event name in the GA-4 Realtime report. The browser console should also log sign_up event fired.

🔍 Checkpoint Quiz

Q1. What is the fundamental architectural difference between GA-4 and Universal Analytics in how they record user activity?

A) GA-4 uses session-based tracking; Universal Analytics uses event-based tracking B) GA-4 uses event-based tracking; Universal Analytics uses session-based tracking C) Both use event-based tracking, but GA-4 requires manual configuration for all events D) GA-4 only tracks mobile apps; Universal Analytics only tracks websites

Q2. A developer adds the following code to a checkout page. What will GA-4 record, and what additional information is attached to the event?

gtag('event', 'purchase', {
  transaction_id: 'T_12345',
  value: 89.95,
  currency: 'USD',
  items: [{ item_name: 'Yoga Mat Pro', quantity: 1, price: 89.95 }]
});

A) A session hit with no parameters; GA-4 does not support custom data on purchase events B) A purchase event with parameters: transaction_id, value, currency, and an items array C) A page_view event triggered by the checkout URL D) An Enhanced Measurement scroll event because the user reached the bottom of the page

Q3. Your GA-4 dashboard shows a churn probability audience with 1,200 users flagged as likely to go inactive within 28 days. How would you use this insight in a practical marketing workflow?

A) Delete these users from your CRM because they are not worth targeting B) Export or sync this audience to Google Ads or an email platform and run a re-engagement campaign before they churn C) Disable Enhanced Measurement for this segment to stop tracking them D) Increase paid acquisition spend to replace them with new users

Q4. A teammate says: "We don't need to write custom JavaScript — GA-4 will automatically track scrolls, outbound clicks, and file downloads for us." Under what condition is this statement true?

A) It is always true; GA-4 tracks these events by default in every configuration B) It is true only if Enhanced Measurement is enabled for the data stream and the relevant event toggles are on C) It is true only for mobile apps, not web data streams D) It is never true; all custom events require manual gtag('event', ...) calls

A1. B — GA-4 is event-based (every interaction is a discrete event with parameters), whereas Universal Analytics modeled data around sessions and page views. This shift gives GA-4 far more flexibility in what it can track.

A2. B — The gtag('event', 'purchase', {...}) call fires a purchase event, and everything inside the second argument object becomes event parameters: transaction_id, value, currency, and the items array. GA-4 uses these parameters in the Monetization and Ecommerce reports.

A3. B — The churn probability metric is actionable: sync the audience to Google Ads for a display/search re-engagement campaign, or push it to an email platform to trigger a win-back sequence. The goal is to intervene before the predicted churn actually occurs.

A4. B — Enhanced Measurement must be explicitly enabled on the data stream, and individual event categories (scrolls, outbound clicks, file downloads, video engagement, site search) each have their own toggle that must be active. It is not on by default for every property.

🪞 Recap

  • GA-4 replaces Universal Analytics with an event-based data model, enabling granular, parameter-rich tracking of virtually any user interaction across web and mobile.
  • Setting up GA-4 requires creating a property, adding the gtag.js snippet to your site's <head>, and enabling Enhanced Measurement on your data stream.
  • Cross-platform analysis unifies website and app data into a single property, giving a user-centric view of the full customer journey.
  • Machine learning powers predictive metrics (purchase probability, churn probability), anomaly detection, and automated insights surfaced directly in the dashboard.
  • Custom Exploration reports, funnels, and segments let teams build tailored analysis environments aligned to specific business KPIs.

📚 Further Reading

Like this topic? It’s one of 30 in Digital Marketing Essentials.

Block your seat for ₹2,500 and join the next cohort.