mrpals Posted July 7, 2009 Share Posted July 7, 2009 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 0 Quote Link to comment Share on other sites More sharing options...
bullfrog Posted July 13, 2009 Share Posted July 13, 2009 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. 0 Quote Link to comment Share on other sites More sharing options...
mrpals Posted July 14, 2009 Author Share Posted July 14, 2009 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? 0 Quote Link to comment Share on other sites More sharing options...
mrpals Posted July 14, 2009 Author Share Posted July 14, 2009 Another possibility could be a cookie issue but how to check ? 0 Quote Link to comment Share on other sites More sharing options...
RenatoMN Posted July 15, 2009 Share Posted July 15, 2009 (edited) 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 July 15, 2009 by RenatoMN 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.