How does Gigfiliate for WordPress track visits with cookies?

Gigfiliate for WordPress 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), AffiliateWP stores two main browser cookies in order to track the referring affiliate, and the visit. Their names are:

  • gigfiliatewp_ref – this cookie stores the affiliate’s unique ID
  • gigfiliatewp_ref_username – this cookie stores the affiliate’s username
  • gigfiliatewp_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).

Gigfiliate for WordPress also stores a third cookie for affiliate campaign tracking, gigfiliatewp_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 Gigfiliate for WordPress’s Admin 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 Gigfiliate WP » Settings » General » Referral Settings » Tracking Expiration setting, or until the customer clears their cookies (the default cookie expiration in the Gigfiliate WP » Settings » General » Referral Settings » Tracking Expiration setting is 30 days).

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 AffiliateWP.

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 Gigfiliate WP cookies in Firefox:

  1. Visit your product page or website via the affiliate referral link
  2. 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
  3. In the toolbar, type “cookie list” and press Enter/Return on your keyboard – this will display a list of the cookies on your website
  4. Look for the affiliate ID cookie (i.e. gigfiliatewp_ref=123) and the visit ID cookie (i.e. gigfiliatewp_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 AffiliateWP cookies in Chrome:

  1. Visit the product page or website page via the affiliate referral link
  2. Go to the View menu in the top menu bar
  3. Go to the Developer option
  4. Click on “Developer Tools”
  5. 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 gigfiliatewp_ref and gigfiliatewp_ref_visit_id cookies should be visible there. If the affiliate has created a campaign, the gigfiliatewp_campaign cookie will also be visible.

Safari

Follow these steps to view the AffiliateWP cookies in Safari:

  1. Visit the product page or website page via the affiliate referral link
  2. Go to the Develop option in the top menu bar
  3. Click on “Show Web Inspector”
  4. In the “Storage” tab click on Cookies in the left navigation menu – the gigfiliatewp_ref and gigfiliatewp_ref_visit_id cookies should be visible there. If the affiliate has created a campaign, the gigfiliatewp_campaign cookie will also be visible.

Alongside each cookie name is a “value”. For the gigfiliatewp_ref cookie this value is the affiliate’s unique ID (i.e. 123), and for the gigfiliatewp_ref_visit_id cookie this is the visit ID. For the gigfiliatewp_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).

Testing Gigfiliate for WordPress and clearing cookies

When testing Gigfiliate WP, if you have enabled the Fallback Referral Tracking, this essentially bypasses JavaScript (to avoid any existing JavaScript errors on your website) and tracks the affiliate and the visit using an alternate method. We recommend not enabling this feature unless instructed by support.

Also, to ensure the system is working correctly, you may need to clear your cookies.