PDA

View Full Version : Link Referrals


acmedata
10-18-2006, 07:04 PM
All,

This is my first post here, so please be kind! :)

I am looking for a way to track referring links to my site. On my site, I have a small number of partners, and whenever a visitor comes over from one of their sites, I'd like to receive an email, and whenever somebody from my site clicks on a link to thiers, I'd also like an email.

I know there are scads of affiliate programs out there, but honestly, I'm a cheapskate and I don't want to have to pay (or pay much) for this.

Any ideas?

Thanks!

Scott
www.acmedatallc.com

mlseim
10-18-2006, 08:27 PM
You can use PHP.

Your webpages would need to have the extension .php (instead of .html).

At the top of each page, you would check for referrer:
http://php.snippetdb.com/view.php?ID=57

then send the email. ... you'll find PHP email snippets using Google search.

The links on your page would require a jump to another PHP script, then
redirect to the target page.

Keep in mind that refferer checking is not reliable. I can fool the script into
thinking I'm from any server or domain that I choose. Anyone can do that.
You didn't mention how important the referrer information is.

and, you want to check for refresh .. you don't want to send an email
each time someone refreshes your page.

acmedata
10-18-2006, 08:37 PM
Thanks. I'll give it a try after I check with my web host on using PHP.

Scott

mlseim
10-18-2006, 09:22 PM
.... and then, you use the PHP section of Codingforums for help with scripting.

mark87
10-18-2006, 09:28 PM
I would suggest not sending emails and instead either write to a file (adding onto a number stored in it) or storing it in a database; otherwise you'll be getting emails all the time and you wouldn't really have much to show how many visitors you got from the referers without counting them!

acmedata
10-18-2006, 10:01 PM
Thanks Mark. I just thought the same thing. I get a lot of spiders and robots hitting my site, so every time it hit one of those pages, I'll get an email.

Thanks for the tip.

Scott