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

# Backfill missing events with Google Sheets and Zapier

> Backfill missing events in Cometly from a Google Sheet through Zapier, so each lead or sale shows in your reports at the time it really happened.

Purchases, leads or other events that happened in your payment processor or CRM do not appear in Cometly. An event is an action Cometly tracks, such as a form submission or a purchase. When some are missing, your reports show fewer conversions and less revenue than you really had.

The usual cause is a setup error: for a period of time, the events were never sent to Cometly, so there is nothing for it to report. You can backfill missing events in Cometly: compile the data in a Google Sheet and send it to Cometly with a Zapier automation. Your reporting then reflects the complete picture, with each event stamped at the correct historical time.

## When to use this

* You have purchase, lead or other events that were not captured.
* You need to send historical events to Cometly with accurate timestamps.
* You exported data from another platform and need to push it into Cometly.

## How to backfill missing events in Cometly

1. **Export** your missing data into a Google Sheet with the required fields.
2. **Create a Zap** that triggers on new rows added to the sheet.
3. **Map fields** from your sheet to Cometly, including the historical Event Time.
4. **Add rows** to the sheet to send each event to Cometly.

## Step 1: Prepare your Google Sheet

Create a new Google Sheet with **two tabs**.

### Tab 1: "All Data"

This is your **staging tab**. Compile all of your missing event data here first. Do NOT connect this tab to Zapier.

Export the missing transactions or events from your payment processor or platform:

* **Stripe**: go to Payments > Export and filter by date range.
* **ClickFunnels**: go to Orders/Transactions and export.
* **Other platforms**: export from your CRM, payment provider or order management system.

Cross-reference this export against your Cometly Events Log (**Events Manager**, then the **Events Log** tab) to identify which events are missing, then add only those to the "All Data" tab. See [Using the Events Log](https://docs.cometly.com/support/troubleshooting/general/event-log.md).

Organize the data with the following columns:

| Column | Required? | Description | Example |
| - | - | - | - |
| **Email** | Required | The customer's email address | `john@example.com` |
| **Event Time** | Required | The date and time the event originally happened (ISO 8601 or a standard date format) | `2026-02-15T14:30:00Z` or `2/15/2026 2:30 PM` |
| **Amount** | Recommended for purchase events | The purchase or transaction amount (numeric, no currency symbols) | `47.00` |
| **First Name** | Optional | Customer's first name | `John` |
| **Last Name** | Optional | Customer's last name | `Smith` |
| **Phone Number** | Optional | Customer's phone number | `+15551234567` |
| **Order ID** | Optional | Unique transaction or order identifier (helps prevent deduplication issues) | `ord_12345` |

Notes on Event Time:

* Use a consistent date and time format across all rows.
* This is the time the event **actually happened**, not the time you add it to the sheet.

### Tab 2: "Send to Cometly"

This is your **live tab**, the one Zapier watches. Create it with the **exact same column headers** as your "All Data" tab.

**Do not paste any data into this tab yet.** You do that after everything is configured and tested.

> [!NOTE]
>
> **Why two tabs?**
>
> The **"All Data"** tab is your source of truth where you organize and review everything. The **"Send to Cometly"** tab is what Zapier monitors. Every time a new row appears in this tab, it triggers a Zap that sends the event to Cometly. Keeping them separate lets you control exactly when events get sent and avoids firing events before you are ready.

## Step 2: Connect Cometly to Zapier (if not already connected)

1. In Cometly, click [**Integrations**](https://app.cometly.com/integrations) in the sidebar.
2. Find the **Zapier** card (category **Webhooks & API**) and open it.
3. If Zapier is not active yet, click **Activate Zapier**.
4. Under **Manage API tokens**, enter a **Token Name**, click **Create Token** and copy the token. You need it in Zapier.

For the full walkthrough, see [Zapier](https://docs.cometly.com/integrations/zapier.md).

## Step 3: Create your Zap

### Set up the trigger (Google Sheets)

1. Go to [zapier.com](https://zapier.com/) and click **Create Zap**.
2. For the **Trigger App**, search for and select **Google Sheets**.
3. For the trigger event, select **New or Updated Spreadsheet Row**.
4. Connect your Google account and select:
   * The **Spreadsheet** you created in step 1
   * The **Worksheet**: select **"Send to Cometly"** (your live tab, NOT the "All Data" tab)
5. Add **one test row** to the "Send to Cometly" tab so Zapier can detect your columns.
6. Click **Test Trigger** to pull in the sample row.

### Set up the action (Cometly)

1. Click **Add Step** (the `+` button).
2. Search for **Cometly** and select it.
3. For the action event, select **Send Event**.
4. Connect your Cometly account by pasting the **API token** you copied in step 2.
5. Configure the action fields:
   * **Event Type**: select the appropriate event (for example `Purchase`, `Lead` or your custom event name)

## Step 4: Map your fields

This is the most important step. You map each column from your Google Sheet to the corresponding Cometly field.

### Required fields

| Cometly field | Map to |
| - | - |
| **Email** | Select your **Email** column from the Google Sheet |
| **Event Time** | Select your **Event Time** column from the Google Sheet |

> [!WARNING]
>
> **Critical for backfilling:** for Event Time, do NOT select "The time we receive the event". Map it to the Event Time column in your Google Sheet instead. This is what makes your backfilled events appear at the correct historical date and time in Cometly's reporting.

### Recommended fields

Click **+ Add Field** to map additional data:

| Cometly field | Map to |
| - | - |
| **Amount** | Your **Amount** column (for purchase events) |
| **First Name** | Your **First Name** column |
| **Last Name** | Your **Last Name** column |
| **Phone Number** | Your **Phone Number** column |

Click **Continue** after mapping all fields.

## Step 5: Test your Zap

1. Click **Test Step** to send your sample row to Cometly.
2. Verify that the event arrived in Cometly:
   * Go to [**Events Manager**](https://app.cometly.com/space/events-manager) and click the **Events Log** tab.
   * Confirm the event shows the correct **email**, **amount** and **event time**.
3. If everything looks correct, click **Publish** to activate the Zap.

## Step 6: Backfill your data

Now that your Zap is live and verified, send the rest of your data.

1. Go to your **"All Data"** tab.
2. Copy a batch of rows (50 to 100 at a time is recommended).
3. Paste them into the **"Send to Cometly"** tab.
4. Each new row triggers the Zap and sends the event to Cometly.
5. Check the **Events Log** tab in [**Events Manager**](https://app.cometly.com/space/events-manager) to confirm events are flowing in correctly.
6. Repeat with the next batch until all data has been sent.

### Tips

* **Work in batches.** Paste 50 to 100 rows at a time rather than all at once. This prevents rate limiting and makes it easy to catch issues early.
* **Don't re-paste rows.** Rows that were already added to the "Send to Cometly" tab have already been processed. Adding them again creates duplicate events.
* **Check as you go.** After each batch, spot-check a few events in the Events Log to make sure everything looks right before continuing.

## Troubleshooting

| Issue | Solution |
| - | - |
| **Events show today's date instead of the historical date** | You likely selected "The time we receive the event" instead of mapping the Event Time column. Edit the Zap and re-map the Event Time field to your sheet column. |
| **Events not appearing in Cometly** | Check your Events Log. Verify the Zap is turned on and your API token is correct. |
| **Duplicate events** | Use a unique Order ID in your sheet. Avoid re-adding rows that were already processed. |
| **Amount showing incorrectly** | Make sure amounts are numeric values only (no `$` signs or currency codes). |
| **Event Time format errors** | Use ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Avoid ambiguous formats like `3/4/2026` (is that March 4 or April 3?). |

## Confirm the backfill worked

Open [**Events Manager**](https://app.cometly.com/space/events-manager) and click the **Events Log** tab. Each row you pasted into the "Send to Cometly" tab appears there as an event, with **SUCCESS** in the **Details** column. Open a few events and confirm the **event time** is the historical time from your sheet, not today's date.

The key is mapping the **Event Time column from your sheet** (not "the time we receive the event") so that your reporting reflects when events actually occurred.

If you need help identifying which events are missing, compare your platform's transaction export against your Cometly Events Log.

## Frequently asked questions

### Will backfilled events be attributed to the ads that produced them?

Cometly matches each backfilled event to a visitor by the email address you send, then ties it to the ad or channel that brought that visitor. It cannot attribute a conversion to an ad click that happened before the Cometly pixel (the tracking script on your site) was installed.

### How long do backfilled events take to show up in Cometly reports?

An event shows in the Events Log within 60 seconds of being sent. It can take up to 15 minutes to appear in the reporting areas, such as the Report Builder or Ads Manager.

### Can I backfill events into Cometly without Zapier?

Yes. The Cometly API accepts an `event_time` on each event, in ISO 8601 format or as a Unix timestamp in seconds, so a developer can send historical events directly. See [Create event](https://docs.cometly.com/api-reference/endpoint/create-event.md).

## Next steps

* [Use the Events Log to verify each event](https://docs.cometly.com/support/troubleshooting/general/event-log.md)
* [Send events to Cometly with Zapier](https://docs.cometly.com/integrations/zapier.md)
* [Edit or delete a conversion to fix a duplicate or a wrong amount](https://docs.cometly.com/guides/events/edit-or-delete-conversions.md)
* [Understand the data maturing period](https://docs.cometly.com/guides/analyzing-data/data-maturing.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.