How to find, customize and share an affiliate referral link

Affiliate for WooCommerce plugin helps you to add, manage affiliates, and track performance from a single place – commissions, sales, payout, leaderboard, etc. Earn money without hard work. Increase your brand outreach, and get potential customers.

This documentation explains how the store admin and affiliates can find, share and customize an affiliate’s referral link.

What are affiliate referral links?

↑ Back to top

In affiliate marketing, affiliate referral links are the URLs your affiliates use to promote your brand or products/services.

Through this link, the Affiliate for WooCommerce plugin tracks referred visits. Then, based on these visits, the plugin generates commissions for your affiliates once an order is successfully placed.

Each of your affiliates will have their own unique referral link.

For example, if your website’s URL is https://demo.storeapps.org/, then the default referral link will look like this:

  • Affiliate with ID #1: https://demo.storeapps.org/?ref=1
  • Affiliate with ID #54: https://demo.storeapps.org/?ref=54

The referral link is built from your website’s home page URL followed by the ?ref=54 string (in the case of affiliate #54).

This string is made of two parts:

  1. The ref keyword, known as the Tracking param name.
  2. The value associated with this variable, which, for the default referral link, is the affiliate’s user ID, known as the affiliate identifier.

The store admin can customize the Tracking param name and the affiliate can customize the affiliate ID/identifier.

A few affiliate link examples:

How to convert default referral links to pretty referral links?

↑ Back to top

The plugin allows you to prettify the affiliate referral links and make them appear more authentic.

Here’s how:

  1. Go to WordPress admin. Then either go to WooCommerce > Affiliates and click on the ‘Settings’ icon on the top right or go to WooCommerce > Settings > Affiliate.
  2. Click on the Referrals tab. Next to the ‘Pretty affiliate links’ setting, enable the checkbox next to it.
  3. Save your changes.

Refer to this pretty affiliate links setting to know more.

After enabling, the above referral links will automatically look like these:

How can the store admin change the tracking param name?

↑ Back to top
  1. Go to WordPress admin. Then either go to WooCommerce > Affiliates and click on the ‘Settings’ icon on the top right or go to WooCommerce > Settings > Affiliate.
  2. Click on the Referrals option. Next to the ‘Tracking param name’ setting, change the ref as you wish. For example, change ‘ref’ to ‘aff’. The changes will be automatically reflected below the box.
  3. Save your changes.

That’s it.

Leaving the tracking param name empty will use the default value as ‘ref’.

Note: You can only add letters in the tracking param name and not numbers or special characters.

Refer to this tracking param name settings to know more.

How can affiliates customize/change their affiliate ID?

↑ Back to top

First, the store admin needs to allow their affiliates to change their affiliate identifier:

  1. Go to WordPress admin. Then either go to WooCommerce > Affiliates and click on the ‘Settings’ icon on the top right or go to WooCommerce > Settings > Affiliate.
  2. Click on the Referrals tab. Next to the ‘Personalize affiliate identifier’ setting, enable the checkbox next to it.
  3. Save your changes.

Refer to this personalize affiliate identifier setting for more details.

Once enabled, your affiliates can customize their affiliate identifier/referral/tracking ID from their ‘My Account’ area by following these steps:

  1. Login to My Account > Affiliate > Profile.
  2. Click on the ‘pencil’ icon beside ‘Your affiliate identifier is’.
  3. Insert identifier i.e. own name, brand name, or other combination of letters only.
  4. Click on the save icon.

Now if that identifier is available, you will be able to use it else you will be prompted to enter a new value.

The new affiliate ID will be reflected beside the ‘Your referral URL is’ section and the new affiliate referral link will be visible next to the ‘Your referral URL is’ section.

Note: The default affiliate ID will be a number i.e. {user_id}. Affiliates can change it to a name for simplicity. However, numbers or special characters are not allowed.

How can store admins find and share referral links?

↑ Back to top

A store admin can find and share an affiliate’s referral link in either of the following ways:

Using the affiliate admin dashboard

↑ Back to top
  1. Go to WordPress admin > WooCommerce > Affiliates.
  2. Select any affiliate. On the right, you will find the ‘Referral Link’ for that affiliate.
  3. To look for any particular affiliate, use the ‘Search’ box next to the Pending Payouts option and apply one or multiple filters based on your need (optional). More information and usage are explained in this doc.
  4. Copy the affiliate referral link from the Affiliate’s Profile tab and click on the ‘Email Affiliate’ icon at the top right. Then share the affiliate’s link and other details via that email.

Campaigns

↑ Back to top

Please refer here for more information.

How to change the default affiliate referral link?

↑ Back to top

By default, an affiliate’s referral link points to your website homepage URL, and the same link is visible in the affiliate’s account as well as several other places like the admin side, campaigns etc.

In the affiliate My Account > Affiliate > Profile tab, if you want to change the default affiliate referral link from the home page to a different page (for example shop page), you can customize it via the ‘afwc_referral_redirection_url‘ filter.

Here are some examples to use/extend the above filter:

Example 1: change the home page link to the shop page link for all affiliates

add_filter( 'afwc_referral_redirection_url', 'storeapps_update_default_url', 10, 2 );
function storeapps_update_default_url( $url = '', $affiliate_id = 0 ) {
	if ( ! empty( $affiliate_id ) ) {
		$url = esc_url( home_url() .'/shop' );    // Replace shop page link without affiliate tracking param with your website's shop page link.
	}
	return $url;
}

Example 2: Change the home page link to a product page link for a particular affiliate.

Here you will need the affiliate’s user ID. To find it, go to WordPress admin > Users > All users. Hover on the ‘username’. WordPress will show the ‘user edit URL’ in a small box at the bottom left corner of the screen.

add_filter( 'afwc_referral_redirection_url', 'storeapps_update_default_url', 10, 2 );
function storeapps_update_default_url( $url = '', $affiliate_id = 0 ) {
	if ( ! empty( $affiliate_id ) && 1 === intval( $affiliate_id ) ) {  // Replace 1 with the affiliate's user ID.
		$url = esc_url( home_url() .'/gopro-hero' );    // Add product page link without affiliate tracking param.
	}
	return $url;
}

You can add the above code to your site by following either of the methods mentioned in this: How to properly add WooCommerce custom code

Important Note

The above method is considered customization. We are happy to provide guidance, but we are unable to provide support or help to suit your store. Only use it if you are comfortable with PHP and custom coding and troubleshooting on your own.

How can affiliates find and share their referral link?

↑ Back to top

An affiliate can locate their referral link and share it with their audience in either of the following ways:

Affiliate’s my account

↑ Back to top

Go to My Account > Affiliate

  1. under the Profile (doc ref) tab
    • The referral link is visible under ‘Your referral URL is:’
    • Click to copy and share the link.
  2. under the Campaigns tab to find any referral link-specific campaign and use it.

Affiliate’s welcome email

↑ Back to top

Each affiliate receives a welcome email when they sign up for your affiliate program. In this email, they will find all the necessary details along with their referral link to promote your products.

Tip: You can share all this information with your affiliates via an onboarding campaign.

How can affiliates generate custom referral links?

↑ Back to top

Please refer here for more information.

Tip: You can share this information with your affiliates via an onboarding campaign.

FAQ

↑ Back to top

1. Can the store admin customize an affiliate’s ID?

↑ Back to top

No, as of now only an affiliate can customize their affiliate ID. We’ll provide this feature for store owners very soon (Add a feature request below if want to be notified once we add it).

But as a workaround, store admin can use any ‘user switching‘ or ‘login as any user‘ or ‘View Admin As‘ (recommended here) plugins to log in to an affiliate’s account and change their affiliate ID as explained above.

Note: We do not recommend any particular plugin. You can check and install a plugin that fits your site/requirements.

2. Why can’t I change the affiliate ID to any other number?

↑ Back to top

By default, an affiliate’s ID is their user ID. An affiliate ID cannot be changed to another number due to the potential risk of conflict with another user’s ID.

3. Can two affiliates have the same affiliate ID?

↑ Back to top

No. The plugin will prompt you to enter a different affiliate ID if the one you are trying to use is already taken by another affiliate.

Feature request

↑ Back to top

Have a feature request or enhancement suggestion for Affiliate For WooCommerce? Submit a feature request or send it to us from here.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.