How to setup my own affiliate system for my website?
Is there any program or way that I could set up my own simple affiliate program.
I have a website and I want to set up an affiliate program on it so I can employ people I personally know like family and friends. So it’s very informal and how professional the program looks or how professional the way is doesnt matter. I want to be able to pay them for how many people they send to me, but also a way to figure how much of that traffic converted to sales. I only want to keep track of about 3 people and all I really want to know is how many people they send and how many sales the make me. I don’t want to go through ClickBank or CJ or anyone like that. I want it to be completely independent. Anyone have any advice?
(p.s. please dont spam my question, I realize that this type of question invites alot of spam so please don’t answer unless your answer is actually related to my question)
*in after spam*
If you don’t have the PHP knowledge to set up a cookie-based tracking system, you could create 3 separate redirect pages point to your main page, and use google analytics to track your visitors. If you put tracking code on each page on your site, you can set up goal points which trigger when someone reaches a certain page, you can then use the entry page to determine who gave you the custom.
If you do have PHP knowledge or are willing to learn, the generic method goes like this-
1) when a user views your page, check their cookies for an affiliate id. (ie $_COOKIES['affil'] variable)
http://www.tizag.com/phpT/phpcookies.php
1.1) if it exists, we do nothing
1.2) If it does not exist, we get the info on who directed them here. We can do this two ways, use the HTTP query data (the stuff after a question mark like index.php?affil=bob) or by the HTTP referrer (the page that linked to your site).
HTTP query data is stored in $_GET['affil']
see http://www.php-mysql-tutorial.com/php-tutorial/php-variables.php
The referring page is stored in $_SERVER['HTTP_REFERER'] which could use this if no affil is set, man page here-
http://unix.cms.gre.ac.uk/code/php/examples/http_referer_op.php
(nb; yes, referrer was spelled incorrectly in the HTTP standards! It’s not my error)
You could also use the referrer to save search engines as unpaid affilliates, save their search keywords too or whatever.
Now we have the affilliate, we use setcookie to save this to the user’s computer so that next time they visit the site we know who’s customer they are. Make sure it’s set to expire in 10 years or something similar.
******
The code above is included in every php page on the site, so it doesn’t matter which page they land on. remember that setting cookies goes in the header data, so must be done before any data is sent back to the client. even a single empty line before "<?php" will cause saving cookies to fail (attempting to change headers after they have been sent)
******
2) When a user makes a purchase, we get the information from $_COOKIES['affil'] and save this info to a file or a database. You might want to remove the cookie or set it to "none" or something at the same time, so that you only pay your affilliates for a customer’s first purchase.
You need a affiliate script which can be found at http://www.affiliateproscript.com/
other than that you may get a free one at http://www.hotscripts.com but im not sure
References :
http://www.ubldesignes.co.uk web design at its best
*in after spam*
If you don’t have the PHP knowledge to set up a cookie-based tracking system, you could create 3 separate redirect pages point to your main page, and use google analytics to track your visitors. If you put tracking code on each page on your site, you can set up goal points which trigger when someone reaches a certain page, you can then use the entry page to determine who gave you the custom.
If you do have PHP knowledge or are willing to learn, the generic method goes like this-
1) when a user views your page, check their cookies for an affiliate id. (ie $_COOKIES['affil'] variable)
http://www.tizag.com/phpT/phpcookies.php
1.1) if it exists, we do nothing
1.2) If it does not exist, we get the info on who directed them here. We can do this two ways, use the HTTP query data (the stuff after a question mark like index.php?affil=bob) or by the HTTP referrer (the page that linked to your site).
HTTP query data is stored in $_GET['affil']
see http://www.php-mysql-tutorial.com/php-tutorial/php-variables.php
The referring page is stored in $_SERVER['HTTP_REFERER'] which could use this if no affil is set, man page here-
http://unix.cms.gre.ac.uk/code/php/examples/http_referer_op.php
(nb; yes, referrer was spelled incorrectly in the HTTP standards! It’s not my error)
You could also use the referrer to save search engines as unpaid affilliates, save their search keywords too or whatever.
Now we have the affilliate, we use setcookie to save this to the user’s computer so that next time they visit the site we know who’s customer they are. Make sure it’s set to expire in 10 years or something similar.
******
The code above is included in every php page on the site, so it doesn’t matter which page they land on. remember that setting cookies goes in the header data, so must be done before any data is sent back to the client. even a single empty line before "<?php" will cause saving cookies to fail (attempting to change headers after they have been sent)
******
2) When a user makes a purchase, we get the information from $_COOKIES['affil'] and save this info to a file or a database. You might want to remove the cookie or set it to "none" or something at the same time, so that you only pay your affilliates for a customer’s first purchase.
References :