Go Back   WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
LinkBack Thread Tools
Old 01-09-2009, 10:47 AM   #1
Today's the day!
War Room Member
 
Kelly Verge's Avatar
 
Join Date: Oct 2007
Location: Florida, USA.
Posts: 1,262
Blog Entries: 6
Thanks: 309
Thanked 356 Times in 193 Posts
Default Is it possible to do conversion tracking inside/with a PHP redirect?

I usually use the following type of url:

Code:
http://mysite.com/link/product/
...which points to a folder with a simple PHP redirect like this:

Code:
<?php
header( 'Location: http://cb_nick.cb_product.hop.clickbank.net/?tid=source1' ) ;
?>
Is it possible to do any type of stat counting within this type of redirect? I'm playing with a split test idea, and this would be very helpful.

Kelly Verge is offline   Reply With Quote
Old 01-09-2009, 11:21 AM   #2
Warrior Member
War Room Member
 
Join Date: Dec 2008
Posts: 15
Thanks: 0
Thanked 1 Time in 1 Post
Default Re: Is it possible to do conversion tracking inside/with a PHP redirect?

Yeah, you can track how many times the site has been visited (how many who have clicked the link)

<?php
$filename = "stats.txt";
$clicks = file_get_contents($filename);
$clicks++;
$fp = fopen($filename, "w");
fwrite($fp, $clicks);
fclose($fp);

header("Location: put-your-url-here");
?>

Create a file named stats.txt and upload it to the same folder as this script, then CHMOD it to 777, and then your set!

Hope this was helpful!

EDIT: I forgot to mention that the number of times the link has been clicked is recorded in stats.txt

aGor is offline   Reply With Quote
Old 01-22-2009, 12:29 AM   #3
Warrior Member
 
Join Date: Jun 2008
Location: , , Australia.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: Is it possible to do conversion tracking inside/with a PHP redirect?

I've got the same question, and I use the exact same technique as you, Kelly.

Given clickbank already tells us how many hops we get & we can use tids to work out where they came from, I think we need to use 301 or 302 redirects, which I'm trying to work out right now in cpanel!

I'll let you know how I go... but at the moment I think i'm gonna do this:

1. Create a new page to replace the direct .php link. I'll call it /recommends/product1.html
2. Put the google website optimizer code in that html file.
3. Set a redirect from /recommends/product1.html (not sure which type?) to /recommends/product1.php, which sends them along to the aff sales page.

Anyone actually know what they're talking about? I sure don't... :-)
Vesson is offline   Reply With Quote
Old 01-22-2009, 04:17 AM   #4
HyperActive Warrior
 
Join Date: Jul 2008
Location: , , Canada.
Posts: 116
Thanks: 1
Thanked 4 Times in 4 Posts
Default Re: Is it possible to do conversion tracking inside/with a PHP redirect?

Quote:
Originally Posted by Kelly Verge View Post
I usually use the following type of url:

Code:
http://mysite.com/link/product/
...which points to a folder with a simple PHP redirect like this:

Code:
<?php
header( 'Location: http://cb_nick.cb_product.hop.clickbank.net/?tid=source1' ) ;
?>
Is it possible to do any type of stat counting within this type of redirect? I'm playing with a split test idea, and this would be very helpful.
I'm not sure if they brought it back yet but Firefox left out the header Location in one of their releases a few years back. I have avoided using that since and went with boring HTML redirects.

Just wanted to bring that up in case it's still a problem and you are losing sales because of this silly mistake.

Check out my WSO for 60% off my autoresponder, Bulk Mailer, Opt In Software.
60% OFF Mail List Management Software! Multiple List Capabilities!
snidge is offline   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk

Tags
conversion, inside or with, php, redirect, tracking

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 05:27 AM.