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

# SamCart integration

> Set up the SamCart Cometly integration with a webhook, so the data SamCart sends is tracked as a Cometly event and tied back to your ads.

You connect [SamCart](https://www.samcart.com/) to Cometly with a webhook, a way for one app to send data to another in real time. SamCart sends its data to a webhook URL from Cometly, and you map that data to a Cometly event for tracking and attribution. An event is an action Cometly tracks, such as a lead or a purchase.

The SamCart Cometly integration matters because Cometly can only attribute the events it receives. Once SamCart sends its data through the webhook, you can see which campaign, ad set and ad produced each event.

## Connect SamCart to Cometly with a webhook

**1. Create a webhook event in Cometly**

1. In Cometly, click **Events Manager** in the sidebar, then click **Create Event**.
2. Under **App / Integration**, select **Webhooks**.
3. Select the event name you want to track, or click **Create New Event**.
4. Click **Create**, then click **Configure** on the new draft event.
5. Click **Copy** next to **Your webhook URL**.

![Receive Data step of a Cometly webhook event for Purchase data, with the Your webhook URL field, a box around the Copy button and the Check for Data button below](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/samcart/01.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=7f30962c0aa0ad39e7f2f2d32f8be0eb)

**2. Add the webhook URL in SamCart**

Follow SamCart's official instructions: [Using webhooks on SamCart](https://help.samcart.com/support/solutions/articles/60000506436-using-webhooks-on-samcart).

When you reach the step that asks for the webhook URL, paste the Cometly webhook URL you copied.

**3. Map the data in Cometly**

Once SamCart has sent data to the webhook, go back to Cometly and finish the event. The [webhooks guide](https://docs.cometly.com/integrations/webhooks.md) has detailed instructions on:

* Checking for data and selecting a record
* Mapping the webhook data to the appropriate fields in Cometly
* Setting up filters so only the data you want is tracked
* Activating the event so it starts tracking

## Check it worked

In **Events Manager**, your webhook event shows a switch that is turned on in the **Status** column. Send a new event from SamCart, then open the **Events Log** tab: the event appears there within 60 seconds, with **SUCCESS** in the **Details** column.

## Frequently asked questions

### Does Cometly have a built-in SamCart integration?

No. You connect SamCart through the **Webhooks** option in Cometly, using the steps on this page. If you would rather build the connection as a Zap, you can also use [Zapier](https://docs.cometly.com/integrations/zapier.md).

### Which SamCart fields do I need to map in Cometly?

**Email** and **Event Time** are required. If the data from SamCart has no event time, choose **The time we receive the event** for **Event Time**, and Cometly uses the time the event arrives. You can map more fields, such as amounts or product names, with **Add Field**.

### Why is my SamCart test data missing from my Cometly reports?

Test data sent before the webhook event is activated is not processed and does not appear in your reports. Activate the event, then send a new event from SamCart. It can take up to 15 minutes to appear in the reporting areas, such as the Report Builder or Ads Manager.

## Next steps

* [Map, filter and activate your webhook event](https://docs.cometly.com/integrations/webhooks.md)
* [Use the Events Log to check incoming events](https://docs.cometly.com/support/troubleshooting/general/event-log.md)
* [Learn how events work in Cometly](https://docs.cometly.com/guides/events/how-events-work.md)
* [Plan which events to track](https://docs.cometly.com/getting-started/tracking-plan.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.