Download Clickbank Sales Stats

Right now I am in the middle of building a system for using Adwords, one that includes tracking results on the keyword level as taught by Double Digit CTR.

And one thing I want to be able to do is instantly track any sales from Clickbank back to the keyword that generated the sale. I recently built a PHP script that logs all visitors, the keyword used to arrive at my site, the referring url, tracking id, I.P. address and date.

The key for tracking sales results is to include a tracking id, TID, with the destination (referring) url, something like this: http://www.example.com/?k=keyword&q=tid

The information after the ? gets stripped off and dumped into a database.

Now I just need to compare that with the actual sales results and compare the sales results TID with what is in my log database.

... and I thought you might benefit.

If you are a Clickbank publisher or affiliate, and in particular if you have multiple accounts, then you might like this script I recently created.

It is a PHP script that you install on your site; there is no database involved, no storing personal information. If you know how to upload a file to your website, thats all you need.

very simple to use. Just type in your Clickbank username and password with a comma seperated each. If you have multiple accounts, then the username/password combinations are one per line. Just like this:

salestator

Choose the start and end date, click "Get Stats!".

Almost right away you will be presented with a CSV (comma separated value) file that will easily open in a spreadsheet program like Microsoft Office Excel.

salestator

There's your stats.

salestator

You can see a short video on how in works and demo it at Salestator.

Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Sphinn
  • Mixx
  • StumbleUpon
  • MisterWong

Google Adwords Dynamic Keyword Insertion PHP Script

So, you want to be an Adwords rockstar?

Well then, you'll need to wrap your brain around dynamic keyword insertion.

And I'm not just talking about the basics - just using dynamic keyword insertion in your Google Adwords advertisement. I'm talking about playing with the big kids and using those keywords that appear in your Adwords advertisement also on your web page.

That's right, if you are targeting a specific search terms in your advertisement - make that keyword show up on your landing page. Heck, even have it show up as the title and actual url of your page. Now we are talking.

Maybe instead of talking, let me show you a few things to give you the picture. It will all be crystal clear in just a moment ...

What Is Dynamic Keyword Insertion?

Lets say you are advertising using Google's Adwords program. One of the things you provide for your ad is a list of keywords that you are interested in having your advertisement display for.

For instance, if you were selling "kobe beef", you might want your advertisement to show up on Google's search engine page every time someone types in the words "kobe beef" in the search box on Google.

Same goes for someone searching for "kobe steak" - you want your ad displayed.

With dynamic keyword insertion, every time someone types in the exact search term you are targeting, your advertisement would include those keyword - in bold - on your advertisement.

Here's what the syntax looks like:

{keyword:} - will display the search term or not if there is not a match

{keyword: Default} - will display the search term or "Default" if there is problem displaying the search term. Of course, you can replace "Default" with whatever you like.

Some specific details regarding keyword: (source: Red Fly Marketing )

keyword - No capitalization, all word(s) are in lower case
Keyword - The first word is capitalized
KeyWord - Every word is capitalized
KEYword - Every letter in first word is capitalized
KEYWord - Every letter in the first word AND the first letter of the second
KEYWORD - Every letter is capitalized

More details at Google Adwords

How Do You Do It?

Login to your Adwords account. Create or edit a campaign. Create or edit a Text Ad.

Here's an example of what an ad might look like that uses keyword insertion.

adwords

 

Notice that use of the {KeyWord: Default} in the Headline and Description line 1.

adwords keyword insertion

 

This is the important part for getting the search term to show up on your web site. Use the {Keyword: Default} as part of your Destination URL. In this example, I have added my top level domain, http://www.DaveWooding.com/ followed by the keyword insertion expression followed by ".html". Note that I have added a dash, "-", in between my default word.

adwords dynamic keyword insertion

 

Display the Adwords Search Terms On Your Page

At this point, somebody clicked on an Adwords ad of yours, something that might look like this:

adwords dynamic keyword insertion

 

In this case, the search term is "kobe steak". A visitor that clicks on that advertisement would be sent to this url, http://www.davewooding.com/kobe%20steak.html.

If someone searched for "kobe beef" the advertisement would look like this:

google adwords dynamic keyword insertion

 

On To Your Web Site

Now that you have setup your Google Adwords advertisement to use keyword insertion, it is time to separate the men from the boys, the women from the girls, the ... you get the point.

Time to play big. You want your site to display an appropriate page for each of those particular search terms. Sure you can do it the old fashion way and grunt it out - create an individual page for each and every possible search term.

Or you can do it the right way.

Using PHP or some other scripting language that allows for extracting information about the referring page - the referring page that uses dynamic keyword insertion. Ding, ding, ding <<<--- important

First, assuming you are working from the top level domain, i.e. - http://www.example.com, you will need to add or modify a .htaccess file to include the following:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+).html?$ index.php?q=$1 [L]

I'm going to assume that if you are reading this far into the article that you are willing to use php files instead of plain html file (otherwise you will need to include additional code in your .htaccess file, specifically "AddType application/x-httpd-php .htm .html").

Very simply, the chuck of code above says to turn on the rewrite engine, reference to the root directory, the rule that follows is applicable if the file or directory referenced does not already exist, then grab all the info after the domain but before the .html extension <- this is our dynamic keyword insertion stuff courtesy of Google Adwords.

Take that information (the dynamic keyword info), shove it into memory - which we will call "dollar one" = $1 and send it over to the index.php file as part of the "q" query string.

You like that techo jargon?

The PHP Code That Displays Adwords Search Terms

... on your site.

As I mentioned, you will need to be using php files for this to work (or you can modify your .htaccess file to accomodate).

At the top of your index.php file, the code should like like this:

google adwords dynamic keyword insertion

 

This chunk of code checks to see if any information has been passed over via the "q" query string (remember the .htaccess grabbed any info between the top level domain and the .html and sent it over as part of the query string parameter).

If there is info, then that information gets assigned to a variable called $replace (after it replaces any dashes with whitespace - assuming there are any dashes).

If no query string info is present, no problemo, there is a default value set previously - "kobe beef" in this case.

google adwords dynamic keyword insertion

 

Next a few other variables are set based on the what is in $replace. $title is the same as $replace with the exception that the first character of every word are capitalized. $h1 is the same as $replace except that just the first character is capatilized.

google adwords dynamic keyword insertion

 

Following the php script part of the index.php file is plain old html code - with the $title and $h1 variables thrown in.

google adwords dynamic keyword insertion

 

This is how you display the Adwords search terms on your site.

What's Next?

We are only scratching the surface of what is possible here.

Lets just speculate that you have a datafeed that you want to create individual landing pages for that you want to use PPC to drive visitors to. Or you are a Clickbank affiliate that wants to use Adwords to promote products and you want to use the Clickbank datafeed? Or you have an Ebay store that uses a RSS feed from Ebay to display items for sale that could afford pay per click marketing?

What you have seen here is perfect for creating relevant, high quality score landing pages for using Google Awords with.

Stay tuned, or sign up to get on the mailing list, for the next article which will show you how to integrate a datafeed - like SpeedPCC - with dynamic keyword insertion.

Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Sphinn
  • Mixx
  • StumbleUpon
  • MisterWong