Arabianaffiliates works straight out of the box the vast majority of the time, but it is still best to test the system for yourself to ensure everything is working as expected. These simple steps will walk you through testing Arabianaffiliates.

Creating a test affiliate account
We recommend creating at least one new test affiliate account for testing purposes, which will allow you to keep any Arabianaffiliates testing separate from live user/affiliate accounts.

1. In your WordPress admin, create a new user account by going to Users → Add New.

2. In the Add New User section, give your test user account an easily recognizable username (e.g. “testaffiliate”).

3. Uncheck the Send User Notification email option, then check both the Add as Affiliate and Disable Affiliate Email options, and finally click the Add New User button.

4. The new affiliate account will now be visible in Affiliates → Affiliates. If you have enabled the Require Approval option in Arabianaffiliates’s Misc settings, the affiliate account will have a Pending status – simply click Accept to set the account as Active. If you do not have the Require Approval option enabled, the affiliate account will already have an Active status. You’re now ready for further testing!

Important: When making test purchases or form submissions, make sure you are not logged in as the affiliate you are testing, and that you are not using the affiliate’s email address at checkout (or in the form). Arabianaffiliates blocks affiliates from earning a commission on their own purchases/form submissions, unless you use the free Allow Own Referrals add-on.

To test a visit
1. Open up your WordPress admin in one browser (e.g. Firefox) and navigate to Affiliates → Visits. You’ll see a visit here shortly.

2. Open a completely separate browser (e.g. Chrome) and append a referral variable to the end of your website address

ref is the default Referral Variable from Affiliates → Settings.
Make sure you have an active affiliate and use their ID in place of 1 in the example above. 1 is also the default ID for the first affiliate.
3. Back in your original browser from #1, refresh the visits page and you’ll see a visit recorded.

To test a referral
1. Make sure your selected integration is enabled from Affiliates → Settings → Integrations.

2. In the same browser that generated the visit (step #2 earlier), complete a purchase or submit a form on your site. Make sure that the email address you use for the test purchase/form submission is not the same as the affiliate’s email address.

3. Refresh your original browser that was on the visits page earlier. The red cross under “Converted” will change to a blue tick.

4. Go to Affiliates → Referrals and you’ll see a new referral.

If everything worked properly, you will see the same results as outlined above.

Note: To run a new test, make sure you clear your cookies so you can start the process from the beginning and simulate a new visit correctly. See our doc on how to delete Arabianaffiliates’s cookies from your browser.

To test with an affiliate-tracked coupon
Certain integrations support affiliate coupon tracking. The benefit of affiliate coupon tracking is that no referral link is needed in order to generate a referral for the affiliate, and/or you can offer a discount to your customers. You can find out if your integration supports affiliate coupon tracking in the following doc article: Affiliate Coupon Tracking.

1. Make sure your selected integration is enabled from Affiliates → Settings → Integrations. Also ensure that you have allowed discount/coupon codes to be used in your chosen integration.

2. Create a new discount code or coupon in your integration. To see how to set up an affiliate-tracked coupon and link it to an affiliate, visit the corresponding documentation for your specific integration: Integrations that support affiliate coupon tracking. For testing purposes, you may like to give the coupon code the same name as the test affiliate’s username (e.g. TESTAFFILIATE).

4. In a new browser with cleared cookies, where you are not logged in as either the site admin or the affiliate, visit a product page and add a product to your cart. When you have added a product to your cart, view the cart and go through to checkout. (Note: Cookies are cleared only to ensure no other affiliates are currently being tracked, and so you can see how affiliate coupon tracking works without a referral link.)

5. In the coupon code field, enter the affiliate tracked coupon code you created, and complete the checkout and payment process.

4. Head to Affiliates → Referrals, and you’ll see a new referral for the affiliate who was attributed to the coupon.

Note: If a referral link is not used, and just an affiliate coupon is used, a Visit will not be stored. If you wish for a visit to be stored, your affiliates will need to also use their referral link. If a referral link is used, as well as a coupon, there will still only be one referral generated (there will not be duplicate referrals).


 

Arabianaffiliates uses cookies to track affiliates and visits so referrals can be generated. This article explains why the cookies are important, and how you can see them in your browser when testing the system to check a visit has been created.

How they work
A cookie is a small piece of data which is stored in a user’s web browser when they visit a website. When a customer comes to your website via an affiliate referral link (i.e. yoursite.com/?ref=123), Arabianaffiliates stores two main browser cookies in order to track the referring affiliate, and the visit. Their names are:

affAF_ref – this cookie stores the affiliate’s unique ID
affAF_ref_visit_id – this cookie stores the visit ID (the visit ID increments by 1, each time any referral link is used until the cookie expires or is deleted).
As of version 1.7.7
Arabianaffiliates also stores a third cookie for affiliate campaign tracking. The name of the cookie is affAF_campaign. This cookie will only be stored if an affiliate generates an affiliate referral URL with a campaign name from the Affiliate Area, and that link is clicked on by a customer.

When a customer clicks on an affiliate’s referral link, and these cookies are successfully generated, a visit will appear in
Arabianaffiliates’s Visits screen. The cookies will then remain in the browser throughout the purchase or conversion process to track the correct affiliate so a referral can be generated for that affiliate. The cookies will also remain in the customer’s browser for a period of time specified by the site admin in the Affiliates → Settings → General → Cookie Expiration setting, or until the customer clears their cookies (the default cookie expiration in the Affiliates → Settings → General → Cookie Expiration setting is 1 day).
If these cookies are not visible in the browser when your site is visited via an affiliate referral link, a visit will not be generated (or, you may have enabled Fallback Referral Tracking). This is why it is important to test the system is working when you initially set up Arabianaffiliates
Here’s how you can find the cookies in popular browsers to check if a visit has been stored correctly:
Firefox
Follow these steps to view the
Arabianaffiliates cookies in Firefox:
Visit your product page or website via the affiliate referral link
Go to the Tools menu in the top menu bar, scroll down to “Web Developer” -> and click on “Developer Toolbar”. This will display a toolbar at the bottom of your browser window
In the toolbar, type “cookie list” and press Enter/Return on your keyboard – this will display a list of the cookies on your website
Look for the affiliate ID cookie (i.e. affAF_ref=123) and the visit ID cookie (i.e. affwp_ref_visit_id=1). If the affiliate has created a campaign, the affwp_campaign cookie will also be visible.
Chrome
Follow these steps to view the
Arabianaffiliates cookies in Chrome:
Visit the product page or website page via the affiliate referral link
Go to the View menu in the top menu bar
Go to the Developer option
Click on “Developer Tools”
In the “Application” tab, click on the “Cookies” drop-down menu in the “Storage” section on the left and click on the name of your website – the affAF_ref and affAF_ref_visit_id cookies should be visible there. If the affiliate has created a campaign, the affAF_campaign cookie will also be visible.
Safari
Follow these steps to view the
Arabianaffiliates cookies in Safari:
Visit the product page or website page via the affiliate referral link
Go to the Develop option in the top menu bar
Click on “Show Web Inspector”
In the “Storage” tab click on Cookies in the left navigation menu – the affwp_ref and affAF_ref_visit_id cookies should be visible there. If the affiliate has created a campaign, the affAF_campaign cookie will also be visible.
Alongside each cookie name is a “value”. For the affwp_ref cookie this value is the affiliate’s unique ID (i.e. 123), and for the affAF_ref_visit_id cookie this is the visit ID. For the affAF_campaign cookie, the value is the name of the campaign the affiliate is tracking (i.e. a “twitter”, or “facebook” campaign, etc.). These values can help you identify which affiliate is being tracked, and show you how many visits have been made to your website through affiliate referral links in total (all affiliate referral link visits are counted as one total).
TestingArabianaffiliates
and clearing cookies
When testing
Arabianaffiliates, if you have enabled the Fallback Referral Tracking option under Affiliates → Settings → Misc → Use Fallback Referral Tracking Method, the cookies will not be visible in the browser, but a visit will still be created. Fallback Referral Tracking essentially bypasses JavaScript (to avoid any existing JavaScript errors on your website) and tracks the affiliate and the visit using an alternate method.
Also, to ensure the system is working correctly, you may need to clear your cookies. Check out our article which explains how to do this for several popular browsers: How to delete
Arabianaffiliates’s cookies from your browser.


 

This article will help you perform some top line troubleshooting checks to determine why a visit is not being stored, or a referral is not being generated.

Troubleshooting Visits
The most common reason a referral is not generated is because a visit has not successfully been stored. Work through the below checklist to ensure visits are being stored correctly. You can view succesfully stored visits on the Affiliates → Visits page in your WordPress admin.

Ensure Arabianaffiliates is installed and activated. Please ensure you are using the latest version of the plugin.
Ensure your affiliate’s account is active on the Affiliates → Affiliates page .
Ensure you or your affiliates are using a correct affiliate referral URL, along with the correct referral variable, and an active affiliate ID (or username). Check out the acceptable URL formats in this doc: Affiliate URLs
Are you aware of any JavaScript errors on your site? You can see if you have JavaScript errors through the console of your internet browser. If there are any errors in the console when you are testing (keep it open so you can check), these will be outlined with a pink or red line and be very visible. Look out specifically for JavaScript errors – they will show a file pathname that ends with .js. These errors are the most likely culprits of plugin and theme conflicts, which can have an impact on visits not being stored, and therefore referrals not being generated.
Check out this article on the WordPress.org codex which explains how to view potential JavaScript errors in your preferred browser: Using Your Browser to Diagnose JavaScript Errors
Troubleshooting JavaScript errors
Temporarily deactivate all other plugins except for Arabianaffiliates, and test visits, and then referrals (with your chosen integration) to see if the JavaScript error disappears.
Slowly start reactivating other plugins. Do this one by one, or in small groups (of 2 or 3) and test the process each time. This will help you narrow down which plugin may be causing the conflict.
When you have determined which plugin is causing the conflict, we recommend contacting the plugin developer to see if they can help you resolve the issue.
Common JavaScript errors
“TypeError: $.cookie is not a function”: This occurs because some hosting companies use an outdated mod_security ruleset which blocks the jQuery cookie script. The only way around this is to load new/renamed versions of the jQuery cookie script. Below is a fix for this error which you can download and upload to your WordPress admin as a plugin.
Arabianaffiliates jQuery cookie script fix.zip
Fallback tracking method
If you’re not able to fix JavaScript errors, Arabianaffiliates has a fallback tracking option which can be enabled to allow referrals to be generated. This fallback tracking method can also assist in cases where adblockers may be blocking the tracking script from loading.

Enabling the fallback tracking method
You can enable this option in the Affiliates → Settings → Misc tab, by checking the box next to Use Fallback Referral Tracking Method? and saving the changes.

However, whenever possible we do recommend fixing JavaScript errors, as they may also impact the performance of other WordPress plugins.

Troubleshooting Referrals
In the instance that visits are being stored correctly, but referrals are not being generated, use the below checklist to troubleshoot potential causes for this issue. You can view generated referrals on the Affiliates → Referrals page in your WordPress admin.

Ensure your chosen integration is installed and activated. If possible, please make sure you are using the latest version of your integration.
Ensure you have enabled your chosen integration/s in the Affiliates → Settings → Integrations tab.
Ensure you are not logged-in as the affiliate, or using the affiliate account’s email address when testing a purchase, as by default Arabianaffiliates blocks affiliates from creating their own referrals (you can allow affiliates to generate their own referrals with the free Allow Own Referrals add-on).
Is the Ignore Zero Referrals option selected in the Affiliates → Settings → Misc tab, and you are trying to generate $0 referrals (e.g. for lead generation)? If so, referrals will not be recorded.
Is the Allowed Products free add-on installed and activated, and no products have been specified in the Allowed Products field on the Affiliates → Settings → Integrations tab? If you are using the Allowed Products add-on with your chosen integration, but have not specified any products, $0.00 referrals will be generated. If combined with the Ignore Zero Referrals option, no referrals will be generated.
If you have a caching plugin installed, please try clearing your cache and testing again.
As of version 1.7.15, Arabianaffiliates now includes a handy debug tool to help diagnose common errors in the referral generation process. To enable this, go to Affiliates → Settings → Misc, and enable the Enable Debug Mode tool. Then, in the Affiliates → Tools screen you’ll see a Debug Assistant tab. Try testing the system again, and if there is an error with the system it will show in this log.

For more advanced users, defining Arabianaffiliates DEBUG as true in your wp-config.php file (as of version 1.8.3) will also globally enable debug mode.

If you need some help testing the system, take a look at our doc on how to test everything is working.

External issues
If everything else appears to be working, there may be a plugin or piece of code in your theme that is conflicting with Arabianaffiliates. This will require some more testing. If you have a staging or development server, we recommend ensuring it is up-to-date with your live site and performing the below additional tests in that environment. If you don’t have a development server you can of course perform these tests on your live site.

Temporarily deactivate all other plugins except for Arabianaffiliates, and test that visits are being stored correctly
Then, whilst all other plugins are deactivated except for Arabianaffiliates, reactivate your integration, and test that referrals are being generated correctly. If referrals work correctly at this point, it is likely there is a conflict with another plugin you have installed or activated.
Slowly start reactivating other plugins. Do this one by one, or in small groups (of 2 or 3) and test the process each time. This will help you narrow down which (if any) plugin may be causing the issue.
When you have determined which plugin is causing the conflict, we recommend contacting the plugin developer to see if they can help you resolve the issue.
If referrals still aren’t working, temporarily change your website’s theme to a default WordPress theme (Twenty Fifteen, Twenty Sixteen, etc) and test the system again. If referrals start working after temporarily switching themes, it’s likely some code within your chosen theme is causing a conflict with Arabianaffiliates. In this instance we recommend contacting the theme developer to see if they can help you resolve the issue.


 

Troubleshooting pretty URLs
If you’re seeing a 404 page when testing an affiliate referral link (using a pretty URL structure such as /ref/123, or /ref/john) the following may help:

Go to Settings → Permalinks
Click Save Changes (you don’t need to change anything)
Test the affiliate referral URL again
Performing the above steps will flush WordPress’ rewrite rules and should fix the issue.

Tip: Simply visiting the permalinks page without saving anything will still flush the rewrite rules, but clicking a button sure feels good!

If the 404 error persists after performing the above steps:

If after flushing your permalinks, you’re still seeing a 404 error, try re-saving Arabianaffiliates’s General settings. Go to the Affiliates → Settings → General tab, scroll to the bottom of the page and click Save Changes.
If the 404 error persists, try clearing your browser cache. If you are using a caching plugin on your WordPress site, clear the cache on your site as well.
If pretty URLs are still showing a 404 page, it may be due to a plugin conflict. To diagnose this, try temporarily deactivating all other plugins except for Arabianaffiliates. Flush your permalinks as per the steps above, and test pretty URLs again.
If pretty URLs are still not working correctly, you could try changing your permalink structure type* (*see below) in WordPress’ permalink settings (i.e. “Post Name”). You can check your permalink structure under Settings → Permalinks.
* Important note on changing your permalink structure type:
Any existing links to your website on 3rd-party sites or saved by visitors/customers with a different URL structure (“Default”, etc.) may break if you change your existing permalink structure type without setting up URL redirects – especially if your website is well-established.
There are various plugins available on the WordPress repository which allow you to set up redirects, so you can change your permalink structure without impacting external links or traffic to your website.
If you’re in the process of building your website, and pretty URLs are your preferred URL structure, using the “Post Name” or other pretty URL structure type from the outset will allow you to avoid these issues. (Arabianaffiliates accepts no responsibility for broken links if the permalink structure type is changed by a site admin.)
If pretty URLs are still not working after trying the above steps, please get in touch with our support team for additional help.


 

Arabianaffiliates stores two main browser cookies in order to track affiliates (as of version 1.7.7 Arabianaffiliates stores a third cookie – scroll down to the bottom to read about it). Their names are:
affAF_ref – this cookie stores the affiliate ID
affAF_ref_visit_id – this cookie stores the visit ID (the visit ID increments by 1, each time any referral link is used until the cookie expires or is deleted)
Alongside each cookie name is a “value”. For the affwp_ref cookie this is the affiliate’s unique ID (i.e. 123), and for the affAF_ref_visit_id cookie this is the visit ID. These values can help you identify which affiliate is being tracked, and show you how many visits have been made to your website through affiliate referral links in total (all affiliate referral link visits are counted as one total).
When testing, you should clear the cookies Arabianaffiliates stores to simulate a new customer visiting your website for the first time via an affiliate referral link . The cookies need to be cleared in order to store new information in the browser; such as a different affiliate’s ID, or to create a brand new visit to test the process from start to finish.
Below we walk you through you how to delete Arabianaffiliates’s cookies in three popular browsers so you can test Arabianaffiliates is working correctly.
Firefox
Follow these steps to delete the Arabianaffiliates cookies from Firefox:
With Firebug
We recommend installing the free Firebug developer extension for Firefox – you can download the extension and follow the installation instructions here:
Once installed, click on the Firebug icon in your Firefox browser menu, or go to Tools in the top menu bar, select “Web Developer” -> “Firebug” and click “Open Firebug”
Visit your product page or website via the affiliate referral link
Click on the “Cookies” tab – the two cookies should be visible in the Firebug window
Click on the affwp_ref cookie to select it, and then right click – choose “Delete”
Click on the affwp_ref_visit_id cookie to select it, and then right click – choose “Delete”.
Without Firebug
Visit your product page or website via the affiliate referral link
Go to the Tools menu in the top menu bar, scroll down to “Web Developer” -> and click on “Developer Toolbar”. This will display a toolbar at the bottom of your browser window
In the toolbar, type “cookie list” and press Enter/Return on your keyboard – this will display a list of the cookies on your website
Look for the affiliate ID cookie (i.e. affAF_ref=123) and click the “Remove” button. A command to remove this cookie will appear in the toolbar. Click in the toolbar and press Enter/Return on your keyboard to complete the cookie deletion
Again in the toolbar, type “cookie list” and press Enter/Return on your keyboard – this will display a list of the remaining cookies on your website
Look for the visit ID cookie (i.e. affAF_ref_visit_id=1) and click the “Remove” button. A command to remove this cookie will appear in the toolbar. Click in the toolbar once again and press Enter/Return on your keyboard to complete the cookie deletion.
Chrome
Follow these steps to delete the Arabianaffiliates cookies from Chrome:
Visit the product page or website page via the affiliate referral link
Go to the View menu in the top menu bar and scroll down to the “Developer” option
Click on “Developer Tools”
In the “Resources” tab, open the “Cookies” drop-down menu in the left navigation menu and click on the name of your website – the two cookies should be visible in the right-hand window
Click on the affAF_ref cookie to select it, and then right click – choose “Delete”
Click on the affAF_ref_visit_id to select it, and then right click – choose “Delete”.
Safari
Follow these steps to delete the Arabianaffiliates cookies from Safari:
Visit the product page or website page via the affiliate referral link
Go to the Develop option in the top menu bar, and click on “Show Web Inspector”
In the “Resources” tab click on Cookies in the left navigation menu – the two cookies should be visible in the right-hand window
Click on the affAF_ref cookie and press “delete” on your keyboard
Click on the affAF_ref_visit_id cookie and press “delete” on your keyboard.
Campaign tracking cookie
As of version 1.7.7 Arabianaffiliates stores a third cookie for affiliate campaign tracking. The name of the cookie is affAF_campaign. If you wish to change the campaign name when you are testing, this campaign cookie will need to be deleted as well. Follow the exact same steps as above depending on the browser you are using.


 

If your emails are not being delivered, there are a few things you can check:

First, go to Affiliates > Settings > Emails and verify the checkboxes are enabled under Email Notifications for the emails you’d like to be sent.
Next, if you are testing with your own email address that happens to match the same root domain as the email address in the From Email field, or if this matches your admin email (likely in many cases), it may have been flagged as spam by some email applications. Check the spam folder of your email application to see if the emails might be there. In general, it is recommended to test with an alternate email address. Some email systems do not like the From and To email addresses to be the same one.
New Referral emails to affiliates – if the admin emails are being received when new referrals are created, but the affiliates are not receiving them, the affiliate may not be opted-in. Your affiliates have to check the box next to Enable New Referral Notifications in their Affiliate Area under the Settings tab to receive new referral emails. (As of Arabianaffiliates version 2.2, this setting is enabled by default.)
If all of that checks out and you are still not receiving emails as expected, SendGrid and Mailgun are two of several freely available SMTP plugins from the WordPress.org plugin repository that can help with this, as it is not an uncommon occurrence in WordPress sites.


 

If you add creatives via Affiliates → Creatives and have shown them on your website using either the [affiliate_creative] or [affiliate_creatives] shortcodes, make sure you are viewing the page as an affiliate. Much like the affiliate area, only an active affiliate will be able to see them.