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

# Cometly Integration

> How to connect Cometly attribution data to AdStellar

[Cometly](https://www.cometly.com/?comet_custom=adstellar) is a server-side attribution platform that provides more accurate conversion data than traditional pixel-based tracking. Once connected, you can use Cometly's attribution data as your Results metric for campaign performance analysis and AI optimization.

## Before You Start

You'll need:

* An active [Cometly](https://www.cometly.com/?comet_custom=adstellar) account with data flowing
* Your Cometly API key (found in Cometly under Integrations > API)
* At least one Meta ad account connected to AdStellar
* Ads running that are being tracked by Cometly

***

## Connect Your Cometly Account

<Steps>
  <Step title="Open Settings">
    Navigate to **Settings** in the left sidebar.
  </Step>

  <Step title="Go to Integrations">
    Click the **Integrations** tab.
  </Step>

  <Step title="Find Cometly">
    Locate the **Cometly** integration card.
  </Step>

  <Step title="Enter your API key">
    Paste your Cometly API key into the input field.
  </Step>

  <Step title="Connect">
    Click **Connect** to validate the key.
  </Step>
</Steps>

Once validated, the card will expand to show configuration options.

<img src="https://mintcdn.com/adstellarai/W3gnUVOO9KFygrmt/images/articles/13467264-1.png?fit=max&auto=format&n=W3gnUVOO9KFygrmt&q=85&s=2473fa9a2e810c9c5a673c71932c0b43" alt="" width="2264" height="1620" data-path="images/articles/13467264-1.png" />

***

## Configure Your Integration

After connecting, configure these three settings before syncing.

### Attribution Model

Choose how credit is assigned to your ads for conversions:

* **First Touch -- Source Specific** (recommended): The first paid ad interaction gets full credit
* **Last Touch -- Source Specific**: The last paid ad interaction gets full credit

<Tip>
  First Touch works best for most advertisers since it identifies which ads initiate customer journeys.
</Tip>

### Attribution Window

Define how long after an ad interaction a conversion can be credited:

* **Lifetime (LTV)** (recommended)
* 1 day, 7 days, 14 days, 30 days, 60 days, or 90 days

Lifetime attribution gives you the most complete picture, especially for products with longer sales cycles.

### Timezone

Select the timezone that matches your Cometly Space settings. This ensures dates convert correctly when syncing.

<Warning>
  The timezone in AdStellar must match Cometly's Space timezone exactly, or data may be attributed to incorrect dates.
</Warning>

***

## Select Events to Sync

The Events to Sync section lets you choose which Cometly conversion events to bring into AdStellar.

Cometly tracks two types of events:

* **Standard events**: Purchase, Lead, Add to Cart, etc.
* **Custom events**: Events you've configured with custom names

To add an event, click it in the Available Events column to move it to Selected Events. To remove one, click the X next to it.

Only selected events will sync and become available as result metrics.

***

## Sync Your Data

After configuring settings and selecting events:

<Steps>
  <Step title="Start the sync">
    Click the **Sync** button on the Cometly integration card.
  </Step>

  <Step title="Wait for completion">
    The sync may take a few minutes depending on your data volume.
  </Step>

  <Step title="Confirm success">
    The Last Synced timestamp updates once finished.
  </Step>
</Steps>

***

## Use Cometly as Your Result Metric

Once synced, you can set Cometly events as the result metric for any campaign.

<Steps>
  <Step title="Open the Performance page">
    Go to the **Performance** page for a campaign.
  </Step>

  <Step title="Open result metric settings">
    Click **Configure Results** (or the result metric dropdown).
  </Step>

  <Step title="Select a Cometly event">
    Choose a Cometly event from the available metrics (e.g., Cometly Purchases).
  </Step>

  <Step title="Apply">
    Click **Update** to apply the new result metric.
  </Step>
</Steps>

A progress banner will appear while AdStellar backfills historical data. Once complete, the Results column shows your Cometly conversion data.

<img src="https://mintcdn.com/adstellarai/W3gnUVOO9KFygrmt/images/articles/13467264-2.png?fit=max&auto=format&n=W3gnUVOO9KFygrmt&q=85&s=94a6f60cb3b19d32e7678027af03fbf9" alt="" width="3562" height="1770" data-path="images/articles/13467264-2.png" />

<img src="https://mintcdn.com/adstellarai/W3gnUVOO9KFygrmt/images/articles/13467264-3.png?fit=max&auto=format&n=W3gnUVOO9KFygrmt&q=85&s=31e452998843415a53631126921a12b0" alt="" width="3510" height="1762" data-path="images/articles/13467264-3.png" />

***

## Automatic Sync Frequency

Cometly data syncs automatically **every hour** on every plan.

You can trigger a manual sync anytime from Settings > Integrations by clicking **Sync** on the Cometly card.

***

## Troubleshooting

**No events found when selecting events to sync**
Your Cometly account may not have conversion events yet, or data hasn't started flowing. Verify your Cometly setup and ensure ads are running with tracking enabled.

**Sync fails or shows an error**
Your API key may have expired or been revoked. Check it's still valid in Cometly, wait a few minutes, and try again.

**Cometly events not appearing in Configure Results**
Make sure you've selected events to sync in the integration settings and that the initial sync has completed.

**Result counts don't match Cometly dashboard**
Check that your attribution model, window, and timezone settings match between AdStellar and your Cometly Space.

**Data isn't updating**
Verify your subscription is active (paused subscriptions don't sync) and check your plan's sync frequency.

***

## Need Help?

Contact our support team at **[support@adstellar.ai](mailto:support@adstellar.ai)** or use the chat icon in the bottom right corner. Include your workspace name, any error messages, and screenshots of your settings.
