> ## 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.

# Zapier

> Set up the Zapier Cometly integration to send leads, deals and purchases from any app to Cometly as events, tied to the ad behind each one.

[Zapier](https://zapier.com/) lets you automate the flow of data between thousands of apps and Cometly, and send data from those apps to Cometly as events. An event is an action Cometly tracks, such as a form submission, a new deal or a purchase. With the Zapier Cometly integration, Cometly is the action step of your Zap.

This matters when a lead or sale happens in a tool Cometly does not receive data from directly, such as your CRM or payment provider. Once those events reach Cometly, it can match each one to the visitor and to the ad or channel that brought them, so your reports show which ads produce leads and revenue.

## Start here

Zaps, Zapier's automated workflows, can be set up in minutes without any coding. Each Zap includes:

* A **trigger**: an event in one app that starts the workflow (for example a form submission or a deal update).
* An **action**: what happens in response to the trigger, such as sending event data to Cometly.

You can use almost any app as the trigger (CRM, web builder, payment provider and so on) and set Cometly as the action, so event data is sent automatically from the tools you already use.

### Common use cases

* **Form submissions:** send an event to Cometly when a lead submits a form. Cometly receives the event from the app where the form is hosted.
* **CRM updates:** track key CRM activity such as deal creation or status updates. For example, send a server-side event to Cometly whenever a deal is created or marked as Closed Won in your CRM.
* **Payments:** capture purchases and transaction events for accurate revenue tracking.

> [!TIP]
>
> **Contact data enrichment:** if the Cometly pixel (the tracking script on your site) only captures an email address from your form submissions, Zapier can help enrich contacts. Include fields such as first name, last name and phone number in your Zap, and the contact in Cometly is updated with that information.

### Example: Cometly as the action in your Zap

In this example, the goal is to send a **Qualified Trial** event to Cometly. When the lifecycle stage of a contact changes to "Qualified Trial" in HubSpot, the Zap sends a Qualified Trial event to Cometly.

![Zap with three steps: a HubSpot property update trigger, a Filter by Zapier step, and a Cometly action](https://mintcdn.com/cometly/cMwLedstW5vzvUYN/images/integrations/zapier/01.webp?fit=max\&auto=format\&n=cMwLedstW5vzvUYN\&q=85\&s=ae348e0ece2126f8755a31b68999dcdc)

## Connect Cometly to Zapier

This video shows how to connect your Cometly account to your Zapier account.

[How to connect Cometly to Zapier](https://www.loom.com/embed/c987b766ed5e40fb8dd02ccdcfba2f0b)

Before you start: creating API tokens requires the **Administrator** or **Advertiser** role in the space (a workspace in your Cometly account).

**1. Open the Zapier integration in Cometly**

Go to the [**Integrations**](https://app.cometly.com/integrations) page, find the **Zapier** card (category **Webhooks & API**) and click **Connect**.

**2. Activate Zapier and create an API token**

1. Click **Activate Zapier**.
2. Under **Manage API tokens**, enter a **Token Name** and click **Create Token**.

![Zapier integration page in Cometly showing Zapier activated and the Manage API tokens step, with a Token Name typed in and an arrow pointing to the Create Token button](https://mintcdn.com/cometly/cMwLedstW5vzvUYN/images/integrations/zapier/02.webp?fit=max\&auto=format\&n=cMwLedstW5vzvUYN\&q=85\&s=4e36f50dd92f8aafdabc4e638c69b9c2)

3. Copy the token right away for the next step. For security reasons, Cometly does not show it again.

**3. Connect Zapier to Cometly**

1. In Zapier, set up your Zap with a trigger event (for example a new contact in HubSpot).
2. Add a new action step to your Zap and search for **Cometly**.
3. For the action event, select **Send Event**.
4. For the account, paste the Cometly API token you created in the previous step.

**4. Name your connection**

Optionally, rename the connection in Zapier to match the name of your Cometly space so it is easy to identify.

**5. Use the connection**

Once connected, you can send events to Cometly from any app in Zapier.

If you have more than one Cometly space, repeat the process with an API token created in each space. Name each Zapier connection after its space to stay organized.

You can now send events from any Zapier-supported app to Cometly.

## Send events to Cometly from Zapier

In your Zap, select any app as the trigger (CRM, website builder, payment provider and so on) and set Cometly as the action to send event data automatically.

If you have not connected your Cometly account to Zapier yet, follow [Connect Cometly to Zapier](#connect-cometly-to-zapier) first.

This video shows step by step how to set up Cometly as an action that receives event data.

[How to send events to Cometly using Zapier](https://www.loom.com/embed/c1cc396ac2684db4a27676718b8daa07)

**1. Choose your trigger app**

In Zapier, select the app you want to use as the trigger (for example HubSpot, another CRM, a website builder or a payment provider) and set up the trigger event.

**2. Add Cometly as an action step**

Click **Add Step** in your Zap, search for **Cometly**, and select **Send Event** as the action event.

**3. Connect your Cometly account**

If it is not connected yet, paste your Cometly API token when prompted. See [Connect Cometly to Zapier](#connect-cometly-to-zapier).

**4. Choose your event**

Select a pre-configured event such as **Lead**, **Purchase** or **Add to Cart**, or create an event in Cometly.

**5. Map your data fields**

Match fields from the trigger app (for example email, first name, last name and phone number) to Cometly.

For event values (for example deal amounts), map the field that holds the amount so Cometly can report revenue.

**6. Test and verify**

Click **Test Step** in Zapier to send a test event to Cometly. Then open **Events Manager** in Cometly and check the **Events Log** tab to confirm the data was received.

**7. Activate your Zap**

Once everything is verified, turn on your Zap to start sending live event data to Cometly.

> [!NOTE]
>
> * Create separate Zaps for different event types (for example leads, deals and purchases).
> * Use Zapier filters to control which data is sent (for example only qualified leads).

## Check it worked

On the Zapier page in Cometly, step 1 shows **Zapier activated**. After you click **Test Step** in Zapier, the test event appears in **Events Manager** on the **Events Log** tab. Once your Zap is on, new events from your trigger app show up there too.

## Use cases

Each use case has its own requirements for Cometly to track customer actions accurately.

### Ecommerce stores

To track purchases:

* Make sure the **email address** is captured on the order form (this is usually automatic).
* If the email is not captured, include all of the following in your data:
  * **IP Address**
  * **Fingerprint**
  * **Comet Token**

The email is the unique customer identifier, while the IP address, fingerprint and Comet Token let Cometly match the purchase to the visitor. Cometly also has direct integrations with major ecommerce platforms and funnel software.

### Marketing funnels, CRM actions and payments

To track leads and purchases in a marketing funnel:

* If the customer's **email address** is captured earlier in the funnel (for example through a form submission), you can use Zapier to send only the email to Cometly.
* Cometly associates the email with that lead, using the pixel installed on your site.
* For purchases, platforms like Stripe can send only the email, because Cometly already has the customer's information from earlier in the funnel.

See the full list of direct integrations on the [Integrations overview](https://docs.cometly.com/integrations/overview.md).

## Webhooks

If Zapier has no integration with the app or service you need, use Cometly webhooks instead.

The [Webhooks guide](https://docs.cometly.com/integrations/webhooks.md) explains how to:

* Create your webhook in Cometly.
* Select the event (or create a new event) for the webhook.
* Map the webhook data to the right fields in Cometly.
* Set up filters so only the data you want is tracked.

## Frequently asked questions

### What do I do if I lost my Cometly API token for Zapier?

Create a new one. Cometly shows a token only once, so open the Zapier page in Cometly, create another token under **Manage API tokens** and paste it into your Cometly connection in Zapier. You can delete the old token from the **Your Tokens** list.

### Can I send HubSpot, Salesforce or Stripe events to Cometly with Zapier?

Yes. Each has its own walkthrough: [HubSpot deals](https://docs.cometly.com/integrations/guides/hubspot-deals-zapier.md), [Salesforce leads and opportunities](https://docs.cometly.com/integrations/guides/salesforce-zapier.md) and [Stripe first-time and recurring payments](https://docs.cometly.com/integrations/guides/stripe-first-vs-recurring-payments-zapier.md). HubSpot and Stripe also have direct Cometly integrations, so check those first.

### Do I need Zapier if Cometly already integrates with my tool?

Usually not. A direct integration sends events to Cometly without a Zap in between. Check the [Integrations overview](https://docs.cometly.com/integrations/overview.md) for your tool, and use Zapier when it is not listed or when you need a trigger the direct integration does not offer.

## Next steps

* [Send HubSpot deals to Cometly with Zapier](https://docs.cometly.com/integrations/guides/hubspot-deals-zapier.md)
* [Set up Salesforce with Zapier](https://docs.cometly.com/integrations/guides/salesforce-zapier.md)
* [Track Stripe first-time and recurring payments with Zapier](https://docs.cometly.com/integrations/guides/stripe-first-vs-recurring-payments-zapier.md)
* [Manage the custom events your Zaps send to](https://docs.cometly.com/guides/events/custom-events.md)
* [Send events with webhooks when Zapier has no app for your tool](https://docs.cometly.com/integrations/webhooks.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.