Digital Marketing · 14 min read · Updated

Chapter 7: Marketing Analytics with Google Analytics 4

By the end of this chapter you will be able to:

Marketing analytics with google analytics 4

Learning objectives

By the end of this chapter, you will be able to:

  • Explain the GA4 data model of users, sessions, events, and parameters.
  • Plan and implement tracking with Google Tag Manager and UTM parameters.
  • Configure key events (conversions) that reflect real business value.
  • Navigate GA4’s standard reports and answer common marketing questions.
  • Build explorations: funnels, paths, segments, and cohorts.
  • Understand attribution models and their limitations.
  • Use AI to interpret reports, write formulas, and draft insights.
  • Respect privacy, consent, and data protection rules.

Why analytics is the marketer’s superpower

Every chapter so far has ended with measurement, because marketing without measurement is guessing. Analytics answers the questions that decide budgets and careers:

  • Which channels bring visitors who actually buy?
  • Where do people drop out of the purchase process?
  • Which content attracts our best customers?
  • Did the campaign work, and how do we know?

Marketers who can answer these questions clearly, with data, are promoted faster. This chapter focuses on Google Analytics 4 (GA4), the most widely used web analytics platform and a standard requirement in marketing job descriptions. GA4 replaced Universal Analytics, which stopped processing data in July 2023 (and July 2024 for the paid 360 version). If you see tutorials referring to “bounce rate as the main metric,” “views,” or “goals,” they are describing the old system.

The GA4 data model

GA4 is built on events. Everything a user does is recorded as an event: viewing a page, scrolling, clicking a link, watching a video, adding to cart, purchasing.

  • Users: the people (more precisely, browsers or devices, plus signed-in identities where available) interacting with your site or app.
  • Sessions: a group of interactions within a time frame. By default, a session ends after 30 minutes of inactivity.
  • Events: individual interactions, each with a name (such as page_view or purchase).
  • Parameters: extra details attached to events (such as page_location, value, currency, item_name).
  • User properties: attributes describing groups of users (such as subscriber_status or preferred_language).

GA4 events come in four categories:

  1. Automatically collected events: recorded as soon as GA4 is installed (first_visit, session_start, page_view on websites, user_engagement).
  2. Enhanced measurement events: turned on with a toggle in settings (scroll, outbound click, view_search_results, video_start, file_download, form_start).
  3. Recommended events: events Google has predefined names and parameters for, which you implement yourself. E-commerce events are the most important: view_item, add_to_cart, begin_checkout, add_payment_info, purchase. Using recommended names unlocks built-in reports.
  4. Custom events: anything else specific to your business, such as quiz_complete or brew_guide_download.

Key events

A key event is an event you mark as important to your business. (Google renamed “conversions” to “key events” in GA4 in 2024; the term conversion is now used mainly for key events imported into Google Ads for bidding.) For Brightleaf, key events might be:

  • purchase (the most important)
  • subscription_start
  • sign_up (newsletter)
  • generate_lead (wholesale inquiry form)

Choose key events carefully. Marking every click as a key event makes reports meaningless. A good test: would the CEO care if this number doubled?

Engagement metrics

GA4 measures engagement directly:

  • Engaged session: a session that lasted longer than 10 seconds, had a key event, or had two or more page or screen views.
  • Engagement rate: engaged sessions ÷ total sessions.
  • Bounce rate: the inverse of engagement rate (the percentage of sessions that were not engaged). Note that this differs from Universal Analytics’ definition.
  • Average engagement time: how long your site was in focus in the user’s browser.

Setting up tracking

Installation

GA4 is installed by adding the Google tag to every page of your site, either directly in the code, through a platform integration (Shopify, WordPress, Wix, and others offer simple setups), or through Google Tag Manager (GTM).

Google Tag Manager is a free tool that lets marketers add and manage tracking tags without editing website code for every change. Its building blocks are:

  • Tags: code snippets that send data (for example, a GA4 event tag).
  • Triggers: rules for when tags fire (for example, “when the form submit button is clicked”).
  • Variables: values the tags and triggers use (for example, the page URL or a clicked button’s text).
  • Data layer: a structured object on the website where developers expose information (such as transaction value and product details) for GTM to read.

Learning GTM basics makes you far more self-sufficient and is a strong résumé skill.

The measurement plan

Before configuring anything, write a measurement plan: a document connecting business goals to what you will track.

Business objective KPI Events to track Key parameters Report
Grow subscriptions New subscriptions, subscription CVR view_item, add_to_cart, begin_checkout, purchase, subscription_start value, currency, item_id, plan_type E-commerce purchases, funnel exploration
Build email list Newsletter sign-ups sign_up method, form_location Events report, custom report
Educate customers Guide engagement scroll, brew_guide_download, video_progress guide_name, percent_scrolled Pages and screens, engagement

Prompt 7.1: Measurement plan Act as a digital analytics consultant. Create a GA4 measurement plan for [business description] with these business objectives: [list]. For each objective, specify KPIs, the GA4 events to track (using Google’s recommended event names wherever they exist), required parameters, which events should be marked as key events, and which reports or explorations answer the business question. Also list the custom dimensions I need to register. Format as a table followed by implementation notes for Google Tag Manager.

Toolkit: The GA4 Setup checklist walks through property settings, data streams, events, key events, consent, integrations, and reporting, with a status column for each task.

UTM parameters: tagging your campaigns

GA4 automatically recognizes traffic from Google Ads (via auto-tagging) and organic search. For everything else, such as emails, social posts, influencer links, and QR codes, you must tag your links with UTM parameters or GA4 may misclassify the traffic.

Parameter Purpose Example
utm_source Where the traffic comes from newsletter, instagram, facebook
utm_medium The marketing medium email, social, paid_social, cpc, affiliate
utm_campaign The specific campaign spring_sale_2026
utm_content Differentiates links or creative hero_button, video_ad_a
utm_term Paid keyword (optional) coffee_subscription

Example: https://brightleafcoffee.com/subscribe?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale_2026&utm_content=hero_button

UTM rules: use lowercase consistently (GA4 treats Email and email as different values), use underscores or hyphens instead of spaces, keep a shared UTM naming spreadsheet for the whole team, never use UTMs on internal links within your own site (they overwrite the original source), and match utm_medium values to GA4’s default channel group rules so traffic is classified correctly (for example, email for email and paid_social or cpc for paid traffic).

Google’s free Campaign URL Builder helps create tagged links.

GA4’s left navigation includes:

  • Home: a summary and recently viewed reports.
  • Reports: pre-built reports. The default collections include Life cycle (Acquisition, Engagement, Monetization, Retention) and User (Demographics, Tech). Admins can customize these collections.
  • Explore: flexible, custom analyses.
  • Advertising: attribution and conversion paths, plus Google Ads performance.
  • Admin: settings for the account, property, data streams, events, key events, custom definitions, data retention, and product links.

Answering common questions

Question Where to look
Which channels bring the most visitors and sales? Reports → Acquisition → Traffic acquisition (session-level), with “Session default channel group” as the dimension and key events or revenue as metrics
How do new users first find us? Reports → Acquisition → User acquisition (first user source)
Which pages are most popular and engaging? Reports → Engagement → Pages and screens
Which products sell best? Reports → Monetization → E-commerce purchases
How many people complete each key event? Reports → Engagement → Key events (or Events)
Are visitors coming back? Reports → Retention
Which landing pages convert? Reports → Engagement → Landing page (add key events or session key event rate)

Traffic acquisition vs. user acquisition. This confuses many beginners. User acquisition credits the source that first brought a user to the site. Traffic acquisition credits the source of each session. If someone first arrives from Instagram and later returns via email to buy, user acquisition credits Instagram for the user, while traffic acquisition shows one Instagram session and one email session.

Comparisons and filters

Use comparisons to view segments side by side, such as mobile versus desktop, or new versus returning users. Use the date comparison to compare periods, and always compare like with like: this month versus the same month last year accounts for seasonality better than this month versus last month.

Explorations: advanced analysis

The Explore section lets you build custom analyses. The most useful techniques for marketers:

  • Free-form exploration: custom tables and charts with any dimensions and metrics.
  • Funnel exploration: visualizes steps toward a goal and shows where users drop off. For e-commerce: view_item → add_to_cart → begin_checkout → add_payment_info → purchase. You can break down by device or channel to see where specific audiences struggle.
  • Path exploration: shows the sequences of pages or events users take, forward from a starting point or backward from an end point.
  • Segment overlap: shows how audience segments intersect (for example, mobile users who came from social and purchased).
  • Cohort exploration: groups users by when they first visited and tracks their behavior over time. Valuable for retention analysis of subscription businesses.
  • User lifetime: analyzes users’ value and behavior over their whole relationship with the site.

Segments are subsets of your data (users, sessions, or events) that match conditions. Example segments: “users who purchased more than once,” “sessions from paid social,” “users who viewed the brewing guides.”

Attribution: who gets the credit?

A customer may interact with five channels before buying. Attribution decides how credit for the conversion is shared among them.

  • Data-driven attribution (GA4’s default for key events): uses your account’s data and machine learning to assign credit based on how each touchpoint changed the likelihood of conversion.
  • Last click: all credit to the last channel clicked before conversion. (GA4 also offers paid-and-organic last click variations.)

Google removed first click, linear, time decay, and position-based models from GA4 in 2023. You can still view the conversion paths report to see the sequences of channels that led to conversions.

Attribution limitations you must understand:

  • Cross-device and privacy gaps. Ad blockers, cookie restrictions, browser tracking protections, and declined consent mean GA4 sees an incomplete picture.
  • View-through and offline influence. Someone who saw a YouTube ad, a billboard, or heard a podcast mention may later search for your brand. Analytics may credit “organic search” or “direct.”
  • Platform self-reporting. Google Ads, Meta, and other platforms each report conversions using their own methods and attribution windows, and their totals usually add up to more than your actual sales. Use GA4 or your back-end sales data as the neutral reference and understand why the numbers differ.
  • Correlation is not causation. The most rigorous way to measure the true effect of a channel is an incrementality test, such as a geographic holdout, where you stop advertising in some regions and compare results. Larger advertisers also use marketing mix modeling, a statistical approach using aggregated data. Google’s open-source Meridian and Meta’s Robyn are freely available mix modeling tools.

Analytics depends on user trust and legal compliance.

Chapter 9 goes deeper into first-party data, signal loss, and modern measurement methods.

  • Consent: In regions such as the European Economic Area and the UK, you need valid consent before setting non-essential cookies. Use a consent management platform (CMP) and implement Google Consent Mode, which adjusts how Google tags behave based on users’ consent choices. Google requires Consent Mode v2 signals for advertisers using personalized advertising features with EEA users.
  • No personal data in GA4: Google’s policies prohibit sending personally identifiable information (names, email addresses, phone numbers) to Analytics. Check that form submissions don’t put emails in URLs.
  • Data retention: GA4 retains user-level data for exploration reports for 2 months by default; change it to 14 months in Admin (standard properties). Aggregated standard reports are not affected.
  • Data quality: Filter internal traffic (your own team), exclude your payment processor as a referral if it breaks sessions, and audit tracking regularly.
  • Thresholding and sampling: GA4 may hide small numbers to protect privacy (thresholding) and may sample large explorations. For heavy analysis, the free BigQuery export gives you raw event data.

Dashboards with Looker Studio

Looker Studio (formerly Data Studio) is Google’s free dashboard tool. It connects to GA4, Google Ads, Search Console, Google Sheets, and many other sources, and produces shareable, auto-updating reports.

A good marketing dashboard:

  • Starts with the few KPIs leadership cares about, with comparison to target and previous period.
  • Shows trends over time, not just totals.
  • Breaks performance down by channel and campaign.
  • Includes a short written commentary: what happened, why, and what we will do next.
  • Fits on one or two screens. If everything is important, nothing is.

Using AI for analytics

AI assistants are powerful analytics companions, as long as you verify their math and logic.

Prompt 7.2: Report interpretation I’m sharing a GA4 Traffic acquisition export for the last 90 days versus the prior 90 days: [paste data or upload CSV]. Act as a senior marketing analyst. Summarize the five most important findings in plain English. For each, show the supporting numbers, propose a likely explanation, state your confidence, and recommend an action. Flag any data quality concerns, such as unusual spikes in direct traffic or unassigned traffic.

Prompt 7.3: Funnel diagnosis Here are my GA4 funnel exploration results by device: [paste]. Calculate step-to-step conversion rates. Identify the biggest drop-off overall and by device. Suggest five hypotheses for why users drop off at that step and an experiment to test each.

Prompt 7.4: Spreadsheet and formula help I have a Google Sheet with columns A: date, B: channel, C: sessions, D: key events, E: revenue. Write formulas to calculate conversion rate and revenue per session in new columns, a pivot-table setup summarizing by channel and month, and a formula that flags any day where sessions fell more than 30% below the trailing 7-day average.

Prompt 7.5: Executive summary Turn these analysis notes into a 200-word executive summary for our CEO. Lead with the business outcome, then the two key drivers, then the decision we need. Avoid jargon such as “engaged sessions”; translate everything into business language.

Gemini in Google Analytics and Sheets. Google has been adding AI features directly into its products, such as generated insights in GA4 and Gemini in Google Sheets. These can speed up routine analysis. Treat them the same way: a starting point to verify, not a conclusion.

Verification tip: when AI performs calculations, ask it to show its work or to use its code-execution or data-analysis feature, and spot-check a few numbers manually. LLMs can make arithmetic errors when calculating “in their heads.”

Hands-on exercises

Exercise 7.1: Explore the demo account (60 minutes). Google provides a free GA4 demo account with real data from the Google Merchandise Store. Search “Google Analytics demo account” to access it. Answer these questions: Which channel brought the most revenue last month? What is the top-selling product? What is the engagement rate on mobile versus desktop? What percentage of users who begin checkout complete a purchase?

Exercise 7.2: Build a funnel (30 minutes). In the demo account, create a funnel exploration from view_item to purchase. Break it down by device category. Write three sentences explaining what you see.

Exercise 7.3: UTM builder (20 minutes). Create a UTM naming convention spreadsheet for Brightleaf, then build tagged links for one email, two Instagram posts, and one influencer partnership.

Exercise 7.4: Looker Studio dashboard (60 minutes). Connect Looker Studio to the GA4 demo account and build a one-page dashboard with: sessions, key events, revenue, and engagement rate as scorecards with period comparison; a sessions trend line; and a table of channels with sessions, key events, and revenue.

Exercise 7.5: Get certified. Complete the free Google Analytics Certification in Google Skillshop.

Strategic assignment: measurement plan and dashboard

Deliver a Measurement Plan and Performance Dashboard for your business:

  1. Measurement plan: objectives, KPIs, events, parameters, key events, and custom dimensions (use Prompt 7.1, then refine).
  2. Tagging plan: a GTM implementation outline (tags, triggers, variables) for at least three custom events.
  3. UTM convention: a naming guide with examples for every channel you use.
  4. Dashboard: a Looker Studio dashboard (using the demo account data if you don’t have a real site) with a written commentary.
  5. Analysis memo: a one-page insight memo based on the demo account, using the structure “What happened, why it matters, what we should do.”
  6. Privacy checklist: consent, PII, retention, and internal traffic settings.
  7. AI log.

Key takeaways

  • GA4 is event-based: users, sessions, events, and parameters.
  • Plan measurement before tracking. Mark only meaningful events as key events.
  • Tag every non-Google link with consistent, lowercase UTMs.
  • Know where to find answers: acquisition, engagement, monetization, retention, and explorations.
  • Attribution is always incomplete. Use GA4 as a neutral reference and incrementality tests for causal truth.
  • Respect consent and privacy, and never send personal data to Analytics.
  • Use AI to accelerate analysis, and verify every number.

Rupak Nepali
Written byRupak Nepali

Author of four Opencart book.
The recent are Opencart 4 developer book and Opencart 4 user manual

Leave a Reply

Your email address will not be published. Required fields are marked *