Affiliates on a Subdomain

Assuming that you want to have your affiliates link to http://www.example.com and your sales are handled through a subdomain, e.g. http://store.example.com, where the Affiliates plugin is also installed, we need to get the system to recognize that an affiliate has referred the customer to the primary domain. So how can that be done?

One approach is quite simple, basically just adding:

<iframe src="http://store.example.com/small?affiliates=<?php echo $affiliate_id; ?>"></iframe>

to the template of the primary domain. Note that we’re using http://store.example.com/small which should provide a very minimal page so that the overall impact on loading the main page is kept to a minimum.

You will have to make sure that the affiliate id is included when affiliates link to the primary domain (which could also be a non-WordPress site) and that the $affiliate_id is appropriately sanitized and passed on in the iframe.

Comments are closed.
We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account

Share