> For the complete documentation index, see [llms.txt](https://docs.moleculedata.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.moleculedata.com/tracking-ad-channels/tracking-chatgpt-ads.md).

# Tracking ChatGPT Ads

Connect ChatGPT Ads with an API key, add the Molecule Data UTM parameters to your ads, and manage status and budgets from the dashboard.

**COPY THIS UTM PARAMETERS STRING**

```
?utm_source=openai&utm_medium=paid&utm_campaign={campaign_id}&utm_content={ad_id}
```

Ads Manager replaces the values in curly brackets (`{campaign_id}`, `{ad_id}`) with the real campaign and ad IDs when someone clicks your ad. Copy the string exactly as it is, and don't replace them yourself.

**In OpenAI Ads Manager:**

1. Open the **ad you want to track** and edit its destination URL.
2. Paste your full website URL followed by the UTM parameters string.
3. Save your changes.

Repeat this for every new ad you create.

{% hint style="info" %}
If your website URL already contains a <mark style="color:red;">"?"</mark> sign, start the UTM parameters string with a "&" sign instead.

Instead of `?utm_source=`, use `&utm_source=`.
{% endhint %}

Example:

`https://yourwebsite.com?utm_source=openai&utm_medium=paid&utm_campaign={campaign_id}&utm_content={ad_id}`

## Connecting ChatGPT Ads

ChatGPT Ads connects with an **API key** that you create in OpenAI Ads Manager and paste into Molecule Data. There is no sign-in pop-up.

**Create the API key in Ads Manager:**

1. Open OpenAI Ads Manager at [ads.openai.com](https://ads.openai.com) and sign in.
2. In the left menu, go to **Settings → General**.
3. Scroll down to **API Keys** and click **Create New Key**.
4. Name the key `Molecule` so you can recognise it later.
5. **Copy the key right away** and keep it somewhere safe until you paste it in the next step.

{% hint style="info" %}
You need the **API Keys** section, not **Manage conversion keys**. Conversion keys are for sending purchases to OpenAI and are not used to connect Molecule Data.
{% endhint %}

**Then, connect it in Molecule Data:**

1. Go to **Integrations** and open the **ChatGPT Ads** tile, then click to add an account.
2. Paste the key into **API key** and click **Check key**.
3. Molecule Data shows the ad account the key opens, with its **currency** and **timezone**. Check it is the right account.
4. Click **Connect**.

If you see *"OpenAI did not accept this key"*, make sure you copied the whole key, or create a new one. If you see *"We couldn't reach OpenAI"*, the key may be fine: wait a moment and try again.

## Managing ChatGPT Ads from the dashboard

As with Meta and Google, you can manage ChatGPT Ads straight from the [Dashboard](/dashboards/dashboard.md) tables:

* **Turn campaigns, ad groups and ads on or off** with the switch on each row.
* **Change a campaign's budget** with the pencil next to it. ChatGPT Ads sets budgets on **campaigns** only, either per day (**/day**) or for the campaign's whole run (**/lifetime**). Ad groups and ads have no budget of their own, so their rows show none.

Every change is written to your ChatGPT Ads account straight away and shows up in OpenAI Ads Manager. Molecule Data reports a change as done only once OpenAI confirms it. If you switch the same item off and on again within a few seconds, you may see *"ChatGPT Ads is still applying the last change"*: wait a few seconds and try again.

{% hint style="warning" %}
Molecule Data reads your reporting data, and changes your ChatGPT Ads account only when someone on your team uses the switch or the budget pencil in Molecule Data. OpenAI keys currently give full access to the ad account, so treat the key like a password. You can revoke it at any time under **Settings → General → API Keys**; Molecule Data then stops importing ChatGPT Ads data, and can no longer change anything, until you connect a new key.
{% endhint %}
