> For the complete documentation index, see [llms.txt](https://docs.hockeystack.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hockeystack.com/integrations/datasyncs/configure-a-datasync-export/spend-data-export-schema.md).

# Spend Data Export Schema

This export contains your daily paid ad spend records from HockeyStack, including spend from connected ad platforms and any custom spend you've imported through a [Sync Spend import](https://docs.hockeystack.com/integrations/datasyncs/configure-a-datasync-import/setting-up-your-data-for-import/import-sync-spend). Records are exported individually (one row per record, per day) rather than aggregated by campaign.

#### Schema

| Column Name     | Description                                                                                       |
| --------------- | ------------------------------------------------------------------------------------------------- |
| `date`          | The date the spend occurred                                                                       |
| `unique_id`     | A unique identifier for each record, used for deduplication and upserts in warehouse destinations |
| `network`       | The ad network the spend came from (e.g. Google Ads, LinkedIn Ads, Meta Ads)                      |
| `account_id`    | Ad account identifier from the ad network                                                         |
| `campaign_id`   | Campaign identifier from the ad network                                                           |
| `campaign_name` | Campaign name                                                                                     |
| `adgroup_id`    | Ad group / ad set identifier (if it applies to the row of data)                                   |
| `adgroup_name`  | Ad group / ad set name (if it applies to the row of data)                                         |
| `ad_id`         | Ad identifier (if it applies to the row of data)                                                  |
| `ad_name`       | Ad name (if it applies to the row of data)                                                        |
| `cost`          | Spend amount for the record, as stored in HockeyStack                                             |
| `impressions`   | Number of impressions                                                                             |
| `clicks`        | Number of clicks                                                                                  |
| `currency`      | Currency of the `cost` value                                                                      |
| `utm_source`    | UTM source associated with the record                                                             |
| `utm_medium`    | UTM medium associated with the record                                                             |
| `utm_campaign`  | UTM campaign associated with the record                                                           |
| `utm_term`      | UTM term associated with the record                                                               |
| `utm_content`   | UTM content associated with the record                                                            |
| `keyword`       | Search keyword (if it applies to the row of data)                                                 |

{% hint style="info" %}
`cost` is exported in its original `currency` with no currency conversion. Attribution metrics (e.g. influenced pipeline, ROI) are not included in this export.
{% endhint %}

#### Sync behavior

* **Initial sync:** Starts from the start date configured on the export. If no start date is set, it begins at the earliest available spend date within the last two years.
* **Ongoing syncs:** Each run picks up from the last exported date and includes today's data.
* **Historical corrections:** Incremental runs do not revisit all previous dates, so changes to older spend (e.g. late adjustments from an ad network or an updated custom spend import) won't flow through automatically. To rebuild the destination data, request a full re-sync.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hockeystack.com/integrations/datasyncs/configure-a-datasync-export/spend-data-export-schema.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
