Tracking Affiliate Clicks in GA4: 2 Methods

An experienced expert and coach in technical marketing. I help companies bridge the gap between marketing strategy and their data by helping them really use their data. Got curious?

If you earn money through affiliate links, you’ll want to know which pages and which links are generating clicks. GA4 doesn’t track that accurately on its own. I wrote a guest blog post for Analytics Mania outlining two ways to do this effectively. Here’s a summary.

Method 1: GA4 only

With Enhanced Measurement, GA4 tracks outbound clicks by default as the event click, with the destination specified in the parameter link_url. You can build on that:

  • Use DebugView to verify that the clicks are being received and that link_url contains the affiliate domain.
  • Under Admin > Events, create a new event affiliate_link_click based on click plus a condition on link_url.
  • Multiple affiliate partners? Use a regex with pipes, for example bol.com|amazon.

It's fast and requires no additional tools, but you're limited to 50 custom event rules per property.

Method 2: Google Tag Manager

  • Enable the built-in click variables, especially Click URL.
  • Create a "Just Links" trigger that fires when the Click URL contains the affiliate domain.
  • Create a GA4 event tag with the name affiliate_link_click and include the Click URL as link_url.
  • Test in Preview mode and then in DebugView.

This takes a little more work, but you have more control and no limit on the number of lines. I prefer this method.

Reporting

After about 24 hours, create a free-form report in Explore with the dimensions "Event name," "Link URL," and "Page path," filtered by affiliate_link_click. This way, you can see which links are generating revenue on each page.

Please note

Choose one method. If you use both, you'll count each click twice.

Read more

Check out the full article on Analytics Mania, which includes step-by-step screenshots, or contact us if you'd like us to set it up for you.

Blogs

Related articles

Are you ready for the next step?

Get in touch