Home / Blog / How To
📊

Google Analytics 4 for Affiliates: Revenue Tracking in 7 Steps

By Editorial Team · July 18, 2026 · 14 min read

Key takeaways

Why GA4’s Event-Based Model Is Built for Affiliate Revenue Tracking

The move from Universal Analytics to GA4 is not just an interface refresh — it is a structural overhaul of how measurement data is organized. UA built everything around sessions and pageviews. Every interaction had to fit inside that hierarchy, which suited basic content sites but left affiliates with awkward workarounds. The actions that actually generate affiliate revenue — a click on a tracking link, a form completion on a partner page, a sale callback — look nothing like a traditional pageview, and UA’s model never had a clean place for them.

GA4 eliminates that constraint by replacing the session-and-pageview hierarchy with a single flexible unit: the event. Every interaction is an event, and every event can carry custom parameters — key-value pairs you define yourself to describe exactly what happened.

What Affiliates Lose by Defaulting to the Standard Reports

Open GA4 without any custom configuration and the default reports are built for e-commerce stores and media sites, not affiliate publishers. Outbound link clicks surface as generic events with a destination URL. There is no column for network name, no field for offer ID, and nothing to separate a click that earns a high commission from one that earns almost nothing.

Affiliates who migrated from UA expecting equivalent reports to be waiting for them are working with incomplete data. GA4 was not designed to replicate UA’s fixed taxonomy — it was designed to be configured.

What You Gain When You Use Custom Events Properly

When you fire custom events with meaningful parameters attached, the picture changes. Take a click on an affiliate link inside a product review. Instead of a bare outbound click event, you can send an affiliate_link_click event with parameters like:

With that structure in place, you can build reports showing commission-weighted click volume by offer, filter audiences by which network drove their conversion, and flag specific events as GA4 conversions to feed your attribution data. For a detailed walkthrough of mapping those events to actual referral conversions, GA4 for Affiliate Marketers: Track Referral Conversions in 6 Steps covers the full setup process.

GA4’s event model does not surface these insights automatically — no part of GA4 is automatic for affiliates. What it does is give you an architecture flexible enough to capture affiliate-specific revenue data without fighting the measurement layer to do it.

Steps 1–2: Create Your GA4 Property and Connect a Web Data Stream

Before you can track a single affiliate click, GA4 needs a property and a data stream. These two steps take about ten minutes, but the configuration choices you make here influence everything downstream.

Step 1: Create the Property. Open Google Analytics, go to Admin (the gear icon, bottom-left), and click Create > Property. Give it a descriptive name, set the reporting time zone to match your audience’s primary location, and choose the currency your networks pay out in. Mismatching the time zone causes your daily GA4 traffic reports to drift against your network dashboards. When asked to choose a platform, select Web.

Add a Web Data Stream and Configure It

Enter your domain, name the stream, and click Create stream. GA4 generates a Measurement ID (format: G-XXXXXXXXXX) and offers two installation paths:

GTM is the stronger long-term choice for affiliates because it lets you add or update event tags without touching site code.

Enhanced Measurement is on by default. Check these two toggles before closing the stream settings:

  1. Outbound clicks — leave this on. GA4 fires a click event each time a visitor follows a link off your domain, which captures your affiliate link taps without any custom code.
  2. File downloads — turn on only if you publish downloadable content such as guides or comparison PDFs; otherwise leave it off to keep reports clean.

Right after saving, go to Admin > Data Settings > Data Retention and extend the event-data window from two months to fourteen months — enough history for year-over-year comparisons in Explore. Also check Admin > Data Stream > Configure tag settings > Adjust session timeout: the default 30 minutes suits most sites, but if your content is long-form (detailed reviews, tutorials), extending to 60 minutes produces cleaner session counts.

flowchart LR
  A[GA4 property] --> B[web data stream]
  B --> C[gtag or GTM tag]
  C --> D[DebugView confirmation]

Verify with DebugView Before Moving On

Open Configure > DebugView inside GA4, activate the GA4 DebugView Chrome extension, then load your site. Within seconds you should see a page_view event, followed by session_start. Click one of your affiliate links — a click event labeled with the destination domain should appear almost immediately. If nothing shows up, the two most likely causes are a consent management platform blocking the tag or a typo in the Measurement ID. Fix either issue now, before building out any custom event configuration.

Once DebugView confirms the base tag is firing and outbound clicks are registering, you have a solid foundation for the steps ahead. GA4 for Affiliate Marketers: Track Referral Conversions in 6 Steps covers complementary referral conversion patterns worth reviewing alongside this setup.

Build a Consistent UTM Parameter Structure

UTM parameters are the backbone of affiliate attribution in GA4. Without them, outbound clicks get absorbed into direct traffic or lumped into catch-all buckets that make it impossible to tell which offer, network, or placement is driving revenue.

Apply four parameters to every affiliate link you control:

A fully tagged direct link looks like this:

https://merchant.com/pricing?utm_source=shareasale&utm_medium=affiliate&utm_campaign=vpn-annual-plan&utm_content=sidebar-banner

For cloaked links routed through your own domain, append the UTM string to the destination URL before cloaking — not to the cloaked URL itself, since most redirect setups strip parameters at the final hop. For network-generated links, many networks ignore custom UTMs entirely; pass the values through sub-ID fields (subid1, subid2) instead and map them to GA4 custom dimensions later.

For a more complete breakdown of tagging strategy across link types, see UTM Parameters for Affiliates: Track Every Click & Conversion.

Link Type utm_source utm_medium utm_campaign utm_content
Direct affiliate link shareasale affiliate hosting-starter inline-text-review
Cloaked link (applied to destination URL) impact affiliate vpn-annual-plan sidebar-banner
Network-generated link (via sub-ID mapping) cj affiliate software-pro email-footer

Set Up the GTM Trigger for affiliate_click

Once your links are tagged, configure a GTM trigger to fire a custom GA4 event on every outbound affiliate click:

  1. In GTM, create a new Trigger of type Click — Just Links, set to fire on Some Link Clicks.
  2. Set the condition: Click URL contains the affiliate domain patterns relevant to your networks (e.g., shareasale.com, impact.com).
  3. Create a GA4 Event Tag named affiliate_click and attach this trigger.
  4. Add the following event parameters to the tag: - link_url{{Click URL}} - offer_id → a URL variable extracting utm_campaign from the clicked link - network → a URL variable extracting utm_source

This gives GA4 a structured event stream where every outbound click carries the destination URL, offer identity, and network in a consistent, queryable format — so you can segment by campaign or creative in Explorations without any post-collection data wrangling.

Step 5: Configure GA4 Conversion Events to Capture Commission Data

Once your custom event is firing reliably, you need to tell GA4 it matters. Navigate to Admin → Events in your GA4 property, locate your event — for example, affiliate_conversion — and toggle Mark as key event. GA4 now counts every instance of that event in your key events reports.

Before going further, note the terminology. Google renamed “conversions” to “key events” in GA4, but the distinction between a GA4 key event and a Google Ads conversion still matters for affiliates running paid traffic. A GA4 key event feeds your Analytics reports and attribution modeling. A Google Ads conversion is configured separately in your Ads account — or imported from GA4 — and is what drives Smart Bidding. Marking a key event in GA4 does not automatically create a Google Ads conversion, so if you want paid campaigns to optimize toward commission-generating actions, you need to set that up independently.

Passing Commission Data in the Event Payload

The real value for affiliates comes from the parameters attached to the event. Whether you fire this client-side on a thank-you page via gtag.js or server-side through an affiliate network postback URL, your event payload should include:

A client-side gtag.js call on a confirmation page looks like this:

gtag('event', 'affiliate_conversion', {
  value: 79.00,
  currency: 'USD',
  transaction_id: 'ORD-48291',
  commission_amount: 15.80
});

For server-side delivery via a network postback, map these same parameters into your Measurement Protocol payload. Server-Side vs Pixel Tracking: The Most Accurate Affiliate Method walks through both approaches and their accuracy trade-offs in detail.

Deduplication: Why transaction_id Is Not Optional

Users frequently revisit order confirmation pages — to forward a receipt, screenshot their order, or simply reload the tab. Without a unique transaction_id on every conversion event, GA4 logs a fresh conversion on each page view, inflating your reported commissions and corrupting your attribution data.

GA4 deduplicates using transaction_id: when an identical ID arrives again, GA4 discards the duplicate. Always pull the order reference directly from your affiliate network’s postback parameters — never substitute a timestamp or session ID, as those can repeat or collide across users. Finally, register commission_amount as a custom metric under Admin → Custom definitions so it surfaces in your Explorations and standard reports alongside the merchant’s total sale figures, giving you a clear picture of what you actually earn per transaction.

Step 6: Register Custom Dimensions to Store Affiliate Network and Offer Metadata

When you fire a conversion event with parameters like affiliate_network, offer_id, or commission_tier, GA4 records the event but quietly ignores any parameters you have not explicitly registered as custom dimensions. The data never makes it into reports or explorations — it simply disappears. This step fixes that.

Registering the Dimensions in GA4 Admin

Navigate to Admin → Data display → Custom definitions, then click Create custom dimension. You will repeat this process once per parameter. For each dimension, fill in three fields:

  1. Dimension name — a human-readable label you will see in reports, such as Affiliate Network, Offer ID, or Commission Tier.
  2. Scope — select Event for all affiliate metadata. Event scope ties the value to the specific conversion event that carried it, which is correct for offer-level data.
  3. Event parameter — the exact parameter name your tracking code sends, case-sensitive (e.g., affiliate_network, offer_id, commission_tier).

The full set of dimensions for a standard affiliate setup looks like this:

Dimension Name Scope Event Parameter
Affiliate Network Event affiliate_network
Offer ID Event offer_id
Commission Tier Event commission_tier

After saving, registration can take up to 24 hours to appear in the Admin interface, but new incoming events begin populating the dimension immediately.

Using These Dimensions as Breakdowns in Explorations

Once registered, the dimensions become available inside Explore → Free Form. To build a revenue segmentation view by network and offer:

The resulting table shows revenue broken down by each network and individual offer rather than just by traffic source or campaign. If a particular offer drives high volume but low revenue, that pattern becomes immediately visible at a glance. You can also apply a segment filter — for example, isolating a single network — to compare how different offers within that network perform side by side.

This granularity is something the standard channel and source reports cannot provide on their own, which is why registering these custom dimensions is not optional if you want affiliate data that is actually actionable in GA4. If you are also tracking clicks upstream of the conversion step, UTM Parameters for Affiliates: Track Every Click & Conversion covers how UTM parameters complement this event-level metadata to give you a continuous picture from first click through to commission.

Step 7: Build GA4 Exploration Reports That Reveal True Affiliate Revenue

Standard GA4 reports were designed for e-commerce and content sites. For affiliates, most of the default views surface the wrong signals — which means you need to build a custom Exploration that ties your traffic parameters directly to revenue outcomes.

Set Up a Free Form Exploration

In GA4, open Explore from the left navigation and create a new Free Form exploration. Add the following dimensions to your Variables panel:

Then add these metrics: Event revenue and Key events (formerly conversions).

Drag Session campaign and offer_id into the Rows section, and drop Event revenue and Key events into Values. Apply a filter to include only your affiliate purchase or lead event. What you now have is a single view that shows which campaign and offer combination actually generates income — not which one drove the most sessions.

If you promoted two different software offers through two different networks during the same period, this report will show you the exact revenue split per offer, not just an aggregate click count. That distinction is where most affiliates lose money without realising it.

Which Default Reports Help — and Which Mislead

Traffic Acquisition is worth bookmarking as your entry-point dashboard. It segments sessions by source and medium, giving you a quick read on which channels are active. Monetization Overview is useful if you have GA4 revenue events firing correctly — it surfaces your top-earning events without any custom configuration.

Ignore Engagement Rate for affiliate contexts. This metric measures how long users spend on your site, but your goal is to send qualified users off your site and onto a merchant’s page. High engagement often signals someone got distracted rather than converted.

Share Explorations for Weekly Monitoring

GA4 Explorations cannot be fully automated the way Looker Studio dashboards can, but you can share a direct link to any Exploration with team members or collaborators inside the same GA4 property. For regular monitoring, export a snapshot to PDF or Google Sheets on a set day each week — Friday works well if you are optimising campaigns for the following week. Set a recurring calendar reminder so the review actually happens.

For a deeper understanding of how your UTM parameters feed into these dimensions, [UTM Parameters for Affiliates: Track Every Click & Conversion]UTM Parameters for Affiliates: Track Every Click & Conversion covers the full tagging logic behind what you are now reporting on.

Frequently asked questions

No — GA4’s Enhanced Measurement tracks some outbound clicks but does not capture affiliate-specific revenue context by default. You need UTM parameters on every affiliate link and a custom click event (built in Google Tag Manager) to pass offer IDs, networks, and commission values into your reports. Without this, GA4 sees a click but has no idea it generated income.

What GA4 event should I use to record affiliate commission revenue?

Use the standard purchase event with the value parameter set to your commission amount and currency set to your payout currency. This feeds directly into GA4’s Monetization reports and lets you analyze earnings by utm_source, utm_campaign, and custom dimensions. Fire the event on your post-conversion confirmation page or via a postback from your affiliate network.

Do I need Google Tag Manager to set up GA4 affiliate tracking?

GTM is strongly recommended but not strictly required. Without it, you must hard-code every GA4 event tag into your site’s HTML — a maintenance nightmare whenever networks or offers change. GTM gives you a no-code interface to deploy, update, and debug conversion events in minutes, and its Preview mode makes verifying affiliate click events dramatically easier.

How do I prevent GA4 from sampling my affiliate revenue data in reports?

GA4 free tier applies sampling in Explorations when datasets grow large. Combat this by narrowing your date range, applying specific campaign or source filters before querying, or linking GA4 to BigQuery (free tier included) to run fully unsampled SQL queries across your raw affiliate event data. BigQuery is the gold standard for high-volume affiliate reporting without data loss.

Track your affiliate link free — no signup

Paste any affiliate or referral link and get a TrackRef tracking link instantly, with live click stats. Save it to a free account whenever you want.

Was this article helpful?