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

# How to connect

> How to connect the ChatGPT Ads data source to Adriel: create an API key in OpenAI Ads Manager, enter it, and choose the ad account and attribution settings.

ChatGPT Ads is OpenAI's advertising platform for placing ads in ChatGPT, managed through OpenAI Ads Manager. Connecting it brings the ad account, campaigns, ad groups, and ads into Adriel dashboards alongside impressions, clicks, spend, and attributed conversions.

## Before you connect

The following are required:

* Access to the ad account in [OpenAI Ads Manager](https://ads.openai.com).
* A role on that ad account that can create API keys, such as **Admin**. The **Viewer** role can view advertising resources but has no write or account-administration permissions ([OpenAI Help Center](https://help.openai.com/en/articles/20001273-managing-identity-and-access-for-ads-manager)). Without a suitable role, ask an ad account admin to create the key.
* One API key per ad account. Each Ads API key is scoped to a single ad account ([OpenAI Ads API authentication](https://developers.openai.com/ads/api-reference/authentication)), so connecting several ad accounts takes one key for each.

## Connect ChatGPT Ads

**1. Create an API key in OpenAI Ads Manager**

API keys are issued from the Settings tab of Ads Manager ([OpenAI Ads API quickstart](https://developers.openai.com/ads/api-quickstart)). Sign in to [OpenAI Ads Manager](https://ads.openai.com) and select the ad account to connect. Go to **Settings** → **General**, and under **API Keys** click **Create New Key**. Give the key a recognizable name, such as `Adriel`, then copy it. Treat the key like a password and paste it only into the Adriel connection form.

**2. Open the ChatGPT Ads data source**

On the **Data Sources** page, search for **ChatGPT Ads** and select it. Click **New connection**. If the API key for this ad account was already added, select it from the list and go straight to configuring the data source.

**3. Enter the API key**

Under **Connection settings**, paste the key into **API Key**, then click **Submit**.

**4. Configure the data source**

Under **Data source settings**, fill in the following fields:

* **Account**: select the ad account linked to the key. Because each key covers one ad account, only one account is listed.
* **Click attribution windows**: select one or more of **7 days**, **14 days**, and **30 days**. The default is 30 days.
* **Attribution time basis**: select **Ad event time**, **Conversion time**, or both. The default is Ad event time.

Each selected combination of click window and time basis adds its own set of conversion metrics to the data source. Select only the combinations that dashboards will report on. See [Attribution windows](https://docs.adriel.com/data-sources/a-f/chatgpt-ads/data-reference.md#attribution-windows) for how the settings map to metrics.

**5. Add to teamspaces and submit**

In **Add to teamspaces**, choose the teamspaces that should use this data source, then click **Submit**. The connection is complete when the data source shows the **Active** status.

## What gets imported

The connector imports the ChatGPT Ads hierarchy (ad account → campaign → ad group → ad), with ad groups shown as ad sets in Adriel. Delivery metrics cover impressions, clicks, and spend, and setup fields cover names, IDs, status, objective, schedule, budgets, bid strategy, and creative details. Conversions and conversion value are imported for each attribution setting chosen during connection, and Adriel computes CTR, CPC, CPM, CPA, CVR, and ROAS from them. Currency and timezone follow the ad account's settings.

For the complete list of metrics, breakdowns, refresh cadence, and limits, see the [ChatGPT Ads data reference](https://docs.adriel.com/data-sources/a-f/chatgpt-ads/data-reference.md).

## Troubleshooting

> [accordion] The credentials for this data source are no longer valid
>
> The API key is no longer valid or was only partly copied. Copy the full key again, or create a new key in OpenAI Ads Manager, then reconnect the data source with it.

> [accordion] The API key can't be created in Ads Manager
>
> The signed-in user's role on the ad account doesn't allow creating API keys. Ask an ad account admin to grant a suitable role or to create the key.

> [accordion] The ad account to connect is not in the Account list
>
> The selected API key belongs to a different ad account. Each key covers only the ad account it was created in. Create a key in the ad account to connect, and add it through **New connection**.

> [accordion] Conversions are empty when broken down by country
>
> Adriel's ChatGPT Ads data source does not import country-level conversions. The Country breakdown returns impressions, clicks, and spend only. Report conversions by campaign, ad set, ad, or date instead.

## Related

> [card] [ChatGPT Ads data reference](https://docs.adriel.com/data-sources/a-f/chatgpt-ads/data-reference.md)
>
> Metrics, breakdowns, attribution windows, and limits for ChatGPT Ads.

> [card] [ChatGPT Ads FAQs](https://docs.adriel.com/data-sources/a-f/chatgpt-ads/faqs.md)
>
> Common questions and expected behaviors for the ChatGPT Ads data source.

> [card] [ChatGPT Ads release notes](https://docs.adriel.com/data-sources/a-f/chatgpt-ads/release-notes.md)
>
> Recent updates and metric changes for the ChatGPT Ads data source.

> [card] [How to connect StackAdapt](https://docs.adriel.com/data-sources/o-z/stackadapt/how-to-connect.md)
>
> Report on ChatGPT Ads bought through StackAdapt.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.