Forum Moderators: coopster

Message Too Old, No Replies

Php redirect script with tracking?

         

tictoc

6:57 am on Sep 6, 2005 (gmt 0)

10+ Year Member Top Contributors Of The Month



I am setting up go.php scripting for link redirects on my site and wonder how to add tracking to the link after it says mydomain.com/go/go.php?url=whatever?
and will this mess up any affiliate links that are in the "go" directory?

I found another question on redirect scripts found at [webmasterworld.com...] but I did not find the answer to this.

jatar_k

7:02 pm on Sep 6, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



>> mydomain.com/go/go.php?url=whatever

as far as adding tracking to those. I like to use an id on the url, the go script then hits the db, grabs the true url to send them off to, increments a click count and they go bye bye. ;)

>> and will this mess up any affiliate links

I don't really understand why it might, store the full url in the db with your affid and all attributed bits, then just grab it and send them to the site

tictoc

4:28 am on Sep 7, 2005 (gmt 0)

10+ Year Member Top Contributors Of The Month



What is the best way to add this tracking? Do you have to setup another db for that?

chrisjoha

6:33 am on Sep 7, 2005 (gmt 0)

10+ Year Member



Just track the hits to a dedicated table in your database. I use a table like this:

Page hits:
CHAR remote_addr
TIMESTAMP hit_time
CHAR user_agent
CHAR page
CHAR referer

On the affiliate side of things, I've had some problems with this. I use an affiliate program that demands the referer to be correct (stupid, I know), and often I get no referer. I'm not sure if the redirect is stealing the referer or what, but I've noticed that alot of vists to my redirecting script has no referer (which is BS since users rarely have a reason to type in the url to the redirecting script). At one point I had to use a javascript redirect instead which simulates clicking a button (and so refresh the users referer) because my php script weren't passing on referers at all.

tictoc

2:27 am on Sep 9, 2005 (gmt 0)

10+ Year Member Top Contributors Of The Month



which affiliate programs were you having trouble with using this scripting?

Also, where in the db would you put this add'l table and do you have an example of this?

Thanks!