> 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/ad-platforms/capterra-ads.md).

# Capterra Ads

HockeyStack's Capterra Ads integration pulls your campaign data into HockeyStack and connects it with your marketing, revenue, and product data. This allows you to track through your ad spend and ad insight data.

## How to Connect <a href="#block-da3d5c332882485d94a4f152df3687a8" id="block-da3d5c332882485d94a4f152df3687a8"></a>

1. Click the "**Connect**" button next to the Capterra logo in your Atlas > Ads.

<figure><img src="https://images.spr.so/cdn-cgi/imagedelivery/j42No7y-dcokJuNgXeA0ig/9f57afcc-f399-4e3a-9bb0-fc03af160b72/Untitled/w=3840,quality=90,fit=scale-down" alt=""><figcaption></figcaption></figure>

2. In order to proceed you need to submit your Capterra API key.

<figure><img src="https://images.spr.so/cdn-cgi/imagedelivery/j42No7y-dcokJuNgXeA0ig/98e942a2-9348-4406-83d4-14eb23ec13de/Untitled/w=3840,quality=90,fit=scale-down" alt=""><figcaption></figcaption></figure>

3. In order to get an API key from Capterra, you need to go through Capterra’s helpdesk/account manager. You can find their contact information by signing in to [your Capterra account](https://www.capterra.com/vp/login) and clicking on **"Account Settings".** Their contact details are located in the grey box to the right.

<figure><img src="https://images.spr.so/cdn-cgi/imagedelivery/j42No7y-dcokJuNgXeA0ig/8f3f1295-be20-4f27-a9ad-3ff7f6c7b8fb/Screen_Shot_2022-06-20_at_01.03.49/w=3840,quality=90,fit=scale-down" alt=""><figcaption></figcaption></figure>

<figure><img src="https://images.spr.so/cdn-cgi/imagedelivery/j42No7y-dcokJuNgXeA0ig/cfb38a09-153d-423c-bc26-d3d966b9a5b7/Untitled/w=3840,quality=90,fit=scale-down" alt=""><figcaption></figcaption></figure>

4. Once you've received the API key, paste it and Click **"Connect".** You are all set!

## What gets tracked as Metadata

| **Field Name**      | **Description**                                                                                                         |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `account_id_hashed` | A hashed representation of the API key for account identification.                                                      |
| `type`              | The type of activity, fixed as `'paid-ads'`.                                                                            |
| `date`              | The date of the report, based on `date_of_report`.                                                                      |
| `id`                | A unique ID generated by concatenating and hashing the channel, date, country, category, vendor name, and product name. |
| `network`           | The advertising network, set as `'Capterra Ads'`.                                                                       |
| `country`           | The lowercase 2-letter country code, derived from the `country` field using a lookup in `countryCodes`.                 |
| `utm_source`        | The UTM source, derived by formatting the `channel` (e.g., `'Capterra'` → `'capterra'`).                                |
| `utm_campaign`      | The UTM campaign, derived by taking the `category` field and replacing spaces with underscores.                         |
| `utm_medium`        | The UTM medium, set to `'cpc'`.                                                                                         |
| `avg_position`      | The average ad position (`avg_position`).                                                                               |
| `conversions`       | The number of conversions recorded.                                                                                     |
| `clicks`            | The number of clicks recorded.                                                                                          |
| `cost`              | The total cost of the clicks.                                                                                           |

***

### High-Level Flow of the Integration

1. **Data Retrieval**
   * The integration makes a GET request to the Capterra Ads API endpoint (`https://public-api.capterra.com/v1/clicks`) using the provided `apiKey`.
   * A `scroll_id` is used for paginated retrieval; if one is returned by the API, additional requests are made until no further `scroll_id` is provided.
2. **Date Filtering**
   * The system calculates a `startMoment` based on the account’s `lastPulledDate`, going back 5 days to ensure data freshness.
3. **Completing the Process**
   * Once all records are inserted, the account’s `lastPulledDate` is updated to the current date, and the integration process concludes.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.hockeystack.com/integrations/ad-platforms/capterra-ads.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
