# Alchemer Integration

> Step-by-step guide to integrate Ours Privacy with Alchemer for tracking survey responses and custom events while prioritizing privacy and HIPAA compliance.

Source: https://docs.oursprivacy.com/docs/alchemer

Track Alchemer survey responses and custom events in Ours Privacy with analytics built for **HIPAA-regulated workflows**.

## Alchemer Redirect (easy integration)

The simplest way to integrate Ours Privacy with Alchemer is to set up a redirect after survey completion. Here's how:

1. Make sure the Ours Privacy Web SDK is installed on your website.
2. Link from your website to an Alchemer survey.
3. Set up a custom thank-you page in Alchemer to redirect back to your website.

On your thank-you page, fire this Ours Privacy event:

```javascript
ours('track', 'SurveyCompleted');
```

This method requires no complex integration and provides basic tracking. Configure the redirect in your Alchemer survey settings.

![](https://docs.oursprivacy.com/img/alchemer/alchemer-img-1.jpg)

---

## Ours Privacy Alchemer Source (custom integration)

For more advanced tracking and to access survey response details, you can set up a custom integration with Alchemer. Follow these steps:

1. **Create a New Source**:
   - In the Ours Privacy dashboard, navigate to **Sources** and create a new source.
   - Select **Alchemer** from the options and copy the Webhook URL provided.

2. **Add Webhook in Alchemer**:
   - Go to your Alchemer survey settings.
   - Add a new webhook action on a survey page (not the first page) and paste the Ours Privacy Webhook URL.
   - Choose the HTTP POST method for larger data transmission.

3. **Submit a Test Survey**:
   - Complete a test survey to ensure data is sent to Ours Privacy.
   - Check the Ours Privacy dashboard for pre-populated variables from the survey payload.

4. **Map Survey Fields**:
   - Use the field mapping interface in Ours Privacy to map Alchemer survey data to its attributes.
   - Include at least the **Ours Visitor ID** field and optionally an email address for user association.

![](https://docs.oursprivacy.com/img/alchemer/alchemer-img-2.png)

---

### Advanced Source Integration

To link Ours Privacy visitor data with Alchemer survey responses:

1. **Add a Hidden Field in Alchemer**:
   - Set up a hidden field in your survey to capture the visitor ID.

2. **Pass Visitor ID via URL**:
   - When linking to the Alchemer survey, append the visitor ID from `ours.getVisitorId()` as a URL parameter. Example:

```html
<a id="survey-link" href="https://survey.alchemer.com/s3/your-survey-id">Start Survey</a>

<script>
  document.getElementById('survey-link').href =
    'https://survey.alchemer.com/s3/your-survey-id?ours_user_id=' + ours.getVisitorId();
</script>
```

3. **Map Hidden Field**:
   - Map the hidden field in the Ours Privacy dashboard to the visitor ID for accurate user tracking.

---

### Key Benefits of the Ours Privacy Alchemer Integration

- **Built for HIPAA-regulated workflows**: Ideal for healthcare and other privacy-sensitive industries.
- **Custom Event Flexibility**: Track survey responses, interactions, and more.
- **Enhanced Data Accuracy**: Server-side integration ensures reliable analytics.

For further assistance, contact [support@oursprivacy.com](mailto:support@oursprivacy.com).
