Integrating Google Analytics with Affiliate Tracking Software

Peter Hamilton

Google Analytics software integrations - affiliate tracking software

2019 Update: HasOffers has rebranded to TUNE! See our affiliate tracking software features here or read the rebrand announcement here

How to Integrate Google Analytics with Affiliate Tracking Software

Most advertisers rely on Google Analytics, so why not integrate your affiliate tracking software and performance advertising campaigns to provide additional insight, as well as a platform for channel comparison? This type of integration really allows you to see the value of affiliate traffic.

How many pages do users from affiliate A see versus page views from affiliate B? Does traffic from affiliate C have a high bounce rate? (Could mean they’re providing poorly-targeted traffic.) With insight into your affiliate marketing program through Google Analytics, you can know the answers to these questions and even create custom offers with unique purchase paths to improve conversion rates.

In this post, we will outline the process to sync the click data from your affiliate tracking software with Google Analytics, as well as provide some best practices for recording conversions in both systems.

Integrating Clickstream Data

To show affiliate activity in Google Analytics (GA) clickstream data, you will need to map over the variables in your affiliate tracking software to GA’s referral variables.

This can be done by using Google’s URL Builder.

Google Analytics URL Builder

Step 1. Enter in the destination URL as the Website URL. This is the URL that would be used as the Default Offer URL in HasOffers.

Step 2. Enter in the HasOffers placeholder variables for the various items:

Campaign Source: aff{affiliate_id} Campaign Medium: affiliate Campaign Term: {source} Campaign Content: {aff_sub} Campaign Name: {offer_id}

Step 3. Click the Generate URL button. It will generate a URL similar to the one below:

However, Google’s URL builder encodes the { and } characters and replaces them with %7B and %7D. You will need to replace them with the original characters. These characters need to be non-encoded so that the TUNE servers can identify the placeholder variables and replace them with their corresponding value.

So, the correct link should appear like this:{affiliate_id}&utm_medium=affiliate&utm_term={source}&utm_content={aff_sub}&utm_campaign={offer_id}

HasOffers' Offer URL Configuration

Simply place the URL above as the Default Offer URL for the Offer in your HasOffers network.

When affiliates generate a tracking link, this will be the destination (or the place users will land after clicking an affiliate’s link). TUNE’s servers load the Offer URL above and replaces the placeholder variables with the correct values, redirecting the users to the URL.

Affiliate ID 10 promoting offer 5 with a source of “email01” and aff_sub of “50505050” redirects users to this page:

Congratulations! HasOffers tracking data is now mapped over to Google Analytics. You can now use Google Analytic’s dashboards to gain further insight into each affiliate’s performance.

Diving Deeper into Conversion Data

You should already be using Google Analytics to record conversions, using what GA refers to as “Goals.” This functionality works by defining a goal, along with a funnel of pages leading to that goal. Each page in the funnel is like a step in the purchase path, with the final goal usually representing a lead or sale.

Learn more about Google Analytics Goal functionality here.

Google Analytics Goal Settings

Google Analytics works solely with client-side tracking. They don’t have any APIs or allow server-side tracking to record conversions on goals. So this does limit an advertiser’s ability to record conversions for goals that don’t happen on the “client-side.”

Since Google Analytics tracks site-wide, you place a JavaScript tracking code on all of your pages, including all pages in the purchase path. Then when defining your goals in the GA interface, you specify the URL of the purchase as one of the goals. If the purchase happens and the user is directed to, then this would be the URL you need to use for the goal.

Google Analytics Conversion Pixel

Here’s a cool trick:

Google Analytics doesn’t allow you to pass in a merchant ID or another unique ID to identify the conversion. But you can append the merchant ID or other unique identifier to the end of the URL for the “thank you page” or conversion page. Then Google Analytics will show you the full page URL for the conversion which would include unique variables you’ve set in the URL.

If your billing system generated an order ID of 12345, then you should make sure that number is appended to “thank you page” like this: It doesn’t matter what data you append or how, it just needs to be appended to the URL.

Since HasOffers is affiliate tracking software, it tracks conversions, so all you need to do is place the conversion pixel for the offer from your HasOffers network on the same page that you’ve defined as the goal for the purchase. On the /thankyou.php page, you would place the conversion tracking pixel to notify your HasOffers network of the conversion.

If the confirmation page, or the page the pixel is being placed on, is HTTPS then you need to make sure you place an HTTPS pixel. Otherwise, browsers will block the non-secure HTTP content on secure HTTPS pages. However, you can place HTTPS pixels on HTTP pages without any problems.

We recommend that you pass the same order ID or unique identifier from your billing system into the HasOffers conversion tracking pixel as an advertiser Sub ID. This way you can reconcile the conversions in your affiliate tracking software with those in your billing system as well as in Google Analytics. In the previous example, we would just append this to the end of the URL in the HasOffers conversion tracking pixel (&adv_sub=12345).

Mastering Conversion Tracking with Affiliate Tracking Software

Integrating affiliate tracking software like TUNE with Google Analytics is pretty incredible for anyone who loves to study their sales funnel. It not only helps you identify which affiliates are performing and the quality of their traffic, but with that last trick, it will even let you pass a unique ID to better identify conversions. Go ahead and give it a shot and let us know how it goes!

Peter Hamilton

A digital marketer by background, Peter is the former CEO of TUNE, the enterprise platform for partner marketing. In 2018, he sold TUNE’s mobile measurement product to Branch, unifying measurement and user experience. He led TUNE’s efforts to bring better management technology and automation to marketing partnerships, across affiliates, influencers, networks, and business development relationships. Follow @peterhamilton

7 responses to “Integrating Google Analytics with Affiliate Tracking Software”

  1. Chris says:

    Awesome. Just integrated on our site. Thanks!

  2. How much of this post is relevant for iOS & Android? When I read Google Cost of Source feature in analytics, I think web only. Same here…I’m wrong?

  3. Cory Schop says:

    Is this still the best option to go with to get hasoffers clicks showing up in Google Analytics?

  4. Paulo Alex says:

    Hi, I’m not able to integrate with Adwords. HasOffers is getting the conversions but not Google Adwords Dashboard. Already contacted both support teams and it seams they are not able to see what is the problem. Can you help me on this ?

  5. michalpelikan says:

    Hello Lucas, could you please re-upload all images in this article?

Leave a Reply