Referrals

Referrals

Referral Program

The referral program allows users to earn revenue by sharing your products with others, whether through social media or other channels. When a user creates an account on your website, they can join the referral program. In their user profile, they’ll find a button at the bottom-right of the page, which links to the referral program page.

Image of studio overview

On the Referral Program page, a user can generate a referral ID by clicking on the “Generate ID” button if they haven't created one yet.

Image of studio overview

Once created, users can view both their pending and paid earnings generated through referrals. There is also an option to copy the referral ID, making it easy to share with others.

Image of studio overview

How the Referral Program Works

Suppose User A visits your website, creates an account, generates a referral ID, and shares their unique referral URL on Facebook. Now, if User B clicks on this shared link to visit your website, the URL will contain a referral query parameter (e.g., ?referralID=123). The application automatically detects and saves this referral ID in cookies.

If User B subsequently signs up or makes a purchase, the saved referral ID will be associated with their placed order. The original referrer, in this case, User A, will then earn a commission based on the product's set referral amount.

Setting Referral Commissions

In the Sanity Studio under the “products” collection, you’ll find a field labeled Referral Commission directly beneath the pricing fields. Here, you can specify the amount that referrers will earn when they generate sales through their referral links.

Image of studio overview

Each product also has a shareable URL that includes the referral ID, accessible at the bottom of each product detail-page page, making it straightforward for users to share.

Image of studio overview

This program provides a seamless way for your users to promote your products and earn while doing so.