Notice: There is no legacy documentation available for this item, so you are seeing the current documentation.
In affiliate marketing, accurately tracking referrals is crucial for rewarding affiliates and measuring campaign success. The referral URL variable in AffiliateWP is the parameter added to your site’s URLs to identify them as referral URLs associated with specific affiliates. By default, AffiliateWP uses ref
as the referral variable, but you have the flexibility to customize it to suit your needs.
This documentation will guide you through the process of setting the referral URL variable, provide best practices, and highlight important considerations to avoid conflicts with WordPress reserved terms.
What is a Referral URL Variable?
The referral URL variable is a parameter added to URLs on your site to identify them as referral URLs linked to a specific affiliate. It helps track affiliate referrals accurately by distinguishing which affiliate referred a visitor to your site.
Default Referral URL Variable
AffiliateWP uses ref as the default referral URL variable. A typical URL with this variable looks like this:
https://yoursite.com/?ref=422
In this example, 422 is the ID of the affiliate the URL belongs to. In addition, your affiliates can use any of the following affiliate URLs.
Note: When setting your referral variable, make sure you do not use a reserved keyword or term in WordPress as it may conflict with core functionality. Example: “p” which is reserved for pages and posts. View this link for the complete list: https://codex.wordpress.org/Reserved_Terms.
Setting the Referral URL Variable
To set the referral URL variable:
- Navigate to AffiliateWP » Settings » Affiliates.
- In the settings, specify your preferred referral URL variable in the appropriate field.
- Save your changes.
Note: If you change your referral variable, don’t forget to let your affiliates know.
Frequently Asked Questions
What is a referral URL variable?
The referral URL variable is a parameter added to URLs on your site to identify them as referral URLs linked to a specific affiliate.
What is the default referral URL variable in AffiliateWP?
The default referral URL variable in AffiliateWP is ref.
Can I change the referral URL variable?
Yes, you can set the referral URL variable to any term you prefer, as long as it does not conflict with reserved keywords or terms in WordPress.
How do I set the referral URL variable?
Navigate to AffiliateWP » Settings » Affiliates. In the settings, you can specify your preferred referral URL variable.
That’s it! Setting the referral URL variable in AffiliateWP is a straightforward yet essential task to ensure accurate tracking of affiliate referrals. By customizing the referral variable, you can tailor your tracking to better fit your site’s structure and preferences.