In my post How I Track My Pay Per Click Landing Page Sales Using Clickbank And Commission Junction Affiliate Links, I showed you how to add tracking to your Clickbank and Commission Junction affiliate links to help you track your landing page sales from your affiliate partners.

In this post, I will show you how to take the same method a step further and track your sales results down to the individual keyword with MSN Adcenter and Google Adwords.

By using the method discussed in this post, you will be able to track multiple landing pages and pay per click keywords.  With this tracking system you will instantly see exactly which landing pages and keywords are the best at converting into affiliate sales.

First let me add a disclaimer. 

The keyword tracking method in this post will work with your Commission Junction affiliate links or any affiliate link that allows tracking with enough characters to track keywords. 

The method in this post, will not work with your Clickbank affiliate links.  The main reason for this is that the Clickbank tracking id (known as tid) can only be 8 characters which is not enough characters to track keywords.   

The best method for tracking your Clickbank affiliate links is to track your landing pages as I showed you in my prior post.

With the method I will discuss in this post, your landing page will need to be a php page and you will need to have php running on your web server.

The first step is to set up a php redirection file which purpose is to hide your affiliate link on your landing page and redirect your users to your affiliate partner.

For my example, I will use a file name of marketingsecrets.php as my php redirection file.  This file will include my affiliate link that will redirect to my affiliate partner.

To create your php redirection file open up a Windows notepad file and paste in the redirection code shown below:

<?php
$strKeyword = $_GET['kw'];
header( 'Location: http://youraffiliatelink/?sid='">http://youraffiliatelink?sid='. $strKeyword ) ;
?>

In the above code, change the http://youraffiliatelink section to your actual Commission Junction affiliate link. Do not change anything after the ?sid section.

Next, save the file as a php file and upload it to your web server.  I saved mine as marketingsecrets.php, yours can be named anything.  This file will be used to redirect users to your affiliate partner. 

Sidebar:  To save a file as a php file you simply create it in Windows notepad or with your favorite html editor.  Then choose file “save as” and name the file with a .php extension (i.e. marketingsecrets.php).  After the file is saved you can view it in Windows Explorer and it will show a php extension.

The redirection file works like this.  When someone clicks on the redirection link from my site (i.e. http://www.mysite.com/marketingsecrets.php) it will redirect them to my affiliate partner’s site giving me credit for the affiliate sales.

Once you have your redirection file complete and uploaded to your server, the next step is to create your landing page and save it as a php file.  I will save mine as landingpage.php for this example, but you should name yours specific to your affiliate offer.

After you save your landing page upload it to your server.

On your landing page wherever you insert your affiliate link use the below method:

<a href="http://www.youraffiliatelink.com/marketingsecrets.php?kw=Goolpms1-<?php echo($_REQUEST['kw']); ?>" target="_blank">Change This For Your Desired Anchored Text</a>

In the above link you will need to change a few things:

1.  Change the http://www.youraffiliatelink.com to your actual Commission Junction affiliate link.
 
2.  Change the marketingsecrets.php to the actual name of your php redirection file you created above.

3.  In the section that says Change This For Your Desired Anchored Text you need to change this to what anchored text you want for your affiliate link.

Notice in the above link the section showing ?kw=Goolpms1.  This is the parameter used to track your landing page and pay per click engine.  It is a completely made up code that will make sense to you for tracking your landing page.

So in the example above my tracking code stands for Google Adwords (Goo), landing page (lp), marketing secrets 1 (ms1).  You can change the code to what makes sense to you for tracking your landing pages.

The next section of the above link <?php echo($_REQUEST['kw']); ?> will capture your keyword that is passed from your pay per click ad.  So it will capture the keyword the user searched for when arriving at your landing page.

The last step is to set up your pay per click campaign to pass the keyword in the url.  This will allow the keyword to be captured by the <?php echo($_REQUEST[’kw’]); ?> code when the user reaches your landing page.

To pass keywords with your pay per click campaigns you simply add a parameter to your landing page destination url so that the keyword is passed in the url. 

Here is the parameter you add for the MSN Adcenter and Google Adwords pay per click search engines.

Google Adwords – Add the parameter ?kw={keyword}to your landing page destination url.
i.e.  http://www.youraffiliatelink.com/landingpage.php?kw={keyword}

MSN Adcenter – Add the parameter kw={QueryString} to your landing page destination url. 
i.e.  http://www.youraffiliatelink.com/landingpage.php?kw={QueryString}

The last time I checked Yahoo Search Marketing did not allow tracking of keywords in the url.  

Once you have completed the above steps you will have developed a very powerful system to tell you exactly which keywords and which landing pages are the highest converting into affiliate sales.  This system will provide you a huge edge with your Commission Junction pay per click campaigns.