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

# FareHarbor integration

> Set up the FareHarbor Cometly integration to tie each booking and its revenue back to the ad or source that produced it, using Zapier.

The FareHarbor Cometly integration tracks the bookings made through the FareHarbor booking form on your website. It has two parts. First, the FareHarbor support team places code on the thank-you page that follows a successful booking (this page shows you the exact code to send them). Then you send a server purchase event (or any custom event) from Zapier, Make.com or any other API service. An event is an action Cometly tracks, such as a booking or a purchase.

That event enriches the contact's profile in Cometly and carries the booking amount as the event value. Cometly matches it to the visitor who booked, so you can see which ad or source produced each booking and how much revenue it brought in.

**Before you start**

1. The Cometly pixel (the tracking script on your site) is installed on your website. See [Install the Cometly pixel](https://docs.cometly.com/getting-started/install-pixel.md).
2. The FareHarbor booking form is embedded on your website.

> [!WARNING]
>
> If the FareHarbor booking form is not embedded on your website, this integration will not work. You cannot use a FareHarbor hosted URL. The form must be embedded on your website.

## Step 1: Send your code to the FareHarbor team

In this step you put together the code that the FareHarbor team installs on the booking confirmation page of your booking funnel. It consists of the Cometly pixel for the space you want to track, plus one additional script.

> [!WARNING]
>
> Each Cometly space (a workspace in your Cometly account) has its own pixel. If you want to set up FareHarbor tracking for several spaces, tell the FareHarbor team which Cometly pixel belongs to which booking funnel.

1. In Cometly, click **Setup** in the sidebar, open the step **Install the Cometly pixel**, and click **Copy Code** under **Install the pixel**.

   ![Install the pixel section of the Cometly Setup page showing the pixel script tag with its uid blurred and an arrow pointing at the Copy Code button](https://mintcdn.com/cometly/gJhojf-axy7BVk83/images/integrations/platforms/fareharbor/12.webp?fit=max\&auto=format\&n=gJhojf-axy7BVk83\&q=85\&s=c27a2db7f009c919a27e51789211fa44)

2. Paste the Cometly pixel into any document or editor and add the code below underneath it:

   ```html theme={null}
   <script>
   comet('schedule', {tracking_id: booking.pk});
   </script>
   ```

   > [!TIP]
   >
   > This code fires a Schedule browser event. The code is required, but you can replace the schedule event with a different one.

3. Check that the code you send to the FareHarbor support team looks like the example below.

   > [!WARNING]
   >
   > The code below is an example only. It does not contain your Cometly pixel. Do not send it to the FareHarbor team.

   ```html theme={null}
   <script src="https://js.comet-serve.com/script.js?uid=051c2a-EXAMPLECODE-0cf0fe-s"></script>

   <script>
   comet('schedule', {tracking_id: booking.pk});
   </script>
   ```

4. Send the code to the FareHarbor team and say which booking funnel it belongs to. It may take 1-2 business days for the FareHarbor team to install the code.

## Step 2: Create a Zap with FareHarbor as the trigger

In steps 2 to 4 you build a Zap in Zapier that sends a server purchase event (or a server custom event) with the booking amount (revenue) to Cometly.

For more information on Zapier, including a video tutorial on setting up a Zap, see the [Zapier integration guide](https://docs.cometly.com/integrations/zapier.md). You can create an account at [Zapier.com](https://zapier.com/).

1. Log in to your Zapier account and **create a new Zap**.

2. Choose **FareHarbor** as the trigger.

   ![Zapier Choose trigger dialog with FareHarbor typed in the search box and an arrow on the result](https://mintcdn.com/cometly/gJhojf-axy7BVk83/images/integrations/platforms/fareharbor/05.webp?fit=max\&auto=format\&n=gJhojf-axy7BVk83\&q=85\&s=975c60daa1554770bbd801d46a496314)

3. For the trigger event, choose **New Booking**.

   ![Zapier FareHarbor trigger with the Event dropdown open and an arrow on New Booking](https://mintcdn.com/cometly/gJhojf-axy7BVk83/images/integrations/platforms/fareharbor/06.webp?fit=max\&auto=format\&n=gJhojf-axy7BVk83\&q=85\&s=46d30b8da4503e951bbd3f47422d1d74)

4. When Zapier asks you to sign in to your FareHarbor account, sign in and run a test so that Zapier captures recent FareHarbor data.

## Step 3: Format the FareHarbor Booking Display ID

Add an action to your Zap that removes the # sign in front of the Booking Display ID number.

By default the Booking Display ID looks like this:

`#228706716`

After formatting it must look like this:

`228706716`

1. Click the plus sign under the trigger to create a new action (1 in the image below) and choose **Formatter by Zapier**. For the event (2), choose **Text**.

   ![Zap editor with a Text in Formatter by Zapier step and arrows on the step and the Event field](https://mintcdn.com/cometly/gJhojf-axy7BVk83/images/integrations/platforms/fareharbor/01.webp?fit=max\&auto=format\&n=gJhojf-axy7BVk83\&q=85\&s=1390a8a2ce1bbe806cf81ae3f0f37be8)

2. Under **Transform**, open the dropdown, search for "Extract Number" and choose **Extract Number**. Click **Continue**.

   ![Formatter by Zapier Transform dropdown with extract number searched and Extract Number selected](https://mintcdn.com/cometly/gJhojf-axy7BVk83/images/integrations/platforms/fareharbor/02.webp?fit=max\&auto=format\&n=gJhojf-axy7BVk83\&q=85\&s=b8a2452d54b7a95de4dbedb7198d2128)

3. Under **Input**, choose the **Booking Display ID** from the FareHarbor trigger.

   ![Formatter Input field holding the Booking Display ID value with a hash sign in front](https://mintcdn.com/cometly/gJhojf-axy7BVk83/images/integrations/platforms/fareharbor/03.webp?fit=max\&auto=format\&n=gJhojf-axy7BVk83\&q=85\&s=f50ff87cfb4e2a81cfa28fbfc3fe27a4)

4. Test the step. The output is the Booking Display ID without the # in front of the number. You use this output in the next step.

   ![Formatter by Zapier test result showing the output number without the hash sign](https://mintcdn.com/cometly/gJhojf-axy7BVk83/images/integrations/platforms/fareharbor/04.webp?fit=max\&auto=format\&n=gJhojf-axy7BVk83\&q=85\&s=96887a7056ef9718645e292f8fd44bc9)

## Step 4: Send the server event with the booking amount and booking ID

1. Add another action to the Zap and choose **Cometly**.

   ![Zap editor with a Cometly action step added below the New Booking in FareHarbor trigger](https://mintcdn.com/cometly/gJhojf-axy7BVk83/images/integrations/platforms/fareharbor/07.webp?fit=max\&auto=format\&n=gJhojf-axy7BVk83\&q=85\&s=953e3b7a33cde539755d9fd6d9a8baa4)

2. For the action event, choose **Send Event**.

   ![Cometly action in Zapier with the Event dropdown open and an arrow on Send Event](https://mintcdn.com/cometly/gJhojf-axy7BVk83/images/integrations/platforms/fareharbor/08.webp?fit=max\&auto=format\&n=gJhojf-axy7BVk83\&q=85\&s=086e80ae6f482e5a8671b45967e231d4)

3. Connect your Cometly account to Zapier. You need a Cometly API token for this:

   1. In Cometly, click **Integrations** in the sidebar, find the **Zapier** card (it is in the **Webhooks & API** category) and click **Connect**.
   2. Click **Activate Zapier**.
   3. Under **Manage API tokens**, enter a **Token Name** and click **Create Token**.
   4. Copy the token straight away. For security reasons, it is not shown again.
   5. In Zapier, paste the token to authenticate your Cometly account.

   > [!WARNING]
   >
   > Each Cometly space has its own Zapier token. If you set up Zaps for several Cometly spaces, authenticate a separate Cometly connection for each space. You can rename the Cometly connection in Zapier to stay organized.

4. Under **Event**, choose the **Purchase** event (listed as `purchase`).

   You can send either the Purchase standard event or any custom event. You cannot use another standard event, because Purchase is the only standard event that can include a value. All custom events can include a value. To use a custom event instead, set it up first and then select it here. [Learn more about setting up custom events](https://docs.cometly.com/getting-started/events.md).

   ![Send Event in Cometly action with the Event list open and arrows on the field and the purchase option](https://mintcdn.com/cometly/gJhojf-axy7BVk83/images/integrations/platforms/fareharbor/10.webp?fit=max\&auto=format\&n=gJhojf-axy7BVk83\&q=85\&s=3a233f48d3bd15017bb30f22b6cb63f9)

5. Map the following fields from your FareHarbor test booking (the trigger step of the Zap):

   * First Name
   * Last Name
   * Email
   * Phone
   * Amount

6. In the **Tracking ID** field, choose the formatted Booking Display ID from the Formatter step you created in Step 3, so that there is no # in front of the number.

   ![Send Event in Cometly action fields with an arrow pointing at the Tracking ID field](https://mintcdn.com/cometly/gJhojf-axy7BVk83/images/integrations/platforms/fareharbor/11.webp?fit=max\&auto=format\&n=gJhojf-axy7BVk83\&q=85\&s=cf0e8ef6943363a6768c2c65e595206e)

7. Click **Test Step** in Zapier to send a test event to Cometly. Once the test looks right, turn on your Zap.

## How the FareHarbor Cometly integration matches a booking to a visitor

The event is not tracked unless the FareHarbor booking ID is included in the Tracking ID field in the Zap. Earlier in the setup you sent this code to FareHarbor:

```html theme={null}
<script>
comet('schedule', {tracking_id: booking.pk});
</script>
```

`booking.pk` is the FareHarbor booking ID. Cometly uses it to match the server event back to the journey of the contact who made the booking.

## Zap setup review

The server event you send to Cometly includes these fields:

* First Name
* Last Name
* Email
* Phone
* Amount
* Tracking ID

## Check it worked

After you click **Test Step** in Zapier, open **Events Manager** in Cometly and click the **Events Log** tab. Your test event appears there with the details you sent. Once your Zap is on, new FareHarbor bookings show up there too.

## Frequently asked questions

### Why are my FareHarbor bookings not showing up in Cometly?

The most common cause is the Tracking ID. The event is not tracked unless the **Tracking ID** field in your Zap holds the FareHarbor booking ID, without the # sign in front of the number. Also check that the FareHarbor team has installed your code on the booking confirmation page and that the booking form is embedded on your website.

### Can I use Make instead of Zapier to send FareHarbor bookings to Cometly?

Yes. You can send the server event from Zapier, Make.com or any other API service. Whichever tool you use, send the same fields as the Zap above, including the FareHarbor booking ID as the Tracking ID. See the [Make integration](https://docs.cometly.com/integrations/platforms/make.md) for how to send events from a Make scenario.

### Do I need a separate FareHarbor setup for each Cometly space?

Yes. Each Cometly space has its own pixel and its own Zapier token. Tell the FareHarbor team which pixel belongs to which booking funnel, and authenticate a separate Cometly connection in Zapier for each space.

## Next steps

* [Connect Cometly to Zapier and send events from any app](https://docs.cometly.com/integrations/zapier.md)
* [Check incoming events in the Events Log](https://docs.cometly.com/support/troubleshooting/general/event-log.md)
* [Set up a custom event to use instead of Purchase](https://docs.cometly.com/guides/events/custom-events.md)
* [Send events to Cometly from a Make scenario](https://docs.cometly.com/integrations/platforms/make.md)

Still have questions or need a hand? We're happy to help. Reach our team at [support@cometly.com](mailto:support@cometly.com).


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