Help - Search - Members - Calendar
Full Version: need help with this referals
Get Paid Forum - Get Paid Discussion > Webmaster's Corner > General Discussion on Building, Running & Making Money from a Website
chrisk1
how do i go about creating referal pages say like

http://mysite.com/?xxxxxx

so that way i can TRACK the referals a bit better. how do i work that in on the pay page?

anyone willing to help me out.
chrisk1
can some one help me script this please.

one i get this part done i am gonna put my game out!
freeandeasy
The info in this thread might help you:

http://www.getpaidforum.com/forums/index.p...=46&t=34140&hl=
ReDucTor
CODE
// getCookie Function from JavaScript.com
// name - name of the desired cookie
// * return string containing value of specified cookie or null if cookie does not exist
function getCookie(name) {
 var dc = document.cookie;
 var prefix = name + "=";
 var begin = dc.indexOf("; " + prefix);
 if (begin == -1) {
   begin = dc.indexOf(prefix);
   if (begin != 0) return null;
 } else
   begin += 2;
 var end = document.cookie.indexOf(";", begin);
 if (end == -1)
   end = dc.length;
 return unescape(dc.substring(begin + prefix.length, end));
}


ref_id=location.search.substring(1);

if(ref_id!="") {
    document.cookie="referrer="+ref_id+"; path=/; expires=Mon, 01-Jan-2010 00:00:00 GMT";
} else {
    ref_id=getCookie("referrer");
}
if(ref_id==null) {
    ref_id="752183"; // Default ID
}


Put that in your header, change the default ID if you want, then to output you just use.

CODE
document.write(ref_id);


e.g.

CODE
<script language="JavaScript"> document.write("Referrer: "+ref_id+"<input type=hidden name=referrer value=\""+ref_id+"\">");
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.