Custom Affiliate Slugs Installation and Usage

How to Install and Use the Custom Affiliate Slugs Add-on for AffiliateWP

AffiliateWP provides many different affiliate URL variations that your affiliates can use simultaneously. Custom Affiliate Slugs takes this one step further, allowing affiliates to create their own custom “slug”. A slug is the piece of the referral URL where there would usually be the affiliate’s username or ID.

In this article, we’ll show you how to install and set up the Custom Affiliate Slugs add-on for AffiliateWP.

  1. Installing the Custom Affiliate Slugs Add-on
  2. Setting up Custom Affiliate Slugs
  3. Setting the Default Referral Format
  4. Per-Affiliate Custom Slugs
  5. Changing an Existing Affiliates Slug as an Admin
  6. Adding a Custom Slug While Adding a New Affiliate
  7. Exporting a .CSV File of Affiliates and Their Custom Slugs
  8. Adding a Custom Slug as an Affiliate
  9. FAQs

1. Installing the Custom Affiliate Slugs Add-on

Before we get started, be sure to install and activate AffiliateWP on your WordPress site.

Once you’ve got AffiliateWP installed and your license is verified you’ll be able to quickly install and activate the Custom Affiliate Slugs add-on.

After installing the Custom Affiliate Slugs add-on, the next step is to configure your settings.

2. Setting up Custom Affiliate Slugs

To configure the Custom Affiliate Slugs settings navigate to AffiliateWP » Settings and then click on the Custom Affiliate Slugs tab.

AffiliateWP Custom Affiliate Slugs Settings

Allow Custom Affiliate Slugs

Enable this option if you’d like all affiliates to be able to add a custom slug. Leave this option unchecked if you only want to enable custom slugs on a per-affiliate level (see below).

Show Custom Slug

If your Default Referral Format in AffiliateWP’s General settings tab is set to ID or Username you can enable this option and the affiliate’s custom slug (if they have one) will be shown on the Affiliate URLs tab of the Affiliate Area, (however the URL generator will continue to work only for the ID or Username). If you set the Default Referral Format to Custom Affiliate Slug, the affiliate ID or Username will not be shown, the affiliate’s custom slug will be shown in place of their ID and username, plus they will be able to use the URL generator to generate a referral URL with their slug in it.

Auto-create Custom Slugs

Enable this option if you’d like custom slugs to be automatically generated for your affiliates when:

  1. An affiliate registers via the affiliate registration form
  2. The Auto Register New Users option is enabled from AffiliateWP » Settings » Affiliates and a user is automatically registered as an affiliate
  3. An affiliate is added manually via the AffiliateWP » Affiliates » Add New screen

When this option is enabled an Auto-create Slug Settings section will appear with the following options:

Slug Preview

This will show the admin an example of what an automatically generated slug could look like. This preview will dynamically update as you alter the slug type and slug length as mentioned below.

Slug Type

Choose between an alphanumeric (letters and numbers) or alphabetic slug (letters only).

Slug Length

Set the length of a newly generated slug (the maximum length is 60 characters as per WordPress’ default username standards).

3. Setting the Default Referral Format

If you’ve been using AffiliateWP for some time, we’ve added settings to make Custom Affiliate Slugs more seamless without disrupting your affiliates’ experience.

If your default referral format is set to ID or Username, this is what affiliates will be used to seeing in the Affiliate URLs tab of the Affiliate Area. By enabling the Show Custom Slug option in AffiliateWP » Settings » Custom Affiliate Slugs, the affiliate will still see their ID or username as normal, however they will also now see their custom slug, and a custom slug URL they can use above their ID or username. If they use the URL Generator, this will continue to generate a URL for the affiliate using their ID or username (depending on which default referral format you have set).

When you install and activate Custom Affiliate Slugs, a new Custom Affiliate Slug option will also appear in the Default Referral Format dropdown in the AffiliateWP » Settings » Affiliates tab. This allows you to show an affiliate their referral URL with their custom slug, rather than the ID or username. The affiliate will also be able to generate a referral URL using the generator with their custom slug (their ID or username will not be visible).

AffiliateWP Default Referral Format

  1. Go to AffiliateWP » Settings » Affiliates tab of the settings
  2. Scroll down to the Default Referral Format dropdown menu and select Custom Affiliate Slug
  3. Click the Save Changes button at the bottom of the page

Once this option is enabled, the URL shown in the Affiliate URLs tab of the Affiliate Area will include the affiliate’s custom slug. If an affiliate does not have a custom slug, or they remove it themselves, it will fallback to showing their username as the default referral format.

4. Per-Affiliate custom slugs

An admin can allow custom slugs on a per-affiliate basis.

AffiliateWP allow custom slugs
  1. Go to the AffiliateWP » Affiliates screen
  2. Click on the name of the affiliate you wish to enable custom slugs for
  3. Enable the Allow Custom Slug checkbox option
  4. Click the Update Affiliate button

5. Changing an existing affiliate’s slug as an admin

An admin can change an affiliate’s custom slug:

  1. Go to the AffiliateWP » Affiliates screen
  2. Click on the name of the affiliate you wish to change the custom slug for
  3. Find the Custom Slug field and enter a new slug for the affiliate (or remove it)
  4. Enable the confirmation checkbox that will appear after validation passes
  5. Click the Update Affiliate button
AffiliateWP Custom Slug Acknowledgement

6. Adding a custom slug while adding a new affiliate

An admin can add a custom slug while they are adding a new affiliate:

  1. Go to the AffiliateWP » Affiliates screen
  2. Click the Add New button
  3. Select the affiliate from the User field, and complete the other fields
  4. Enter a custom slug in the Custom Slug field
  5. Click the Add Affiliate button

If no custom slug is entered for the affiliate, and  Auto-create Custom Slugs is enabled from the admin settings, a randomly generated custom slug will be given to the affiliate.

7. Exporting a .CSV file of affiliates and their custom slugs

An admin can export a .CSV file that contains the current custom slug for each affiliate.

  1. Go to AffiliateWP » Tools and make sure you’re on the Export/Import tab
  2. In the Export Affiliates section, select a status and then click the Export button
  3. At the download prompt click OK (or similar) to download the .CSV file to your computer
  4. Inside the .CSV file, there will be a new column titled Custom Slug.

8. Adding a custom slug as an affiliate

  1. Go to the Affiliate Area’s Settings tab.
  2. Enter a slug in the Custom Affiliate Slug input field.
  3. Enter the slug one more time to confirm in the confirmation field that appears.
  4. Click the Save Profile Settings button.

Here’s the Custom Affiliate Slug input field in the Affiliate Area:

Affiliate Area Custom Slug

When an affiliate has entered a custom slug they will be prompted to confirm it by re-entering the custom slug once more:

Affiliate Area Custom Slug Change

9. FAQs

Existing WordPress usernames from other accounts (including multisite) cannot be used for the slug value, you will receive the error: This slug cannot be used.