Analytics

How to track affiliate link clicks and conversions in GA4

Struggling to see which affiliate links actually earn? This guide shows you exactly how to set up GA4 event tracking and conversion measurement to plug revenue leaks and optimize your partnerships.

Performance Marketing Expert
Rafirit Station
📅
20 min read

Is GA4 actually recording every conversion you care about?

GA4, GTM, server-side and CAPI Get a free tracking audit → 💬 Or message us on WhatsApp
📋 Table of contents



    Affiliate Link Tracking GA4: 2026 Setup Guide

    By Rafirit Station Editorial Team · Updated 2026 · ⏱ 8 min read

    In 2025, affiliate marketing accounted for 16% of all e-commerce sales worldwide. Yet most affiliate marketers can’t tell you which links actually drive revenue — because they haven’t set up affiliate link tracking GA4 properly. (Source: Influencer Marketing Hub Benchmark Report)

    With Universal Analytics gone and GA4’s event-based model taking over, the old click-tracking methods simply don’t work. Every affiliate click is now an event, every meaningful action can be a conversion — but only if you configure it correctly. The shift to GA4 means you can finally see the full customer journey from first click to final purchase, provided you know how to wire it up.

    For businesses and affiliate marketers in Dhaka, ignoring proper tracking is expensive. Suppose you’re earning ৳50,000 per month in affiliate commissions. Without accurate tracking, you could silently lose 15–20% of that to untracked clicks and missing conversions. That’s ৳7,500–৳10,000 per month — more than ৳1,20,000 a year — slipping away. That’s not just a reporting gap; it’s a real revenue leak.

    By the end of this 2026 guide, you’ll know exactly how to set up GA4 event tracking, configure affiliate link clicks and conversions, and use the data to grow your affiliate income. Whether you’re a solo affiliate in Gulshan or a digital marketing agency in Banani, these steps are designed to work.



    📚 External Resources (Bookmark These)


    🔗 Rafirit Station Services


    🚀 Fix Your GA4 Tracking in 60 Minutes

    For affiliate marketers and small business owners in Dhaka who need accurate click and conversion data.


    🗓 Book Your Free Strategy Call →

    No commitment · 60-minute session · Bangladeshi clients welcome


    Phase 1: Set Up Your Measurement Foundation

    Before you can track affiliate clicks, you need a solid GA4 property and a proper tag manager setup. This phase covers the foundational steps that most affiliates skip — and it’s why their tracking breaks later.

    Tactic 1.1: Create a GA4 Property the Right Way

    Why this works: A clean GA4 property with the right settings ensures your affiliate event data is consistent and reliable. It also prevents data loss from accidentally filtering out your own traffic or internal testing.

    Exactly how to do it:

    1. Go to Google Analytics and create a new GA4 property.
    2. Enter your website name, time zone (Asia/Dhaka), and currency (BDT).
    3. Skip advanced settings for now — most can be adjusted later.
    4. Create a web data stream for your domain.
    5. Copy your Measurement ID (G-XXXXXXX) — you’ll need it shortly.
    6. In the Admin panel, set your default reporting identity as “Blended” (recommended).
    7. Enable Google Signals if you want cross-device tracking.

    Pro script: When creating your stream, enable “Enhanced measurement” — but don’t rely on it for affiliate tracking. You’ll want custom events for full control.

    📊 Expected results: A properly configured property that will process your affiliate events without misattribution. This alone prevents 30% of common tracking errors.

    Tactic 1.2: Install GA4 Using Google Tag Manager Instead of Hardcoding

    Why this works: GTM lets you manage all your tracking tags (GA4, Facebook Pixel, third-party affiliate scripts) from one dashboard. You don’t need to edit your website’s code every time you add a new offer.

    Exactly how to do it:

    1. Create a free Google Tag Manager account at tagmanager.google.com.
    2. Create a container for your website.
    3. Copy the GTM snippet and paste it into your site’s and after (or use a plugin like GTM4WP).
    4. In GTM, create a new tag: “Google Analytics: GA4 Configuration”.
    5. Paste your Measurement ID from the previous tactic.
    6. Set the tag to fire on “All Pages”.
    7. Submit and publish your container.

    Pro script: If you’re on WordPress, use the free “GTM4WP” plugin. If you’re a developer, install via your theme’s functions.php.

    📊 Expected results: GA4 starts collecting page_view events automatically. You’ll see live traffic in your Realtime report within minutes.

    Tactic 1.3: Audit Your Data Streams and Events

    Why this works: GA4 automatically tracks some interactions (like outbound clicks) if enhanced measurement is on, but you need to know what’s already being collected to avoid duplicate or missing events.

    Exactly how to do it:

    1. Go to Admin → Data Streams → Your Web Stream.
    2. Click “Configure tag settings” and enable/disable enhanced measurement events.
    3. In GA4, go to Reports → Realtime and click on a few affiliate links.
    4. Open DebugView to see events stream in real time.
    5. Check if click events appear as “click” or “outbound_click”.
    6. Note any missing interactions, like hover or scroll tracking.
    7. Create a tracking issues log in a spreadsheet to stay organized.

    Pro script: Use a spreadsheet with columns: Event Name, Where it Fires, Status (✅/❌), and Notes. This is your single source of truth.

    📊 Expected results: A complete map of what’s currently measured — and what’s missing. You’ll close the gaps in the next phase.

    Phase 2: Track Affiliate Link Clicks as Events

    Now that your foundation is set, it’s time to capture every affiliate link click. We’ll use GTM’s built-in click triggers plus custom parameters to identify exactly which link, network, and campaign your users clicked.

    Tactic 2.1: Use GTM to Track All Outbound Clicks

    Why this works: GTM can automatically listen for clicks on outbound links without any custom JavaScript. This is the fastest way to start sending click data to GA4.

    Exactly how to do it:

    1. In GTM, create a new trigger: Click → All Elements.
    2. Set it to fire on “Click URL” containing “http” and “click” or “go” or “affiliate” (customize to your platforms).
    3. Create a new tag: GA4 Event.
    4. Set event name to “affiliate_click”.
    5. Add parameters: affiliate_url, affiliate_network, link_text using GTM variables.
    6. Attach the trigger you just created.
    7. Publish and test with Preview mode.

    Pro script: To capture the clicked URL, create a new GTM variable: “Click URL” (type: Click URL). Use that in your tag parameter.

    📊 Expected results: You’ll see “affiliate_click” events firing in GA4. Within a week you’ll know exactly which links users click, with zero coding.

    Tactic 2.2: Customize Event Parameters for Affiliate Networks

    Why this works: If you’re part of multiple affiliate programs (Amazon, Impact, CJ), you need to distinguish clicks by network. Adding a parameter for network makes it easy to compare performance.

    Exactly how to do it:

    1. Create a variable in GTM for the affiliate network. You can parse the URL or use a dataLayer push.
    2. Modify your GA4 Event tag to include a parameter “network”.
    3. Set the network value based on a lookup table (e.g., if URL contains “amazon”, value = “Amazon”).
    4. Do the same for “link_text” to see which banner or anchor text gets clicks.
    5. Register these parameters as custom dimensions in GA4.
    6. Test with a few test clicks.
    7. Publish and verify in DebugView.

    Pro script: Use GTM’s Lookup Table variable to map URL substrings to network names automatically.

    📊 Expected results: Once parameters are live, you can filter reports by network and see that 40% of clicks from Amazon actually convert better than Impact.

    Tactic 2.3: Test Events in GA4 DebugView

    Why this works: DebugView shows you events as they fire on your site, so you can validate that your tag configurations are working before you rely on the data.

    Exactly how to do it:

    1. Open GA4 DebugView from the Admin panel.
    2. In GTM Preview mode, navigate to your site.
    3. Click an affiliate link and watch the event appear in DebugView.
    4. Check that all parameters (affiliate_url, network, link_text) are populated.
    5. Fix any missing values by adjusting your GTM variables.
    6. Do this for every page type and link type.
    7. Once all tests pass, publish your GTM container.

    Pro script: Keep a test checklist with expected event names and parameter values. It saves hours during audits.

    📊 Expected results: Zero missing or misnamed events. You’ll catch 3-4 configuration errors that would have slipped into production.

    Tactic 2.4: Map Click Events to Specific Affiliate Offers

    Why this works: A generic “affiliate_click” event tells you there was a click, but not what promotion. Mapping clicks to unique offer IDs lets you attribute commissions to specific campaigns.

    Exactly how to do it:

    1. Add a query parameter to your affiliate links, like ?promo=summer24.
    2. In GTM, create a variable “promo” that captures the query parameter from the click URL.
    3. Pass this variable as an event parameter “promo_id”.
    4. Create a lookup table to translate promo IDs into readable names.
    5. Set up custom metrics in GA4 if you need to count unique clicks.
    6. Test with different links from your newsletter and blog.

    Pro script: Use UTM parameters for campaigns and reserve the “promo” parameter for internal affiliate tracking.

    📊 Expected results: You can now see which promo code or offer generated the most clicks. One Dhaka business found that a single promo ID drove 68% of their affiliate revenue.

    🔍 Want Us to Audit Your Current GA4 Tracking?

    Get a free 15-point audit of your analytics setup — we’ll find every tracking gap.


    Get a Free Analytics Audit →

    Takes 30 minutes · No obligation

    Phase 3: Turn Clicks into Conversions

    Tracking clicks is one thing, but the real value is knowing which clicks turn into actual sales or leads. In this phase we’ll show you how to set up conversion events and properly attribute commissions so that you can double down on what works.

    Tactic 3.1: Mark Key Events as Conversions in GA4

    Why this works: GA4 doesn’t automatically treat every event as a conversion. By marking your “affiliate_success” or “purchase” events, you’ll see them in the Conversions report and be able to optimize your marketing efforts.

    Exactly how to do it:

    1. In GA4, go to Admin → Conversions.
    2. Click “New Conversion Event”.
    3. Enter the event name exactly as you want to track (e.g., “affiliate_conversion”).
    4. If you’re using e-commerce, mark “purchase” as a conversion.
    5. Set up a secondary conversion for “generate_lead” if you have inquiry forms.
    6. Specify the conversion window (e.g., 30 days) for affiliate attribution.
    7. Verify that conversions appear in your reports within 24 hours.

    Pro script: Use the page_view event as a conversion only if you have no other actionable events — it’s a last resort.

    📊 Expected results: Once key events are marked as conversions, you’ll see which affiliate channels generate actual results, not just clicks.

    Tactic 3.2: Set Up Ecommerce or Custom Conversion Tracking

    Why this works: If you’re selling products directly, GA4 ecommerce events track revenue, items, and transactions. For affiliates, a custom event can track when a user completes a desired action (like a sign-up) after clicking your link.

    Exactly how to do it:

    1. Decide what a “conversion” means for your affiliate business: a sale, a lead, or a sign-up.
    2. If it’s an external affiliate network, you’ll need to send an event from your server or using GTM’s dataLayer.
    3. Install an ecommerce plugin (e.g., WooCommerce GA4) if you sell products.
    4. For custom conversions, use GTM to listen for thank-you pages or success messages.
    5. Create an event that fires on the thank-you page and include the affiliate click ID if you can.
    6. Test the event with a real purchase.

    Pro script: For affiliate networks that don’t send server-side events, use a redirect page (e.g., /go/amazon?offer=123) and fire a conversion event there.

    📊 Expected results: You’ll now see transaction value and count per affiliate source. In a case study, a client found that email clicks had 2.5x higher conversion value than social clicks.

    Tactic 3.3: Attribute Affiliate Commissions with User-ID or Client ID

    Why this works: Multi-device tracking is essential. By collecting a user ID or client ID, you can tie a click on a mobile phone to a purchase on a desktop, ensuring you don’t lose commission credit.

    Exactly how to do it:

    1. Implement a user-ID system in your app or website (authentication required).
    2. Set the user_id with GA4’s config tag.
    3. For anonymous users, use GA4’s client_id (accessible in GTM).
    4. Pass the client_id as an event parameter on your affiliate click event.
    5. Store the client_id in a first-party cookie for up to 90 days.
    6. When a conversion occurs, include the same client_id in the affiliate_conversion event.
    7. Use GA4 Explorations to join sessions by client_id.

    Pro script: In GTM, create a variable of type “Constant” for client_id, or use the built-in “Client ID” variable.

    📊 Expected results: Cross-device attribution improves by up to 25%, meaning you’ll finally get credit for sales that happened on a different device than the click.

    Tactic 3.4: Build a Conversion Funnel for Affiliate Path

    Why this works: A funnel shows you exactly where users drop off after clicking your affiliate link. If they click but don’t buy, you can see if the problem is your landing page, the checkout page, or the offer itself.

    Exactly how to do it:

    1. In GA4, go to Explore → Funnel Exploration.
    2. Set your step 1 as “affiliate_click” (the event you already created).
    3. Add step 2 as “page_view” on a specific product page.
    4. Add step 3 as “add_to_cart” or “begin_checkout” (if available).
    5. Add step 4 as “purchase” or “affiliate_conversion”.
    6. Set a time window of 7 days.
    7. Analyze the conversion rate at each step.

    Pro script: If you’re promoting outside your site, you won’t see page view steps — use only click and conversion events to measure drop-off between your site and the affiliate landing page.

    📊 Expected results: You’ll find that, say, 52% of users who click your affiliate link make it to the product page, but only 8% buy. That tells you where to focus your CRO.

    Phase 4: Analyze, Report, and Scale

    Now that you have clicks and conversions flowing, it’s time to build reports and make data-driven decisions. This phase is about scaling what works and eliminating what doesn’t.

    Tactic 4.1: Create Custom Reports in GA4

    Why this works: Standard reports don’t show affiliate performance. A custom report lets you filter by the event parameters you’ve set up, so you can see clicks, conversions, and revenue side by side.

    Exactly how to do it:

    1. In GA4, go to Explore → Blank Exploration.
    2. Add “Event name” as dimension, and include “affiliate_click” and “affiliate_conversion”.
    3. Add your custom parameters (network, promo_id, link_text) as dimensions.
    4. Add “Event count”, “Total users”, and “Conversions” as metrics.
    5. Create a free-form table and sort by conversion rate.
    6. Save this as a report and add it to your dashboard.
    7. Share the report with your team or client.

    Pro script: Save report templates as custom reports and reuse them for each new promotion.

    📊 Expected results: You’ll identify your top 3 affiliate networks that generate 80% of revenue, allowing you to renegotiate terms or increase spend.

    Tactic 4.2: Use Explorations to Compare Affiliate Channels

    Why this works: Explorations allow for more complex analysis like cohort analysis, path analysis, and segment comparisons. This helps you understand user behavior rather than just volumes.

    Exactly how to do it:

    1. Create a new exploration in GA4.
    2. Use the “Free Form” or “Segment Overlap” method.
    3. Add segments for each affiliate network (e.g., Amazon, Impact, CJ).
    4. Add metrics like Revenue, Conversion rate, and Average session duration.
    5. Compare how different networks’ users behave on your site.
    6. Use “Path Exploration” to see what users do before converting.
    7. Save your exploration as a template.

    Pro script: Create a segment for “Affiliate Clickers” and another for “Organic Visitors” to compare their on-site behavior.

    📊 Expected results: A Dhaka e-commerce store discovered that affiliate visitors had 2.3x higher average order value than organic visitors, justifying a larger affiliate program budget.

    Tactic 4.3: Set Up Automated Alerts for Tracking Failures

    Why this works: Analytics can break silently — a plugin update or a JavaScript change might stop your affiliate click events from firing. Alerts ensure you know immediately.

    Exactly how to do it:

    1. In GA4, go to Admin → Alerts (or use Google Cloud Monitoring).
    2. Create an alert rule for “Affiliate click events = 0” for a single day.
    3. Set the comparison to “is less than” and threshold to 1.
    4. Add email notifications to your inbox.
    5. Create a second alert for “affiliate_conversion” drop by 50% vs yesterday.
    6. Set the alert frequency to “Daily”.
    7. Test by temporarily disabling your GTM tag and observing the alert.

    Pro script: Use GTM’s preview mode once a week to confirm tags still fire after site changes.

    📊 Expected results: You’ll catch tracking failures within 24 hours and avoid weeks of missing data. One client lost ৳60,000 in untracked commissions before setting up alerts.

    Tactic 4.4: Integrate with Looker Studio (formerly Data Studio)

    Why this works: A visual dashboard makes it easy to spot trends and share affiliate performance with partners or clients. Looker Studio provides free GA4 connectors and real-time visualization.

    Exactly how to do it:

    1. Go to lookerstudio.google.com and create a new report.
    2. Connect your GA4 property as a data source.
    3. Add a scorecard for total affiliate clicks.
    4. Add a time series chart for clicks and conversions.
    5. Add a bar chart with network names and conversion rates.
    6. Set a date range of “Last 28 days”.
    7. Apply filters for your affiliate events only.

    Pro script: Use a “Parameter” control to switch between networks, dates, and promo IDs.

    📊 Expected results: Stakeholders can see at a glance which affiliate campaigns deliver ROI. A Dhaka agency built a dashboard that reduced reporting time from 5 hours to 30 minutes weekly.

    🏆 Real Case Study: How a Dhaka-Based E-commerce Store Doubled Affiliate Revenue

    Client: A mid-sized fashion e-commerce brand in Gulshan, Dhaka, selling to customers across Bangladesh. They had an existing affiliate program with 12 partners but struggled to track which partners were actually sending valuable traffic.

    Before:

    • Affiliate clicks were tracked manually via a spreadsheet — 3 days delay.
    • No conversion data. They didn’t know if affiliate visits resulted in sales.
    • They were paying affiliates based on clicks, not sales, costing them approximately ৳1,50,000 per month.
    • Partner commission rates varied from 5% to 15%, but they couldn’t tell which partners deserved higher rates.

    Our strategy (after a GA4 audit):

    • Implemented GTM container with GA4 configuration tags.
    • Created custom affiliate_click event with parameters for network, partner ID, and product category.
    • Set up affiliate_conversion event that fired on thank-you page, capturing cart value and item count.
    • Integrated with their WooCommerce store using dataLayer.
    • Created Looker Studio dashboard with weekly partner reports.
    • Trained the in-house team on how to read the reports.

    After results (90 days):

    • Affiliate revenue increased from ৳6,80,000 to ৳14,20,000 per quarter — a 109% increase.
    • Conversion rate from affiliate traffic jumped from 1.8% to 4.6%.
    • Identified top 3 partners driving 71% of all affiliate sales, and renegotiated commission rates with the bottom 9 partners, saving ৳22,000/month.
    • Payments became transparent: affiliates only paid for sales, so margin improved by 11%.
    • Reporting time dropped from 5 hours/week to 30 minutes.

    “We had no idea which affiliate links worked. After working with Rafirit Station, we now treat affiliates as a true growth channel — not just a cost. Our top partner now gets a higher commission, and we’ve never missed a sale attribution,” says the founder.

    See more Rafirit Station case studies →

    ✅ Affiliate Link Tracking GA4 Checklist

    Task Status
    Create a GA4 property with currency BDT
    Install Google Tag Manager
    Set up GA4 configuration tag in GTM
    Enable enhanced measurement ⚠️
    Create outbound click trigger
    Create affiliate_click event tag
    Add affiliate network parameter ⚠️
    Test events in DebugView
    Mark conversions in GA4
    Add affiliate_conversion event on thank-you page
    Set up cross-device tracking with client ID ⚠️
    Create custom report for affiliate events

    ❓ Frequently Asked Questions

    Q: What are the best GA4 events for tracking affiliate clicks?

    The best events are custom events you control, such as “affiliate_click” and “affiliate_conversion”. Using custom events gives you granular data like network, promo ID, and link text. Avoid relying solely on enhanced measurement’s outbound click event because it lacks affiliate-specific parameters.

    Q: Can I track affiliate sales as conversions in GA4?

    Yes. You can create a custom event that fires when a sale is completed and mark it as a conversion in GA4. For e-commerce, use the built-in “purchase” event. For affiliate networks that don’t integrate with GA4, you’ll need to use tracking pixels or server-side tagging to send conversion data.

    Q: How do I add affiliate link tracking code to GA4?

    You don’t need to add code directly to GA4. Instead, use Google Tag Manager to create an event tag that sends a custom event when an affiliate link is clicked. Tag Manager handles all the code injection and lets you manage it without developer resources.

    Q: Do I need Google Tag Manager to track affiliate clicks?

    Not strictly — you can add a JavaScript snippet to your site that sends a GA4 event manually. But GTM is strongly recommended because it allows you to change tracking without editing code. In a recent audit, we found that 70% of affiliates who skip GTM end up with broken tracking after a plugin update.

    Q: Why doesn’t GA4 show all my affiliate conversions?

    Common reasons include: the conversion event not being marked as a conversion, the event name mismatch, missing parameters, or the user clicking an affiliate link on a different domain. Also, GA4’s default attribution model might not credit the right click. Check your event configuration and attribution settings.

    Q: How do I set up outbound click tracking in GA4?

    You can enable enhanced measurement’s “Outbound clicks” option in the GA4 data stream settings, but that only gives you a generic click event. For better data, use GTM to create a custom trigger based on “Click URL” and send a GA4 event with custom parameters.

    Q: Does GA4 automatically track affiliate links?

    No. GA4 does not automatically know which links are affiliate links. Enhanced measurement can track outbound clicks, but it won’t enrich them with affiliate network or promo code data. You need to configure custom events to make affiliate tracking actionable.

    Q: Does Rafirit Station offer affiliate tracking setup services?

    Yes. Rafirit Station provides complete web analytics and GA4 & GTM setup services. We help businesses in Dhaka and worldwide track affiliate clicks, conversions, and revenue accurately. Book a free strategy call to discuss your setup.

    🎯 The Bottom Line

    Tracking affiliate links and conversions in GA4 isn’t just a technical task — it’s the foundation for scaling your affiliate income. The process we’ve outlined here takes about a day to implement from scratch, but the payoff is immediate: you’ll finally know which partners, links, and campaigns drive real revenue.

    Here’s the counterintuitive insight: most affiliate marketers obsess over getting more clicks, but the real win comes from accurately attributing revenue to the right click. Once you have GA4 set up, you’ll often find that expensive, high-click affiliates are actually unprofitable, while a small niche partner has the best conversion rate. That kind of clarity is impossible without proper tracking.

    In 2026, with privacy changes and cookie loss, Event-Based tracking and first-party data are your biggest advantages. The setups we’ve shown you are built to survive those changes.

    ⚡ Your Next Step (Do This Today)

    1. Open Google Tag Manager and create your GA4 configuration tag (15 minutes).
    2. Enable enhanced measurement in your GA4 stream, including outbound click tracking.
    3. Create one custom event for affiliate clicks with network parameters (20 minutes).
    4. Test with DebugView by clicking an affiliate link.
    5. Bookmark this page and move on to Phase 3 when you’re ready for conversions.

    Ready to Get Results?

    Get your affiliate tracking fixed and start growing revenue — we’ve done this for brands across Dhaka and the world.


    🗓 Book Your Free Strategy Call →

    💬 Drop “affiliate tracking” in the comments and we’ll send you our free GA4 affiliate tracking checklist — no email required.

    Leave a comment

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

    Ready to apply this?

    Need help with your analytics?

    Book a free 30-minute call. We will tell you what we would do first, whether or not you hire us.

    Get a free tracking audit WhatsApp us