# Outseta

This guide explains how to integrate [Referral Rocket Affiliate Software](https://referralrocket.io) with Outseta to track member signups and referrals.

### Installation

To integrate Referral Rocket with Outseta, you'll need to add two scripts to your website:

1. First, add the main Referral Rocket script to the `<head>` section of your website:

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

2. Then, add the following script to the page where members sign up:

```html
<script>
Outseta.on(
  'signup',
  (account) => {
    // Get campaign instance
    const campaign = window.Rocket.getCampaign();
    
    // Add the new member as a participant
    campaign.addParticipant({
      email: account.PersonAccount[0].Person.Email
    })
    .catch(error => {
      console.error('Error processing referral:', error);
    });
  }
);
</script>
```

### How It Works

1. When a new member signs up through Outseta, it triggers the `signup` event
2. The event handler captures the new member's email address from the Outseta account object
3. The member is automatically added as a participant in your Referral Rocket campaign
4. The system checks for any stored referral information in cookies
5. If a referral is detected, it's automatically associated with the new member

### Testing

* Verify the integration by completing a test signup through Outseta
* You can confirm proper installation by checking `window.Rocket` in your browser console
* Note that referral tracking will only work when your campaign is in live mode

### Important Notes

* Remember to replace `YOUR-CAMPAIGN-ID` with your actual Referral Rocket campaign ID
* Publish your site after adding these scripts
* The integration automatically handles referral detection through stored cookies
* Make sure the Referral Rocket script is loaded before the Outseta integration script

### Troubleshooting

If you're not seeing referrals being tracked:

1. Verify both scripts are properly installed
2. Check the browser console for any error messages
3. Ensure your campaign is in live mode
4. Confirm the Outseta `signup` event is firing correctly

For additional support, contact our team at <support@referralrocket.io>
