AdWords Conversion Tracking for Affiliates

AdWords Conversion Tracking

AdWords Conversion Tracking

Update – August 2016: When Google changed the way display URLs and destination URLs worked in 2015, they told me the URL redirection method shown in this article was no longer permitted. However, they have just informed me that this was incorrect, and this method CAN still be used!

[If you want to learn more about AdWords, and how to get the best out of it, please see this article on the best ways to learn AdWords.]

If you’re an Affiliate Marketer using Google AdWords to promote affiliate offers, you will want to be able to track conversions and see which of your AdWords Campaigns, Adverts and Keywords make you money. And which lose you money…

That is the key to success in PPC Affiliate Marketing — being able to scale up campaigns that work and to identify and kill campaigns that don’t, so you maximise your profits and don’t waste money on Ads or Keywords that don’t convert.

AdWords does have a very good Conversion Tracking facility which works by putting a snippet of code on your shopping cart checkout page, or any other page that represents a successful conversion. AdWords will then track your conversions, and armed with this information you can optimise your campaigns directly within the AdWords interface, and even get AdWords to automatically optimise for the maximum conversions (although I don’t recommend you do this — more on that later).

That’s all great.

But what if your checkout page is not on your own site so you can’t place the AdWords conversion code on it?

Tracking conversions that happen off your site

For most affiliates, the sale or event that earns commission, occurs on somebody else’s site. Typically you will funnel your visitors from your advert, to a landing page on your own web site, and then onto the merchant’s website which is where the actual conversion occurs.

You can place an AdWords code snippet on your own site but that isn’t where the conversion happens. You can setup a click on the link on your site that takes them to the merchant’s site as a ‘conversion’ that you can track in AdWords, but this isn’t an actual conversion, just a click through to the merchant.

In the absence of anything else, the ability to see which of your AdWords clicks result in a click through to the merchant’s site is useful, but it doesn’t tell you which of these clicks actually result in a commission.

The problem is, for the sale to be recorded as a conversion within AdWords, you need to be able to put the tracking code on the Merchant’s site and you don’t have access to this.

If you are direct linking, ie. sending people direct to the merchant’s site, you are even more hampered.

This is something that I struggled with for years in my own affiliate campaigns. Unfortunately eBay wouldn’t give me source code access to their site…

I was spending a huge amount on AdWords but I couldn’t directly track which keywords and ads resulted in commissions, or the amounts they earned. If I had been able to do this, I would have been able to improve my profitably hugely, but I couldn’t find a way.

I spent days/weeks/months looking for a way to do this and eventually gave up. It was the Holy Grail and I couldn’t find it.

In fairness to me, I don’t think it was possible when I was trying to do it a few years ago, but it is now and it’s surprisingly easy when you know how to do it.

How does affiliate conversion tracking work?

Most affiliate programs or networks allow you one or more custom fields in their tracking systems that you can use in whatever way you want.

This field might be called something like Sub Id or Custom Id. You can pass a variable in your links that is inserted into this field, and this variable will be shown in the Merchant or Network’s reporting.

So a typical affiliate link might look something like this:

http://www.affiliateoffer.com/landingpage.html?affiliate=’my_affiliate_id’&SubId=’my_tracking_code’

Your earnings report from the merchant would show the commissions you have earned and the Sub Id, or your tracking code, alongside each one.

So you can relate your earnings to the tracking code that you sent in your link.

This can be very useful — you can use it to indicate which campaign sent the visitor, which of your landing pages they came from, or any other information that is helpful to you.

I would typically use this to show several different pieces of information. I wanted to know which page on my site the visitor came from, which link they clicked on that page, which site they were on before they came to my site (the referrer), and if they came from an AdWords campaign, I wanted to know which keyword triggered the Ad, and also whether they were on a computer or a mobile device.

Getting click information out of AdWords with ValueTrack

AdWords will give you some useful information about what triggered the click by passing it as querystring variables in the landing page destination URL.

I used it to pass the keyword that triggered the AdWords Ad, and the device type, so my AdWords Destination URLs would look something like this:

http://www.merchantsite.com?affiliateID=123456789&subid={keyword}:{device}

In this case, AdWords dynamically inserts the keyword and the device into the placeholders in curly brackets.

So the Sub Id that ends up in the merchant’s report would be something like:

buy cheap cameras : mobile’ or ‘best holiday deals : computer‘.

I actually send a lot more information than that in my Sub Ids but this is how I get the AdWords part of it. You can extract other data too, more information on this here: https://support.google.com/adwords/answer/2375447?hl=en

So I would gather all this information into one string, with the different fields separated by colons, and send this as a Custom Id in my affiliate link.

When I got the earnings report I could see for each commission I earned, where that visitor came from, and all the other information listed above. That is all incredibly useful information and it helps in optimising my campaigns, but it’s a very labour-intensive and tedious process analysing all that information, and then manually making adjustments to my AdWords campaigns based on my analysis.

What I wanted to do was to link each commission payment back into AdWords as a conversion, just like I could if the conversion (sale) was happening on my own site, so I could see the earnings for each AdGroup, Keyword, Advert, Location, Time of day, etc. within the AdWords interface.

Importing offsite conversions into AdWords

You can do exactly that. It’s not difficult and it makes it very easy to then optimise your affiliate earnings from your AdWords PPC campaigns.

AdWords passes a querystring parameter called gclid (Google Click Id) with each click.

This is a unique identifier for each click which identifies the Campaign, AdGroup, KeyWord, Advert etc. it came from. If you pass this gclid parameter with your affiliate links, and put it into your Sub Id or whatever custom tracking field your merchant gives you, you can relate your affiliate earnings to each AdWords click.

You then just create a simple table containing the gclid, date, time, and value of each commission you earned and periodically import this into AdWords.

Your AdWords reports will then show you not just how much you spent (by Keyword, Ad, Location, Time of day, Device etc.), but also how many conversions you got, what the conversion rate was, and even how much you earned.

So you have complete, direct, end-to-end linking of your advertising expenditure and your earnings. The Holy Grail is in your hands!

How to pass the gclid to your affiliate links

The first step is to pass the gclid into your Sub Id, or whatever your custom tracking field is called.

Adwords appends this to each click as a querystring parameter (Note: you must have Autotagging switched on in your AdWords control panel for this to work).

So whatever your destination URL is, e.g.:

http://www.affiliateoffer.com/landingpage.html?affiliate=’my_affiliate_id’&campaign=’my_campaign’&source=’my_source’
(If it is a direct link to the merchant’s website).

or something like:

http://www.mysite.com/mylandingpage.html?campaign=’my_campaign’&source=’my_source’
(If it is a link to your own website which then sends people on to the merchant’s site).

it will have an invisible &gclid=’XXXXXXX’ appended to it.

We just want to read this gclid parameter from our AdWords clicks and pass it through to the merchant as our Sub Id, Custom Id, or whatever tracking variable they give us.

Although in other campaigns, I write a Sub Id containing several pieces of information into my affiliate links, for your AdWords campaigns I recommend that you make the Sub Id contain just the gclid and nothing else. It’s much easier that way, and for AdWords campaigns the gclid contains everything you want to know anyway.

The difficulty is in getting the gclid into your Sub Id field as they are separate parameters. There is no way to say ‘Sub Id = gclid’ in your destination URL as they are separate values. We have to use a bit of code on our landing page to read the gclid and write it into our outbound link as the Sub Id (or whatever we are using).

It’s very simple to do this in PHP. Here is an example code snippet that will read the gclid from the inbound click and create an outbound link URL with the gclid written into a parameter called ‘subid’.

<?php
$gclid=$_GET['gclid']; //Read gclid and store it in $gclid
$outgoinglink = 'http://www.merchants_website.com/mylandingpage.html?affID=12345&subid='. $gclid;
?>

 

You just alter the outgoing link to match your existing affiliate link and then use the php variable $outgoinglink as your link wherever you use your affiliate link.

Pretty simple!

But what if you are direct linking — sending people direct to the merchant’s site without going via your own site first?

What you have to do then is to send the click through to an intermediate tracking page, which reads the gclid and writes it into the Sub Id field, and then redirects the click to the Merchant site.

Sounds difficult? Don’t worry, it’s actually quite simple. Just a couple of lines of PHP code and a one page website.

First of all you are going to need another website which will do this tracking and redirecting. I’m assuming that if you are an affiliate already then buying a domain for a couple of dollars (or using an existing one, or a subdomain) and setting up some simple hosting for one PHP page is reasonably straightforward for you. If you are stuck you can always ask me or leave a comment below.

One thing to note: Google are very fussy about destination URLs. The user must end up at the domain shown in the display URL, if they end up somewhere else then the Ad will be rejected because ‘display URL and destination URL do not match’. You are allowed however to send them via a tracking URL, as long as they still end up at the domain shown in the display URL.

Just to make it clear to Google exactly what I’m doing, so there is no misunderstanding, I normally use a subdomain called tracking for this purpose, e.g. ‘tracking.mydomain.com’. Then if Google are concerned that my destination domain is different from my display domain they can see it’s only a tracking URL. It redirects straight away to the display URL so there shouldn’t be a problem, it is allowed. I’m just making it very obvious what’s happening to avoid any problems.

So what we need to do is to send the AdWords click to our tracking page, capture the gclid from the incoming click, write it into the Sub Id field (or whatever it’s called in your case), and then send the visitor on their way to the landing page.

There are a number of ways you can do this. You could write a single, parameter-driven tracking page which you can use for lots of different campaigns, in which case you will have to pass lots of information to it to tell it where to redirect to, and what your affiliate Id is and so on.

Or you can create a single-purpose tracking page which only does one offer, and you create a separate tracking page for each campaign. For the sake of simplicity, this is the approach I’m going to use here to demonstrate the method.

So, to recap, we need to create a page that reads the gclid from the incoming click from AdWords, writes this into the Sub Id in the querystring in your affiliate URL on your merchant’s website, and then redirects them to the merchant’s site.

It’s pretty simple:

<head>
<title>Loading...</title>
</head>

<body>

<?php
$landingurl = 'http://www.merchants_website.com/mylandingpage.html?affID=12345&subid=';
$gclid=$_GET['gclid'];
$landingurl = $landingurl . $gclid;
?>

<meta http-equiv="refresh" content="0; url=<?=$landingurl?>">
</body>
</html>

 

You just replace the website and landing page with your own and add any other parameters you require such as the Affiliate Id in the example above and you’re done.

Whilst you’re at it, this gives you a golden opportunity to drop a retargeting pixel — something you can’t normally do when you’re direct linking. Just place your retargeting code in the head part of this page and you can then retarget people who clicked on your Ad.

Retargeting or Remarketing, whichever you choose to call it, is huge at the moment and is a valuable tool in any marketer’s armoury. With direct linking, you can’t normally use it but with this method you can!

So you can drop your Facebook retargeting pixel on your AdWords traffic, even if you are sending them to somebody else’s site. This is HUGE!

Setting up tracking in your AdWords ads

When you create your ads using the tracking page, you enter the final landing page URL into the Final URL field, and you enter the URL of your tracking page into the field called Tracking template.

So in the example below, the URL that the user will end up on is http://www.macbooty.com/secondhand/macbook-pro.php.

In the advert, the URL will be displayed as just the the domain part of that, plus anything else specified in the path fields, to create a friendly looking display URL, in this case macbooty.com/MacBook-Pro.

The tracking page which redirects to the final URL is entered into the tracking template field, in this case it is tracking.axiom.co.uk/macbootyuk/sh_macbookpro.php with a whole load of querystring parameters appended to it. The tracking page processes these in the manner described above and writes them into the Custom ID.

cross domain tracking with adwords

Importing Affiliate Conversions into AdWords

You should now see the gclid for each of your sales in your affiliate reports from your merchant or network. You just need to import each of these sales (conversions) into AdWords, together with their corresponding value.

This process is fully documented in this AdWords help document but I’ll summarise it briefly so you know what’s involved. It’s pretty simple.

First of all you need to setup a new conversion type called ‘import’ in your AdWords account

  1. Click the Tools tab, and select Conversions from the drop-down menu.
  2. Click the + Conversion button.
  3. Enter a name for the conversion type you’re creating. (It’s important that you remember the exact name and spelling because you’ll need to enter this name later, when you upload your offline conversion information.)
  4. In the “Source” field, select Import.
  5. Click Save and continue.
  6. Select the conversion category that best fits your new conversion.
  7. Select an optional conversion value if you wish, and click Save and continue. The value will apply to any imported conversions that don’t have a value set when you upload them.
  8. Click Done.

Next you need to create a simple spreadsheet containing details of all your sales. Download a template for this here.

All you do is to create a table of your sales with their gclids and corresponding values in the format shown in the template and then upload this table into AdWords. Full details are in the AdWords help document so read it when you’re ready to proceed.

A few hours later, you will be able to see your conversions in your AdWords account, just as you would if they occurred on your own site.

You will need to repeat this process periodically (anywhere between daily and weekly depending upon your sales volume) to upload the latest conversions to AdWords. It’s slightly tedious to have to do this manually, but the value of the information obtained is so huge this task pales into insignificance.

Optimising Affiliate Conversions in AdWords

Now that your conversions (affiliate sales) are reported directly in your AdWords interface, you can optimise your AdWords campaigns to maximise your profits. You can see at a glance which Ads, Keywords, etc. make you money, and which lose it, and adjust your campaigns accordingly.

I’m not going to explain how to optimise your AdWords campaigns with conversion tracking as that is a huge subject of it’s own outside the scope of this article. One thing I will say though is don’t just blindly use Google’s own ‘optimise for conversions’ setting and hope for the best. It can be useful but use it with caution.

I have tested it and found that it did a very good job of optimising the amount of money I paid Google. It was extremely good at that, but it wasn’t quite so good at optimising my profit. I’m not saying it’s bad, there is a lot of sophisticated technology behind it, but after testing it extensively (albeit a while ago), I found I could optimise my profits better myself.

Having said that, optimising manually takes time and if you don’t have the time then automatic optimisation is probably better than not optimising at all, but just be careful. Your expenditure can run away with you. As with everything, test it and find out what works for you.

The main thing is you now have a way to track your off-site conversions directly within AdWords which gives you the opportunity to maximise the ROI on your AdWords campaigns. How you use it is up to you, but used wisely it should increase your profits significantly, maybe even enormously.

Conversion Tracking, Google, and Affiliates

Many affiliates have a problem with Google knowing anything about their conversions. Quite a lot of affiliates won’t even use Google Analytics because they feel it gives Google too much information which they think will be used against them.

Google has certainly given affiliates a rough ride over the years. Some affiliates have even been effectively put out of business by a change in Google policy, or a new search algorithm. Every affiliate will at some time had some problems with Google in one form or another, and I’ve certainly had my share, but are these fears justified?

My belief is that they are not. Google’s actions ‘against’ affiliates have been for one reason, and one reason only — to improve the quality of their search results and their advertising.

Google lives and dies by the quality of the experience they give their users. It is all about the results and nothing else.

Why did Google become so successful and blow all of the other search engines out of the water?

Because their search results were better, so we all started using them instead of all the others. The instant their search results become worse than somebody else’s, everybody will stop using Google and use the new one instead.

So Google HAVE to make sure their search results are the best available, and that people find what they are looking for, or they will be out of business. That’s why they are serious about search quality — it is a matter of survival for them. Life or death.

Now whilst there are a lot of good affiliates out there producing quality content and adding real value, we all know that for every ‘good’ affiliate there are probably a thousand bad ones, throwing up all sorts of poor quality, spammy or even downright fraudulent landing pages in an attempt to make money.

If all that rubbish was appearing in the Google search results then you’d never find what you were looking for and you’d soon stop Googling. So they have to control it, and control it they do. Very effectively.

But are they out to deliberately harm Affiliates? No, I don’t believe they are. If what you are doing is poor quality, or a bad user experience, then they will stop you advertising and remove you from the search results. But they will do this anyway, whether you are tracking your conversions in AdWords or not.

Is tracking your conversions in AdWords likely to harm your business because you are an affiliate? No, I don’t believe so.

As long as what you are doing complies with AdWords Policy and is in keeping with best practices and quality guidelines, they want you to do it as much as possible. Google make a lot of money from AdWords and it’s in their interest for you to be successful, providing you aren’t doing anything wrong. That’s why they provide these tools  — so that you can make money by advertising on AdWords, and therefore do more of it.

Of course if this page disappears from the search results in a few days and you don’t see my adverts any more, then you’ll know I was wrong…

Did this article help you?

If you found this article helpful, please share it via the sharing buttons below, email it to your friends, tweet about it, post it on Facebook, and paint the URL on motorway bridges. If you want to know the best ways to learn AdWords, read this article on AdWords Training.

If you have any questions or comments, or need any help with anything in this article, please leave a comment below or just ask me and I’ll do my best to help you.

Recommended Reading

If you enjoyed this, here are some more articles that may interest you:


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}