What is Affiliation in Google Analytics?
If you're using Google Analytics to track e-commerce performance, you're likely familiar with dimensions like Source/Medium, Campaign, and Landing Page. But there's a powerful and often-overlooked dimension called "Affiliation" that can bring incredible clarity to your sales data, especially if you work with partners, marketplaces, or affiliate programs. This article will show you what the Affiliation dimension is, how to set it up in Google Analytics 4, and how to use it to get a clearer picture of where your sales are actually coming from.
What Exactly is the "Affiliation" Dimension in Google Analytics?
In simple terms, the "Affiliation" dimension is a label you use to identify the specific partner, store, or affiliate site that generated a sale. It answers the question, "Which partner organization should get credit for this transaction?"
This is different from the much more common "Source / Medium" dimension. While Source / Medium tells you where the traffic came from (like "google / organic" or "facebook / cpc"), Affiliation tells you which entity gets the business credit for the sale.
Let's look at a few examples where this distinction is important:
- E-commerce Marketplaces: Imagine you sell your products on your own website, but also on a partner marketplace like Target.com. The traffic source might be Google, but the affiliation could be "Target Marketplace" to show that the sale happened there, not on your site.
- Affiliate Marketing: If you run a blog and promote products through different affiliate networks, you could use "Amazon Associates," "ShareASale," or "CJ Affiliate" as your affiliation values to see which network is performing best.
- Multiple Store Locations: For a business with physical stores that also take online orders, affiliation can be used to track sales by location, such as "Downtown Branch" or "Westside Store," helping you credit the right team for online sales in their region.
Think of it as adding a layer of business context on top of your traffic data. A single Source/Medium like "affiliateblog.com / referral" might send you customers who ultimately purchase through different affiliate networks. The Affiliation dimension lets you neatly sort those sales into the correct buckets.
Why Should You Bother Using the Affiliation Dimension?
Setting this up takes a small bit of technical work, but the payoff is significant. When implemented correctly, the Affiliation dimension gives you several key advantages.
1. Accurate Partner and Affiliate Performance Tracking
Many marketers try to track affiliate performance by stuffing information into UTM campaign parameters (e.g., utm_campaign=shareasale-partner-xyz). This can get messy fast and clutters up your campaign reports. Using the dedicated Affiliation dimension is a much cleaner way to see exactly which partners drive revenue, not just clicks. You get a clear, top-level view of affiliate network performance without having to filter through hundreds of campaign names.
2. Simplified Commission and Payout Validation
If you're paying out commissions based on sales, you need accurate, reliable data. You can build reports in Google Analytics showing total revenue attributed to each affiliation (e.g., "Amazon Associates"). This makes it easy to cross-reference the sales reports you get from your affiliate networks, ensuring you're paying and being paid correctly.
3. Deeper E-commerce Insights
The real power of Google Analytics comes from combining dimensions. When you have Affiliation data, you can ask much more interesting questions:
- Which products sell best through my "ShareASale" affiliates compared to my "Impact" affiliates?
- Does the "Downtown Store" affiliation have a higher average order value for online purchases than the "Uptown Store"?
- What is the purchase-to-view rate for products promoted by "Top Influencers" versus "Coupon Sites"?
This level of detail moves you beyond simple traffic analysis and into strategic decision-making about your partnerships.
How to Set Up Affiliation Tracking in Google Analytics 4
Since Google Analytics 4 is now the standard, we'll focus on how to implement affiliation there. The concept is based on sending e-commerce data to Google Analytics through a "data layer," which is a small snippet of code that holds information on your page. This is most easily done using Google Tag Manager (GTM).
The affiliation is passed as a parameter within the standard GA4 purchase event. Here is what the code (the data layer) on your confirmation page might look like:
<pre><code><,script>, window.dataLayer = window.dataLayer || [], window.dataLayer.push({ event: 'purchase', ecommerce: { transaction_id: 'T-123456', affiliation: 'ShareASale', // This is the key part! value: 45.99, tax: 2.50, shipping: 5.00, currency: 'USD', coupon: 'WINTERFUN', items: [ { item_id: 'prod-abc', item_name: 'Fleece-Lined Beanie', item_brand: 'CozyHats', price: 38.49, quantity: 1 } ] } }), <,/script>,</code></pre>
Your developer would need to ensure that the affiliation value is dynamically populated with the correct affiliate network or store name when a purchase is completed. Once that data is available on the page, you can send it to GA4 using Google Tag Manager.
Using Google Tag Manager to Capture the Affiliation
Even if you're not a developer, it's helpful to understand the basic steps in GTM for wiring this up.
- Create a Data Layer Variable: In GTM, you first need to create a variable that can read the affiliation value from the data layer. You'd go to Variables > New > Data Layer Variable and set the "Data Layer Variable Name" to
ecommerce.affiliation. Give it a descriptive name, like "DLV - ecommerce - affiliation". - Configure Your GA4 Purchase Tag: Find your main "GA4 Event" tag that fires for purchases. Inside this tag editor, under "Event Parameters," you'll add a new row. Set the "Parameter Name" to
affiliationand set the "Value" to the variable you just created:{{DLV - ecommerce - affiliation}}. - Set the Trigger: Make sure this tag is set to fire on the custom event that matches your data layer, which in our example is called
purchase.
That's it! Now, every time a purchase event is sent to GA4, it will include the affiliation details provided in your data layer.
How to See Your Affiliation Data in GA4 Reports
You’ve done the setup work, now it's time to enjoy the fruits of your labor. While "Affiliation" isn't a primary dimension you'll see in most of GA4's out-of-the-box reports, getting to it is easy by building a quick exploration report.
Here’s a step-by-step guide to create your first Affiliation report:
- Navigate to the Explore section in the left-hand navigation of GA4.
- Click on Blank report or Free-form exploration.
- In the Variables column on the left, next to "DIMENSIONS," click the "+" sign.
- Search for "Affiliation". You should find it under 'Ecommerce'. Check the box next to it and click "Import".
- Now, back in the Variables column, do the same for METRICS. Click the "+" sign and import key metrics like "Ecommerce Revenue," "Purchases," and "Average purchase revenue."
- Drag the Affiliation dimension from the Variables column and drop it into the Rows section under "Tab Settings".
- Drag the metrics you imported (like Ecommerce Revenue and Purchases) into the Values section.
Instantly, you will see a clean table showing you a performance breakdown for each of your affiliations. From here, you can add secondary dimensions (like Item Name or Session Campaign) to get even more granular with your analysis.
Final Thoughts
To sum it up, the Affiliation dimension in Google Analytics is a dedicated, clean, and effective way to credit sales to the right partners, marketplaces, or stores. Taking the time to set it up provides more accurate reporting and deeper strategic insights, helping you understand which partnerships are truly helping you grow your business.
Of course, stitching together a full picture of your performance - from ad spend on Facebook, to email engagement in Klaviyo, to affiliate revenue in Google Analytics - is often where the real reporting headaches begin. At Graphed, we specifically solve this problem. After connecting your tools in just a few clicks, you can use plain English to get answers from all your data at once. Instead of building exploration reports, you can simply ask, "Show me my top performing affiliates by revenue last month and compare it to our Facebook Ads ROAS" and get a beautiful, shareable dashboard in seconds.
Related Articles
What SEO Tools Work with Google Analytics?
Discover which SEO tools integrate seamlessly with Google Analytics to provide a comprehensive view of your site's performance. Optimize your SEO strategy now!
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.
How to Create a Photo Album in Meta Business Suite
How to create a photo album in Meta Business Suite — step-by-step guide to organizing Facebook and Instagram photos into albums for your business page.