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

# debug_data_flow

> Trace why a specific event isn't appearing — composes conversion counts + recent webhook activity + integration freshness.

Composes data from the conversions table + recent webhook logs + integration freshness so the agent can answer "why didn't I see `purchase` events this weekend?".

## When to use

* "No purchase events from Shopify in the last 7 days — what's wrong?"
* "Why is my Facebook spend missing for last Tuesday?"

For overall tracking health, use [`get_space_health`](/mcp/tools/get-space-health). For a specific page's pixel check, use [`inspect_site`](/mcp/tools/inspect-site) + [`verify_pixel_events`](/mcp/tools/verify-pixel-events).

## Parameters

| Parameter    | Type   | Required | Description                                  |
| ------------ | ------ | -------- | -------------------------------------------- |
| `event_name` | string | Yes      | The event to trace.                          |
| `start_date` | string | Yes      | `YYYY-MM-DD HH:MM:SS` in the space timezone. |
| `end_date`   | string | Yes      | `YYYY-MM-DD HH:MM:SS` in the space timezone. |
| `source`     | string | No       | Narrow to one integration / source slug.     |
| `format`     | string | No       | `json` (default), `csv`, or `yaml`.          |

## Output

```json theme={null}
{
  "event_name": "purchase",
  "range": {
    "start_utc": "2026-05-08T04:00:00Z",
    "end_utc":   "2026-05-15T03:59:59Z"
  },
  "conversion_count": 0,
  "recent_webhooks": [
    { "id": 78421, "source": "shopify", "status": "success", "created_at": "2026-05-09T10:12:00Z" }
  ]
}
```

`recent_webhooks` carries the last 10 webhook receipts on the source over the requested window — use them as triage signals. For full per-fire detail (including PII-redacted payloads), follow up with [`get_webhook_event`](/mcp/tools/get-webhook-event).

`# hint:` footer surfaces the most likely root cause first ("Webhooks fired but no conversions recorded — possible event mapping issue.").
