Skip to main content

How referral sources work

Learn what referral sources are and how to use them to track where your users come from.

Written by Yifan Dong

Referral sources allow you to track how a new user found your marketplace; for example, which marketing campaign or affiliate partner sent them your way. When someone arrives at your marketplace through a specific referral source and then creates an account, the referral source information is saved to that registered user's information.

Referral sources are useful when you want to attribute where your sign-ups come from, reward the affiliates that bring you new users, or understand which of your efforts to onboard new users are working best. For example, you could create a referral source for:

  • A third-party website that recommends your marketplace.

  • A seasonal newsletter or email outreach campaign.

  • Your marketplace's affiliate program.

How to create a referral source

Referral sources are created in the user types settings in Console, Users → User types. Each referral source belongs to a specific user type, so this information is captured when a new user of that type signs up. If you have more than one user type and want to track the same referral source across all of them, you'll need to create it separately for each user type.

You can create up to 5 referral sources for a given User type. To create a referral source:

  1. In Console, go to the user type and open the user type settings.

  2. Click + Add a new referral source

  3. Fill in the two fields

    1. Referral source: This is the name of your referral source. It's only shown in Console, so use something that's easy for you to recognize.

    2. URL parameter name: This is the name used in your referral links and it's also the label under which the value is stored in the referred user's private data, in Manage users.

  4. Click Save changes.

Note: If you have a C2C or peer-to-peer marketplace, where a user can be both a customer and a provider, you may not have user types set up. You need at least one user type to set up a referral source.

How to use a referral source

Once you've created a referral source, you can use it by adding it to the links to your marketplace. For example, let's say you run an affiliate program and want to track which affiliate sends you each new user.

  1. You create a referral source:

    1. You name the referral source “Marketing Affiliate Program".

    2. You give it a URL parameter name “affiliate”.

  2. You assign each affiliate a unique value and give them a link that includes it. For example, one affiliate could be assigned the value aff-001, giving them this link: https://yourmarketplace.com/?affiliate=aff-001.

  3. When someone visits your marketplace through that link and later creates an account, the value (aff-001) is saved to their private data, so you know affiliate 001 referred them.

Once a user has signed up through one of your referral links, you can see the captured value in their private data on the Manage users page in Console. All referral source keys have a referralSource_ prefix. For example, if you use affiliate as the URL parameter name, the key stored in private data will be referralSource_affiliate.

Referral link format

A referral link is one of your marketplace links with the referral parameter added to the end. It consists of the marketplace page URL and the referral parameter (including the parameter value).

For example: yourmarketplace.com/?affiliate=aff-001

Marketplace page URL (https://yourmarketplace.com/). This is the URL of the page you want to share. This can be any page on your marketplace, such as your landing page, sign-up page, about page, or any other content pages.

The referral source can be captured in all of the marketplace pages (landing page, sign-up page, about page, and so on), as long as the link they click includes the parameter name and value. So you're free to send people to whichever page makes the most sense for that partner or campaign.

Referral parameter (?affiliate=aff-001). This is added directly after the marketplace page URL. It combines two things: your URL parameter name (affiliate) and a value (aff-001), joined by an =. The URL parameter name is defined in Console.

You can determine the value of the parameter.

You reuse the same URL parameter name across all your referral links and change only the value, so you can tell the sources apart. In an affiliate program, that means giving every affiliate their own value, for example, aff-001, aff-002, and aff-003, and handing each one a referral link with their value in it. The value is what gets stored in the user's private data when they sign up, so choose labels you'll recognize later.

How long a referral source is remembered before sign-up

A visitor doesn't need to sign up the moment they arrive for the referral source to count. When someone visits your marketplace through a referral link, the referral information is stored in their browser (in the browser's local storage) for up to 90 days.

  • If they create an account within those 90 days, even days or weeks later, or after leaving your marketplace site, the referral is saved to their user's private data, and the stored information is cleared.

  • If they don't create an account, the information expires after 90 days and won't be saved, even if they sign up later.

Important: To comply with online privacy regulations, don't use referral sources to store any personally identifiable information, such as names, email addresses, or phone numbers. If you're tracking an individual as the referral source, such as an influencer as part of a marketing campaign, don't use their name or social media handle as the value, since those can be considered as personally identifiable information. Use a non-identifying code or label instead.

How to create an affiliate program

Referral sources are a simple way to track where your sign-ups come from. If you want something more specialised, for example, to automatically calculate rewards, attribute referrals, and automatically pay out affiliates, consider using a dedicated affiliate tool.

We recommend using Toppal, a third-party affiliate marketing tool built specifically for Sharetribe marketplaces.

Learn how Toppal works and how to use it to create an affiliate program for your marketplace.

Did this answer your question?