> ## Documentation Index
> Fetch the complete documentation index at: https://docs.partnero.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Embed an in-site referral widget

You can embed an in-site referral portal widget that customers can access directly from your website or application. By embedding our in-site widget, your customers can easily view their referral data, making the process more transparent and user-friendly.

<img src="https://mintcdn.com/partnero/OHZjbiS4lFuaFFhM/images/articles/embed-an-in-site-referral-portal-widget/a18f97be.webp?fit=max&auto=format&n=OHZjbiS4lFuaFFhM&q=85&s=0c722557cfbd65e35e306b6c14fe342d" alt="" width="3000" height="1773" data-path="images/articles/embed-an-in-site-referral-portal-widget/a18f97be.webp" />

<img src="https://mintcdn.com/partnero/OHZjbiS4lFuaFFhM/images/articles/embed-an-in-site-referral-portal-widget/81467090.webp?fit=max&auto=format&n=OHZjbiS4lFuaFFhM&q=85&s=df07db6fe8644a9979e14509d7ce8df6" alt="" width="3000" height="1773" data-path="images/articles/embed-an-in-site-referral-portal-widget/81467090.webp" />

Before the widget is embedded, make sure to:

1. [Enable the referral portal for your refer-a-friend program](/knowledge-base/referral-programs/referral-portal-explained);
2. [Customize the referral portal and the widget](/knowledge-base/referral-programs/customize-the-referral-portal).

***

### How to embed an in-site widget

The widget can be added in three simple steps. All three steps are required for the widget to work.

#### Step 1: Add the PartneroJS snippet

The first step is to insert the **PartneroJS** snippet before the closing \</head> tag in the HTML code of your website.

1. In your program, go to the **Integration** section: <img src="https://mintcdn.com/partnero/OHZjbiS4lFuaFFhM/images/articles/embed-an-in-site-referral-portal-widget/13db37ae.webp?fit=max&auto=format&n=OHZjbiS4lFuaFFhM&q=85&s=c2698225028a650233a7697b6d8550c9" alt="" width="2868" height="1548" data-path="images/articles/embed-an-in-site-referral-portal-widget/13db37ae.webp" />
2. Scroll down to the **Program details** section and copy the PartneroJS snippet: <img src="https://mintcdn.com/partnero/OHZjbiS4lFuaFFhM/images/articles/embed-an-in-site-referral-portal-widget/f27da2fc.webp?fit=max&auto=format&n=OHZjbiS4lFuaFFhM&q=85&s=1fac683d31522425affe84e50c50dae9" alt="" width="2874" height="1558" data-path="images/articles/embed-an-in-site-referral-portal-widget/f27da2fc.webp" />
3. Paste the script before the closing \</head> tag in the HTML code of your website.

***

#### Step 2: Connect a referral portal domain

The referral portal must be connected with a subdomain and hosted on your domain to enable the widget.  <img src="https://mintcdn.com/partnero/OHZjbiS4lFuaFFhM/images/articles/embed-an-in-site-referral-portal-widget/3988e43d.webp?fit=max&auto=format&n=OHZjbiS4lFuaFFhM&q=85&s=db39c66ea222fecbd2cc8baea489273c" alt="" width="2864" height="1554" data-path="images/articles/embed-an-in-site-referral-portal-widget/3988e43d.webp" />

[How to connect a referral portal domain →](/knowledge-base/referral-programs/connect-a-custom-referral-portal-domain)

***

#### Step 3: Enable the in-site widget

Once you've completed the first two steps, the setting to enable the in-site widget will be available.

1. Go to **Referral portal →** **General** tab. Scroll down to **Portal features**.
2. Toggle to **Enable in-site widget**. You can also list which pages you'd like the widget to appear on: <img src="https://mintcdn.com/partnero/OHZjbiS4lFuaFFhM/images/articles/embed-an-in-site-referral-portal-widget/78987fb0.webp?fit=max&auto=format&n=OHZjbiS4lFuaFFhM&q=85&s=7600d7da40fbdda358ebc591b5c75a86" alt="" width="2848" height="1550" data-path="images/articles/embed-an-in-site-referral-portal-widget/78987fb0.webp" />
3. Click **Update** to save your changes.

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.