Jump to content

Affiliate links generation


mrpals

Recommended Posts

I am having a little trouble trying to figure out how to change the outcome of [AffiliateLinkCode] when placing it into my affiliate links. For some reason "[AffiliateLinkCode]" does not generate A normal URL such as "mysite.com/?aff=001" instead it generates a page that does not exist like this mysite.com/clients/*?aff=001

 

Does anyone know where to set this [AffiliateLinkCode] ?

 

The URL of the WHMCS installation, is mysite.com/clients but would prefer affiliate links to be driven to home page

Link to comment
Share on other sites

The affiliate tracking script (*) is in your client directory.Simply changing the url will break the tracking.

 

You will need to move this * file to your main directory first, change the 2 include() functions in the script. Then only after that can you change the [AffiliateLinkCode].

 

Unfortunately I don't know how to do this. Just thought I'd point out the potential problem if you do change it.

Link to comment
Share on other sites

Well that sounds logical, I would not know how to do it either. I do know my (*) contains a 301 redirect

header("HTTP/1.1 301 Moved Permanently");

 

header("Location: ".$CONFIG["Domain"]);

 

I just wonder if the redirect possibly cancels out the count. Does yours have a 301 redirect in it?

Link to comment
Share on other sites

mrpals,

 

It's completelly normal. The * page tracks the aff id and creates a cookie (valid for 90 days) and then redirects the visitor to the address you defined in "Domain" field at General Settings section of your WHMCS. Just set it to your homepage. The WHMCS URL is set up in "WHMCS System URL" (3 fields below).

 

The 301 header is there just to tell the browser to not track the visit to * page.

 

I really love * isn't encripted! This way I can create custom affiliate links, like:

 

mydomain.com/whmcs/*?aff=ID&pg=abc

mydomain.com/whmcs/*?aff=ID&pg=def

 

then I can put this before the redirect:

 

if (isset($pg)) {

switch($pg) {
	case "abc":
		$CONFIG["Domain"]="http://mydomain.com/abc_page";

		break;
	case "def":
		$CONFIG["Domain"]="http://mydomain.com/somewhere_else/def_page";
		break;
}
}

 

It's useful to create specific banners for those whose want to advertise only Domains, other who advertise general hosting services, etc.

 

I wish I'd help you ;)

Edited by RenatoMN
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated