Common questions on affiliate tracking

How is an affiliate tracked?

When an affiliate promotes your products and services they use a referral URL which typically looks like this:

http://yoursite.com/?ref=123

When a customer clicks this link and lands on your website, the affiliate’s ID (123 in the example above) is stored in a cookie, within the customer’s browser. If the customer makes a purchase, the affiliate that the customer is tracking is awarded commission on the sale.

Is the affiliate tracked across all pages of the site?

Absolutely! Since the affiliate’s ID is stored in a cookie, the affiliate is tracked across all pages on the site. 

Can I change the ?ref=123 to something else?

You can change the ref variable from AffiliateWP » Settings » Affiliates » Referral Variable. See our affiliate URLs doc which lists all the variations of a referral URL that your affiliates can use.

How long does the tracking cookie stay in the customer’s browser?

The cookie’s expiration is determined by how many days is entered from 
AffiliateWP » Settings » Commissions » Cookie Expiration. By default it’s set to 1 day, but you can change this to any number of days.

If a customer clicks on 2 different affiliate links from 2 different affiliates, which one is saved?

The first affiliate link that the customer clicks will store the affiliate’s ID in a cookie and it cannot be overridden from the second link unless the cookie expires, or the customer clears their browser cookies and then clicks on the second link, or the
Credit Last Referrer option is enabled on AffiliateWP » Settings » Commissions.

I would like the cookie to never expire so my affiliates can earn commission for the lifetime of a customer

You can technically set the cookie expiration to a very high number but you’ll still be at risk of a customer clearing their browser cookies, or using a different browser altogether, in which case the affiliate is not tracked. Cookies are only stored in the browser that the customer is using.

Our Lifetime Commissions add-on allows your affiliates to earn commission for the lifetime of a customer. Once the customer uses an affiliate’s referral URL they are linked to the affiliate, regardless of whether they use another browser or clear their browser cookies.

Why aren’t any referrals being created when a customer purchases?

AffiliateWP uses JavaScript to store a cookie that tracks an affiliate’s ID. If there are any kind of JavaScript errors on your website, the cookie may not be stored and your affiliate will not be awarded commission when a customer purchases. JavaScript errors will also prevent other functionality on your website from working so it’s always a good idea to fix them.

JavaScript errors are commonly caused by either your theme or another plugin. The first thing you should try is switching to a standard WordPress theme (2013 – 2017). If the JavaScript error/s disappear then the issue lies within your theme somewhere. If the JavaScript errors are still there the next step is to disable all other WordPress plugins and test again. See this guide on using your browser to diagnose JavaScript errors.

If you are unable to fix your JavaScript errors, you can enable Use Fallback Referral Tracking Method? from AffiliateWP » Settings » Advanced. Fixing JavaScript errors should be your top priority.

Can affiliates credit the last referrer?

Yes! There is a checkbox on the AffiliateWP » Settings » Commissions page for this.

If a customer clicks on an affiliate link and uses a coupon assigned to that affiliate, does the affiliate receive double referrals?

No, the coupon will always win, including if it is assigned to a different affiliate. The affiliate assigned to the coupon or discount code will always receive the referral, regardless if an affiliate link was used.

Can affiliates refer themselves and earn commission on their own purchases?

Yes, you simply need to install the Allow Own Referrals add-on.