What is Ad Tracking Really? Part 2
In What is Ad Tracking Really? we talk about tracking your articles as an example of ad tracking with some PHP code. If you haven’t read it you should do so now as it’s the basis for everything we are going to cover today.
Some basic PHP code is a simple means in which we can track all are affiliate advertising including PPC. Basically we are doing simple keyword tracking and in the case of PPC were going to take advantage of Dynamic Keyword Insertion (DKI) to get the job done. What’s really cool is you can actually take advantage of the DKI to make you site more relevant too. That’s a topic for another day though.
So how can you use some simple PHP code to track your PPC ads?
Lets go over the code in more detail. The goal here is to keep your ad tracking simple but still know what’s working and what’s not working.
So we start with your destination URL’s for your PPC campaigns. We’ll use Adwords as an example since it’s one of the most popular out there or was until Big G decided to show it’s tail and destroy it’s advertiser friendly reputation by treating it’s advertisers like total and utter CRAP! To me what they did was very hypocritical. That aside Adwords is still very popular and with good reason, with properly constructed campaigns, it works…
The code will be very similar to what we used in ‘What is Ad Tracking Really?’ for tracking articles. We’ll just take advantage if DKI. So let’s look at the tracking links and how you use them with your PPC campaigns.
You’ll want to add a little code to your Destination URL. It should look like this:
YourDomain.com/?a={keyword}
If your doing a landing page it can also be YourDomain.com/LandingPage.php?a={keyword}
The {keyword} is DKI code. What it will do is append whatever keyword was search for to find your ad to the end of the destination URL so you can carry it to your website and use it to your advantage.
Now one thing that you’ll want to do is use .php pages if at all possible. It just makes your ad tracking much easier. But if you’re not there is a work around. You can create an .htaccess file. Open up a text editor like notepad and paste the following code into it:
AddHandler application/x-httpd-php .html
Then save it as .htaccess and upload it to the root of your domain.
Ok, a quick note, PHP pages are the same as HTML pages. You can use them without fear of problems. If you’re just getting started with your website and ad tracking now is a good time to switch everything to PHP pages. Try to make sure you’re not indexed in the search engines yet. You can do that by going to the search engine and typing in ‘site:yourdomain.com’ without the quotes.
Ok back to the ad tracking fun.
Once you create your destination URL with the DKI code added we’ll need to setup your landing page to grab the code and add it to your affiliate link. You can do this by adding the following code to the very top your landing pages in the HTML code:
<?php
$page = $_GET['a'];
?>
What this will do is grab the variable ‘a’ which is the searched keyword we got from the DKI code so you can use it. Now you can simply add that variable as a tracking subid to your affiliate link on each page. You can do that easily by adding the following code:
youraffiliatelink.com/?subid=<?php echo “$page”; ?>
What we are doing here is taking advantage of SubID tracking available with most affiliate networks. Were using some simple code to carry the searched keyword down to our landing pages and append them to are affiliate links so we know which keywords are getting us the conversions.
It’s by no means a perfect ad tracking solution, but it is effective if you have nothing else and can be used in conjunction with article and other web link tracking.
So how does this relate to the different tracking software available?
Most of the ad tracking software available use some form of this very technique to get the job done. We can compare this simple technique to a very popular tracking software called Prosper202. While Prosper202 is much more complex and can do a myriad of things, it works on a similar principal. Let’s look at what a P202 tracking link looks like:
http://ad-trackr.com/AdTracking-101/?t202id=2917&t202kw=
Looks pretty similar to the code we used above, huh. The actual landing page with a couple of variables added. Now there are some more complex things happening on the server side, instead of adding the keyword to your affiliate link Prosper202 adds a number that goes up in sequence to your affiliate links.
You also place some Java Code on your landing page to pull the data instead of the simple PHP code we used. But despite what happens on the backend the code is similar and is the basis for all your ad tracking. It really is important to understand how this stuff works so you can troubleshoot and test all your ad tracking before spending a bunch of money to find out it’s not working properly.
It’s a costly mistake, been there, done that, got the tee shirt and it wasn’t fun. Hopefully understanding your ad tracking capabilities will save you the pain of spending a bunch of money for absolutely nothing to find out things just weren’t working.
In the last article of this series were going to dive a bit deeper into Prosper202 so you can get a better understanding of how it works. This will make setting up your Prosper202 ad tracking campaigns much easier.
If you found this article helpful please leave a comment below or share it.
Related Ad Tracking Posts:
Tagged with: Ad Tracking • link tracking • PPC • Prosper202
Filed under: Ad Tracking
Like this post? Subscribe to my RSS feed and get loads more!
Leave a Reply