# Pinterest

[Pinterest](https://www.pinterest.com) is an image sharing and social media service designed to enable saving and discovery of information on the internet using images, animated GIFs and videos, in the form of pinboards.\
Using this destination, you can leverage [Pinterest API](https://developers.pinterest.com/docs/conversions/conversion-management/#Tracking%20conversions%20with%20the%20Pinterest%20API) to send events via server-side hits. More technical details are available following this [LINK](https://developers.pinterest.com/docs/api/v5/#tag/conversion_events).

## Key features

The Pinterest destination provides the following key features:

* **Events structure**: our [Events reference](https://community.commandersact.com/platform-x/developers/tracking/events-reference) model covers Pinterest's events, meaning that your data is properly bridged to the expected fields in an optimized way.
* **Prebuilt mappings**: data mapping for event-based destinations happens automatically, which simplifies user inputs.
* **Automatic hashing**: information is automatically hashed matching partner specifications.
* **Smart mapping**: data mapping can be readjusted using your datalayer defined fields.
* **Support for multi-item data**: information included in the [item](https://community.commandersact.com/platform-x/developers/tracking/events-reference#item) array is dispatched to Pinterest.

## Destination setup

{% hint style="info" %}
Ensure you have access to a [Pinterest Ads account](https://ads.pinterest.com) before configuring this destination.
{% endhint %}

### Configuration

<table><thead><tr><th width="307">Settings</th><th>Description</th></tr></thead><tbody><tr><td><code>Advertiser ID</code></td><td><em><strong><code>Required</code></strong></em><br>Pinterest Advertiser ID. More details are available following this <a href="https://developers.pinterest.com/docs/conversions/3rd-party-api-integrations/#Getting%20your%20Access%20Token%20and%20Advertiser%20ID">LINK</a>.</td></tr><tr><td><code>API Access Token</code></td><td><em><strong><code>Required</code></strong></em><br>The Pinterest Conversions API needs an access token to authenticate your activities. More details are available following this <a href="https://developers.pinterest.com/docs/conversions/3rd-party-api-integrations/#Getting%20your%20Access%20Token%20and%20Advertiser%20ID">LINK</a>.</td></tr><tr><td><code>Click Id Cookie Name</code></td><td>Cookie name holding the Pinterest "Click Id" that uniquely identifies a click. This is highly recommend on checkout events at least. It may improve reporting performance such as ROAS/CPA. Default cookie name: <code>_epik</code>. More details are available by following this <a href="https://developers.pinterest.com/docs/conversions/3rd-party-api-integrations/#Pinterest%20API%20for%20Conversions%20Event%20Parameters">LINK</a>.</td></tr><tr><td><code>Send as a test-request</code></td><td>If checked, the event will not be recorded in Pinterest Ads, but the API will still return the same response messages. Use this mode to verify your requests and if your events are constructed correctly. More details are available following this <a href="https://developers.pinterest.com/docs/conversions/conversion-management/#Testing%20your%20request">LINK</a>.</td></tr></tbody></table>

## Quick reference

| Commanders Act Events                                                                                                                                                                                                                                                                                                                                                                                                   | Pinterest Events |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
| <p><code>page\_view</code></p><p><code>view\_item</code></p>                                                                                                                                                                                                                                                                                                                                                            | `page_visit`     |
| <p><code>purchase</code></p><p><code>buy</code></p><p><code>pay</code></p><p><code>payment</code></p>                                                                                                                                                                                                                                                                                                                   | `checkout`       |
| <p><code>add\_to\_cart</code></p><p><code>addtocart</code></p>                                                                                                                                                                                                                                                                                                                                                          | `add_to_cart`    |
| <p><code>search</code></p><p><code>find\_location</code></p>                                                                                                                                                                                                                                                                                                                                                            | `search`         |
| <p><code>generate\_lead</code></p><p><code>submit\_application</code></p><p><code>contact</code></p>                                                                                                                                                                                                                                                                                                                    | `lead`           |
| <p><code>sign\_up</code><br><code>signup</code></p><p><code>completeregistration</code></p>                                                                                                                                                                                                                                                                                                                             | `signup`         |
| <p><code>view\_item\_list</code></p><p><code>viewcategory</code></p><p><code>viewcontent</code></p>                                                                                                                                                                                                                                                                                                                     | `view_category`  |
| <p><code>watch\_video</code></p><p><code>watchvideo</code></p>                                                                                                                                                                                                                                                                                                                                                          | `watch_video`    |
| <p><code>add\_payment\_info</code></p><p><code>add\_shipping\_info</code></p><p><code>add\_to\_wishlist</code></p><p><code>begin\_checkout</code></p><p><code>login</code></p><p><code>refund</code></p><p><code>remove\_from\_cart</code></p><p><code>select\_content</code></p><p><code>select\_item</code></p><p><code>view\_cart</code></p><p><code>select\_promotion</code></p><p><code>view\_promotion</code></p> | `custom`         |

## Field mappings

{% hint style="info" %}
Properties can be remapped using our [Smart Mapping](https://doc.commandersact.com/features/destinations/advanced-mapping#smart-mapping) feature.\
At least one of the following statement must be fulfilled:\
• <mark style="color:blue;">`user_data.em`</mark> is set.\
• <mark style="color:blue;">`user_data.hashed_maids`</mark> is set.\
• <mark style="color:blue;">`user_data.client_ip_address`</mark> and <mark style="color:blue;">`user_data.client_user_agent`</mark> are set.\
The property <mark style="color:blue;">`event_id`</mark> is required and used for deduplication. More information are available following this [LINK](https://developers.pinterest.com/docs/conversions/conversions/) (See section "How deduplication works").
{% endhint %}

<table><thead><tr><th width="382.6685580062746">Commanders Act Properties</th><th>Pinterest Properties</th></tr></thead><tbody><tr><td><code>partners.pinterest.event_id</code></td><td><code>event_id</code> <strong>[*]</strong></td></tr><tr><td><code>partners.pinterest.action_source</code></td><td><code>action_source</code> <strong>[1]</strong></td></tr><tr><td><code>context.event_timestamp</code></td><td><code>event_time</code></td></tr><tr><td><code>context.page.url</code></td><td><code>event_source_url</code> <strong>[2]</strong></td></tr><tr><td><code>partners.pinterest.opt_out</code></td><td><code>opt_out</code> <strong>[3]</strong></td></tr><tr><td><code>context.app.namespace</code></td><td><code>app_id</code></td></tr><tr><td><code>context.app.name</code></td><td><code>app_name</code></td></tr><tr><td><code>context.app.version</code></td><td><code>app_version</code></td></tr><tr><td><code>context.device.manufacturer</code></td><td><code>device_brand</code></td></tr><tr><td><code>context.device.network.carrier</code></td><td><code>device_carrier</code></td></tr><tr><td><code>context.device.model</code></td><td><code>device_model</code></td></tr><tr><td><code>context.device.type</code></td><td><code>device_type</code></td></tr><tr><td><code>context.device.os.version</code></td><td><code>os_version</code></td></tr><tr><td><code>context.device.network.wifi</code></td><td><code>wifi</code> <strong>[3]</strong></td></tr><tr><td><code>context.device.lang</code></td><td><code>language</code></td></tr><tr><td><code>user.email_sha256</code></td><td><code>user_data.em</code> <strong>[4]</strong></td></tr><tr><td><code>user.phone</code></td><td><code>user_data.ph</code> <strong>[4]</strong></td></tr><tr><td><code>user.gender</code></td><td><code>user_data.ge</code> <strong>[4]</strong></td></tr><tr><td><code>user.birthdate</code></td><td><code>user_data.db</code> <strong>[4]</strong></td></tr><tr><td><code>user.lastname</code></td><td><code>user_data.ln</code> <strong>[4]</strong></td></tr><tr><td><code>user.firstname</code></td><td><code>user_data.fn</code> <strong>[4]</strong></td></tr><tr><td><code>user.city</code></td><td><code>user_data.ct</code> <strong>[4]</strong></td></tr><tr><td><code>user.state_short</code></td><td><code>user_data.st</code> <strong>[4]</strong></td></tr><tr><td><code>user.zipcode</code></td><td><code>user_data.zp</code> <strong>[4]</strong></td></tr><tr><td><code>user.country</code></td><td><code>user_data.country</code> <strong>[4]</strong></td></tr><tr><td><code>user.id</code></td><td><code>user_data.external_id</code> <strong>[4]</strong></td></tr><tr><td><code>context.device.advertising_id</code></td><td><code>user_data.hashed_maids</code> <strong>[4]</strong></td></tr><tr><td><code>context.device.ip</code></td><td><code>user_data.client_ip_address</code></td></tr><tr><td><code>context.device.user_agent</code></td><td><code>user_data.client_user_agent</code></td></tr><tr><td><p><code>partners.pinterest.click_id</code><br><code>(context.page.url)</code></p><p><code>Click Id Cookie Name</code></p></td><td><code>user_data.click_id</code> <strong>[5]</strong></td></tr><tr><td><code>id</code></td><td><code>custom_data.order_id</code></td></tr><tr><td><code>currency</code></td><td><code>custom_data.currency</code></td></tr><tr><td><code>value</code></td><td><code>custom_data.value</code></td></tr><tr><td><code>items.X.id</code></td><td><code>custom_data.content_ids</code> <strong>[6]</strong></td></tr><tr><td><code>items.X.product.price</code></td><td><code>custom_data.contents.X.item_price</code></td></tr><tr><td><code>items.X.quantity</code></td><td><code>custom_data.contents.X.quantity</code></td></tr><tr><td><code>items.length</code></td><td><code>custom_data.num_items</code></td></tr><tr><td><code>search_term</code></td><td><code>custom_data.search_string</code></td></tr><tr><td><code>partners.pinterest.opt_out_type</code></td><td><code>custom_data.opt_out_type</code></td></tr></tbody></table>

{% hint style="info" %}

> **\*** Mandatory property.\
> **1.** If this property is not provided, an <mark style="color:blue;">`action_source`</mark> is retrieved using available data. Supported values: <mark style="color:blue;">`app_android`</mark> , <mark style="color:blue;">`app_ios`</mark> , <mark style="color:blue;">`offline`</mark> and <mark style="color:blue;">`web`</mark> . Default value: <mark style="color:blue;">`web`</mark> .\
> **2.** If this property is not provided, a proper<mark style="color:blue;">`event_source_url`</mark>is retrieved using available data.\
> **3.** Boolean or equivalent string value supported.\
> **4.** If it's passed in clear text, it's automatically hashed.\
> **5.** Priority on the left column. If the value can't be retrieved from the URL, the <mark style="color:blue;">`Click Id Cookie Name`</mark> or the default cookie name`_epik` is used.\
> **6.** All item identifiers are taken into account.
> {% endhint %}


---

# Agent Instructions: 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:

```
GET https://doc.commandersact.com/features/destinations/destinations-catalog/pinterest.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
