How to add your Affiliate link to Keyy

Keyy now supports adding your own Affiliate link to Keyy to improve your commission. If you bundle Keyy in some way then to take advantage of this is easy.

All you need to do is bundle the latest version of Keyy with your WordPress installation and include a file inside the mu-plugins folder.

This file should hook into Keyy  and replaces all links with your Affiliate link.

An example of this file would be:

//Enter your Affiliate ID here by replacing 1234 with your Affiliate ID
define("KEYY_AFFILIATE_ID", "1234");

add_filter('getkeyy_com_link', 'keyy_affiliate_link_replace');

function keyy_affiliate_link_replace($url){
$url = $url . "?afref=".KEYY_AFFILIATE_ID;
return $url;