Will AffiliateWP work on a Multisite Installation?
Absolutely! AffiliateWP can be set up so that all sites on the network share the same affiliate data.
- Set up a WordPress Multisite.
- Add the constant below to your wp-config.php file. A good place would be where you were instructed earlier in the multisite installation, just above the /* That's all, stop editing! Happy blogging. */ line:
define( 'AFFILIATE_WP_NETWORK_WIDE', true );
- Navigate to My Sites → Network Admin → Plugins and click Network Activate under the AffiliateWP plugin name. AffiliateWP will now be network activated, and will appear in each sub-site's WP admin interface.
Since AffiliateWP shares its database tables across all sites on the network there's a few things to note:
- Whenever a visit is created on any sub-site, it will show on the Affiliates → Visits page of all sites on the network.
- Whenever a referral is created on any sub-site, it will be shown on the Affiliates → Referrals page of all sites on the network.
- Whenever an affiliate registers on any sub-site, they are an affiliate on all sites. They can then append their referral ID or username to any other sub-site URL and earn a commission if the customer purchases.
- An affiliate has an affiliate area on all sub-sites.
- Creatives are shared across all sub-sites.
- Settings are individual to each sub-site and not shared between them, since these are saved in the wp_options table. This means that each sub-site can have different settings. Don't forget to enable your chosen integration on each sub-site to generate referrals for that site.
If a customer clicks on an affiliate's referral link and then visits a different sub-site on the network and then purchases, does the original affiliate earn commission?
Yes, but only if your multisite network is set up to use sub-directories. If you set up your multisite network to use sub-domains then this will not work unless the affiliate explicitly links to another sub-site using their referral ID/username appended to the URL.