> For the complete documentation index, see [llms.txt](https://docs.adpage.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.adpage.io/integrations-marketingtools/pinterest-ads.md).

# Pinterest Ads

In this guide, we’ll show you, step by step, how to set up tracking in your Google Tag Manager server container to send events to the Pinterest API.&#x20;

{% hint style="warning" %}
**This article covers a server-side only setup.** You can also run Pinterest Ads **client-side and server-side at the same time**, with event deduplication based on a shared event ID. We describe that setup in [Setting up client-side TikTok Ads tracking with deduplication](/integrations-marketingtools/tiktok-ads/setting-up-client-side-tiktok-ads-tracking-with-deduplication.md).
{% endhint %}

### Before you start

Make sure you have:

* [ ] A working GTM server container that receives events (through your Google Tag & GA4 client).
* [ ] Your **Pinterest Advertiser ID** and **API Access Token**. See [How to find your Pinterest Advertiser ID and Access Token](/integrations-marketingtools/pinterest-ads/where-to-find-the-pinterest-tag-id-advertiser-id-and-api-token.md).

### Step 1: Setting up the Pinterest parameter in the web container

Let's ensure that the needed epik-cookie for Pinterest attribution will be sent towards the server container with every GA4 event request.

{% hint style="warning" %}
If you don't load a Pinterest Tag on your website (no Pinterest Pixel/Tag), Pinterest won't automatically set the `_epik` cookie. If you'd rather not load this tag in the GTM web container, you can also create a Custom JavaScript variable that reads the epik value from the URL query.
{% endhint %}

1. Open your GTM web container and open your **Google Tag**.
2. Add a new parameter.
3. Name this parameter `epik_click_id`.
4. For the value, create a new variable using the lego block icon behind the input field.
5. As the variable configuration, choose **1st Party Cookie** and enter `_epik` as the **Cookie Name**.
6. Save the variable.

<figure><img src="https://1274044937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA65KwL1NwewlJbtCXsXd%2Fuploads%2FhFNw6mjH7MHS0zIfbSwZ%2Fimage.png?alt=media&amp;token=e8d82a7b-b461-441e-8e21-08587f12f21e" alt=""><figcaption></figcaption></figure>

7. Save the Google Tag.

<figure><img src="https://1274044937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA65KwL1NwewlJbtCXsXd%2Fuploads%2F9aFG9aT7WB7vHd52Xywn%2Fimage.png?alt=media&amp;token=43c3e72f-c5fa-493a-8210-57a73bb65480" alt=""><figcaption></figcaption></figure>

### Step 2: Setting up the Pinterest tag in the server container

Now that the Pinterest Click ID is being sent from the client-side container to the server container, we can configure the Pinterest Conversions API tag to forward the right GA4 events including the Click ID.

1. Make sure your Pinterest Advertiser ID and API Token are stored in two constant variables inside your GTM server container. Follow these steps to find your Advertiser ID and Token.
2. Open your GTM server container and go to **Templates**.
3. Under **Tag Templates**, search the gallery for the **Pinterest API for Conversions** tag template and add it to your workspace.

<figure><img src="https://1274044937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA65KwL1NwewlJbtCXsXd%2Fuploads%2Fyvs1YbGf2scPd80RDh7V%2Fimage.png?alt=media&amp;token=199c0d10-565d-4257-adff-f92039e665bd" alt=""><figcaption></figcaption></figure>

4. In your GTM server container, go to **Tags** and create a new tag.
5. As the tag configuration, select the Pinterest tag template.
6. In the **Advertiser ID** field, enter your Advertiser ID variable. In the **API Access Token** field, enter your API Token variable.

<figure><img src="https://1274044937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA65KwL1NwewlJbtCXsXd%2Fuploads%2FyRB6p1dACH2bCUPCpzf1%2Fimage.png?alt=media&amp;token=6cf9f19c-425e-4cda-a2ee-15216684e102" alt=""><figcaption></figcaption></figure>

7. As **Event Name**, choose **Inherit from client**. Use **Override from client** if you want to use different names than the standard GA4 event names.
8. Tick the **Override client data** option and expand **User Data**.
9. Add a new parameter here. Select **Click Id** as the parameter name. For the parameter value, add a new variable using the lego block button.
10. Create a new variable using the blue plus icon in the top right. As the variable configuration, choose **Event Data**. As the **Key Path**, enter `epik_click_id`.
11. Save this variable.

<figure><img src="https://1274044937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA65KwL1NwewlJbtCXsXd%2Fuploads%2FWBzzZ0qUABRGNdhMzGGx%2Fimage.png?alt=media&amp;token=75910a84-557a-440a-94bf-f99a65a205c2" alt=""><figcaption></figcaption></figure>

7. If you want, you can override more User Data or Event Data here. For example, your visitor's email address via User Data, or the `event_id` of each event via Event Data.
8. Click **Triggering** below the tag configuration. Add a trigger that fires on every incoming GA4 event you want to send towards the Pinterest Conversion API.&#x20;
9. Save the tag.
10. Use the server container preview mode to test whether the Pinterest Conversions API tag fires on incoming events.


---

# 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.adpage.io/integrations-marketingtools/pinterest-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.
