Integrating Google Analytics with Affiliate Tracking Software

Integrating Google Analytics with Affiliate Tracking Software.

Most advertisers rely on Google Analytics, so why not integrate affiliate tracking and performance advertising campaigns with Google Analytics 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, probably means they’re providing untargeted traffic? With insight into your affiliate 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 I 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) click stream data, you will need to map over the variables in your affiliate tracking software (HasOffers) 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:

http://www.product.com/?utm_source=aff%7Baffiliate_id%7D&utm_medium=affiliate&utm_term=%7Bsource%7D&utm_content=%7Baff_sub%7D&utm_campaign=%7Boffer_id%7D

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 HasOffers servers can identify the placeholder variables and replace them with their corresponding value. So the correct link should appear like this:

http://www.product.com/?utm_source=aff{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). HasOffers’ 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:

http://www.product.com/?utm_source=aff10&utm_medium=affiliate&utm_term=email01&utm_content=50505050&utm_campaign=5

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:

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 http://www.product.com/thankyou.php 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: http://www.product.com/thankyou.php?order_id=12345. It doesn’t matter what data you append or how, it just needs to be appended to the URL.

Since HasOffers just tracks conversions, 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 /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.

I 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 HasOffers 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).

How much do you care about conversion tracking?

Integrating your affiliate tracking software with GA is pretty incredible for anyone who loves to study their 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!

Lucas Brown
http://www.tune.com

Lucas and his twin brother Lee began their first businesses before starting high school in their hometown of Elma, WA. They quickly found this world suited him, launching other successful businesses in college and reporting their first million dollars in revenue as sophomores in their dorms. Developing unique solutions for their own ad network, Lucas had the foresight to white-label their technologies to empower other businesses, which quickly became the birth of TUNE. As Chief Product Officer, Lucas leads agile product teams that strive to quickly meet the needs of an ever growing client base. As a founder, Lucas and his twin brother Lee supported the company in the beginning, growing to profitability by 2010. Lucas' expertise in complex business models, integrations, implementations, and his constant drive for innovation make him a cornerstone of this Seattle based startup. Lucas graduated from Babson College in Boston, MA.

  • http://www.callloop.com Chris

    Awesome. Just integrated on our site. Thanks!

    • http://www.hasoffers.com/about Lucas Brown

      Sweet Chris! Love to know what insights you’re able to gain. Keep us updated :)

  • http://www.facebook.com/ailand Mathieu Castelli

    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?

  • Cory Schop

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

  • Paulo Alex

    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 ?