# Quickstart

Get your first referral tracked in under 10 minutes.

***

## What you'll build

By the end of this guide you will have:

* A live referral campaign
* A widget embedded on your site (or a hosted page link ready to share)
* Referral tracking firing on sign up or payment

***

## Step 1: Create a Campaign

1. Log in to your [Referral Rocket dashboard](https://app.referralrocket.io).
2. Click **New Campaign**.
3. Choose a campaign type. If you're not sure, start with **Double-Sided Referral** — it rewards both the referrer and the new user.
4. Fill in the basics:
   * **Campaign name** (internal label)
   * **Reward** — e.g. "$20 for the referrer, $10 for the new user"
   * **Qualifying event** — when the reward is triggered (sign up, first payment, etc.)
5. Click **Save & Continue**.

> See [Campaign Types](https://github.com/krs87851/Referral-Rocket/blob/main/getting-started/campaign-types.md) for a full breakdown of all six campaign structures.

***

## Step 2: Choose Your Installation Method

### Option A — Hosted Page (no code required)

1. From the Campaign Detail page, copy the **Hosted Campaign URL**.
2. Share this link in your emails, social posts, or in-app banners.
3. Done — participants sign up on the hosted page and get their referral link automatically.

**Use this if:** you want to launch immediately without touching your codebase.

***

### Option B — Embed on Your Site (recommended)

Add one script tag to the `<head>` of your site. Find your `campaign-id` on the Campaign Detail page under **Installation**.

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

**Verify it's working:** Open your browser console and type `window.Rocket`. You should see the Referral Rocket object, not `undefined`.

***

## Step 3: Track Referrals

### On Sign Up

When a new user registers, call `addParticipant`. The SDK reads the referral cookie automatically — no need to manually pass a referral code.

```javascript
const campaign = window.Rocket.getCampaign();

campaign.addParticipant({
  email: 'newuser@example.com',
  fName: 'Jane',
  lName: 'Smith'
}).then(function(participant) {
  console.log('Referral tracked! Share link:', participant.shareLink);
});
```

### On Payment (if your qualifying event is a purchase)

After a successful payment, call `qualifyParticipant` to mark the event complete and trigger the referrer's reward.

```javascript
const campaign = window.Rocket.getCampaign();

campaign.qualifyParticipant({
  email: 'newuser@example.com',
  amountPaid: 49.00       // optional, for percentage-based rewards
}).then(function() {
  console.log('Reward triggered for referrer.');
});
```

> **Using Stripe?** See the [Stripe Integration](https://github.com/krs87851/Referral-Rocket/blob/main/integrations/stripe.md) guide for payment link, pricing table, and checkout session setups.

***

## Step 4: Test Your Integration

1. Open your site in an **incognito window**.
2. Grab a referral link from any existing participant (or create one via the hosted page).
3. Visit your site via that referral link.
4. Complete the sign up (and payment if applicable).
5. Go to **Campaign > Participants** in your dashboard — the new referral should appear with the referring participant linked.
6. Check **Reward Management** to confirm the reward is queued.

***

## Step 5: Go Live

* Remove any test participants from the dashboard before launching.
* Set your campaign status to **Active** if it isn't already.
* Share your referral link or widget URL with your first users.

***

## What's Next

| Topic                           | Link                                                                                                                    |
| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| All campaign types explained    | [Campaign Types](https://github.com/krs87851/Referral-Rocket/blob/main/getting-started/campaign-types.md)               |
| Customize the widget appearance | [Referrer & Invitee Widgets](https://github.com/krs87851/Referral-Rocket/blob/main/getting-started/campaign-details.md) |
| Full SDK reference              | [JavaScript SDK](/docs/developer-tools/javascript-sdk.md)                                                               |
| Server-side API                 | [REST API](https://github.com/krs87851/Referral-Rocket/blob/main/developer-tools/rest-api.md)                           |
| Stripe, Shopify, and more       | [Integrations](https://github.com/krs87851/Referral-Rocket/blob/main/integrations/stripe.md)                            |
| Reward issuance workflow        | [Reward Management](https://github.com/krs87851/Referral-Rocket/blob/main/getting-started/reward-management.md)         |
| Real-time events                | [Webhooks](https://github.com/krs87851/Referral-Rocket/blob/main/developer-tools/webhooks.md)                           |
| Common issues                   | [Troubleshooting](broken://pages/9svmFr7WYQhSigbjqjqr)                                                                  |

***

## Need Help?

* **In-app chat** — available from any page in your dashboard
* **Email** — <support@referralrocket.io>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://referral-rocket.gitbook.io/docs/quickstart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
