Customized redirection of affiliates in WHMCS

By default, WHMCS redirects accesses to affiliate links to the home page of the client area, to overcome this limitation and offer better results to our affiliates, we create a hook that changes that pattern.

The following code allows you to create custom affiliate links with redirection to different URLs, which can be defined through an additional parameter at the end of the affiliate link itself, or set custom redirects to specific affiliates Directly in the hook code.

 

The implementation is very simple, download the file gofas_custom_AffiliateClickthru. PHP and save in the directory/includes/hooks/of your WHMCS.

The next step is to edit the default target, in the line 10altere the URL by the default destination address that you want to redirect affiliate links (https://example.com).

On line 17, you can define a specific affiliate to redirect access to your referral link, replace the value 1 with the affiliate ID and on line 18 replace the sample URL with the specific target URL of this affiliate.

If you want to add the same condition to other affiliates, you can copy and paste lines 17 to 21 and paste just below line 21, changing the values as explained earlier.

Now the best part: The default format of the affiliate URLs is gofas.net/cliente/aff.php?aff=7, with hook installed, to set directly on the affiliate indication link the customized destination, just add the page (& page =) parameter shortly after the affiliate ID.

Default URL Example of affiliates:
Https://gofas.net/cliente/aff.php?aff=7

Custom REDIRECT URL example:
https://gofas.net/cliente/aff.php?aff=7&page=https://gofas.net/br/whmcs/modulo-paypal-plus-para-whmcs/

I hope it helps. And if you want to know our affiliate program contact us, we offer exclusive advantages and passes with very special values for indications;)

Leave a Comment

You must be logged in to post a comment.