> For the complete documentation index, see [llms.txt](https://referral-rocket.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://referral-rocket.gitbook.io/docs/getting-started/campaigns/installing-tracking-your-referral-campaign/option-2-custom-solution/integrate-the-referral-program-inside-your-webapp-for-logged-in-user.md).

# Integrate the referral program inside your webapp for logged in user

For SaaS or B2B companies, embedding the referral program within the app proves exceptionally advantageous, seamlessly integrating it into your users' workflow. This approach ensures that the referral process becomes an intrinsic part of their interaction with the platform, maximizing visibility and engagement while minimizing disruptions to their workflow. Referral Rocket automatically generates a unique link for your customer and also show the progress of their referrals.&#x20;

Example of integrating referral program in-app:

<figure><img src="https://346708387-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpvWNOwMd3hfowlhBXaA%2Fuploads%2FNZFRFlCy1Xl6SqyXukS9%2FScreenshot%202024-04-20%20at%2012.00.44%20PM.png?alt=media&amp;token=551acf2f-7897-4d0d-a1ca-57f1105db7e3" alt=""><figcaption><p>Integrate a referral program in app using Referral Rocket</p></figcaption></figure>

For generating unique links without requiring user sign-up, simply pass in additional parameters as shown below to the script:

```
//Add script to head tag
<script type="text/javascript" campaign-id="YOUR-CAMPAIGN-ID"  defer src="https://app.referralrocket.io/widget/widgetIndex.js"></script>

//Add to body
<div class="hype_widget" campaign-id="YOUR-CAMPAIGN-ID" email="UserEmail" first-name="FirstName" last-name="LastName" ></div>
```

In addition to the above method, you can build a full customizable solution using our SDK/APIs.
