Pinterest CAPI
What Is Pinterest CAPI?
Pinterest is a visual discovery and bookmarking platform where users can find, save, and share ideas and inspirations. It allows users to create and organize collections of images, known as "pins," into thematic boards. These pins can link back to the original source, making Pinterest a powerful tool for discovering new content, planning projects, and finding creative inspiration. The platform is widely used for ideas on fashion, recipes, home decor, and more, catering to both personal interests and professional marketing.
Pinterest Conversion API (CAPI) is a tool that helps businesses track user interactions on their websites more accurately by sending events directly from their servers to Pinterest. This API enables better measurement of conversion actions, such as purchases or sign-ups, without relying solely on browser-based tracking, which can be affected by ad blockers or cookie restrictions. By using CAPI, businesses can gain deeper insights into the performance of their Pinterest campaigns, improve ad targeting, and optimize their marketing strategies for better results.
What are the benefits of integrating MetaRouter with Pinterest CAPI?
- Enhanced Data Accuracy: CAPI reduces the impact of ad blockers and cookie restrictions, ensuring more reliable tracking of user interactions and conversions.
- Improved Data Security: Direct server-to-server communication provides a more secure way of transmitting data compared to browser-based methods.
- Comprehensive Event Tracking: CAPI allows for tracking a wider range of user interactions and conversion events, offering deeper insights into campaign performance.
- Better Ad Targeting and Optimization: With more accurate and complete data, businesses can refine their ad targeting and optimization strategies, leading to more effective marketing efforts.
Getting Started - From Your Pinterest Account
Ad Account ID & Access Token:
- Log in to Pinterest Business Manager.
- Click on the upper-left drop down menu.
- Click on “Conversions” under the “Business” column.
- Under “API for Conversions”, Select “Conversion access token”, and click Generate new token.
- Your Ad Account ID will be displayed along with the new token.

Pixel ID:
- Continuing in Pinterest Business Manager, click on the upper-left drop down menu.
- Click on “Conversions” under the “Business” column.
- On the left-hand navigation, click on “Tag Manager”.
- There is an option to click on “Install the Pinterest tag manually” that will let you view your Tag ID on the upper-right side of the screen. This ID will be used as your Pixel ID in the sync.

Getting Started - From Your MetaRouter Account
Adding a Pinterest CAPI integration.
From the integration library, add a Pinterest CAPI integration. Then, fill out the Connection Parameters:
Connection Parameter | Description |
---|---|
AD_ACCOUNT_ID | Your Pinterest ad account ID. |
ACCESS_TOKEN | Your conversion access token. |
Adding a Pinterest CAPI Sync
To gather the epik
value, you must add a Pinterest CAPI sync.
-
From the Pipelines page, find the pipeline associated with the web property you’d like to add a sync to. Hover over the three dot dropdown and select “Build AJS File.”
-
In the Identity Syncs section, select the Pinterest CAPI sync.
-
Fill out the following fields:
-
Pixel ID - Enter your Tag ID.
-
Cookie Lifetime (in days) - Default is 45 days.
-
Custom Event Property Value - Default is “MetaRouterSync” but is customizable.
-
Extra Pinterest PixelID - String array of additional pixels that should be fired. This field is optional. Note this must be a valid JSON of string IDs.
[ "2613210818064", "2613210818065", "2613210818066" ]
-
-
Scroll down and click the Save and Build File button.
-
Deploy your AJS file to propagate changes to your web property.
Event Mappings
MetaRouter provides all of the event mappings that Pinterest CAPI integrations typically require. You may add custom events, parameters or mappings in accordance with Pinterest CAPI’s API documentation.
Global
Global mappings will be applied to all events. If your parameter names do not match the Expected Inputs provided, you will need to overwrite the Inputs provided with your own.
Output Key | Description | Expected Input |
---|---|---|
| Type: String | Enrichment - |
| Type: String | Enrichemnt - |
| Type: String | N/A - Expression |
| Type: Integer | N/A - Expression |
| Type: String |
|
| Type: String |
|
| Type: Array | N/A - Expression |
| Type: String |
|
| Type: String |
|
| Type: Array | N/A - Expression |
| Type: Array | N/A - Expression |
| Type: Array | N/A - Expression |
| Type: Array | N/A - Expression |
| Type: String |
|
| Type: String |
|
Event Specific
page
Output Key | Description | Expected Input |
---|---|---|
| Type: String | Enrichment - |
products_searched
Output Key | Description | Expected Input |
---|---|---|
| Type: String | Enrichment - |
| Type: String |
|
product_list_viewed
Output Key | Description | Expected Input |
---|---|---|
| Type: String | Enrichment - |
| Type: Array | N/A - Expression |
| Type: Array | N/A - Expression |
product_viewed
Output Key | Description | Expected Input |
---|---|---|
| Type: String | Enrichment - |
| Type: String |
|
| Type: String | N/A - Expression |
| Type: Array | N/A - Expression |
| Type: Array | N/A - Expression |
| Type: Integer |
|
product_added
Output Key | Description | Expected Input |
---|---|---|
| Type: String | Enrichment - |
| Type: String |
|
| Type: String | N/A - Expression |
| Type: Array | N/A - Expression |
| Type: Array | N/A - Expression |
| Type: Integer |
|
cart_viewed
Output Key | Description | Expected Input |
---|---|---|
| Type: String | Enrichment - |
| Type: String |
|
| Type: String | N/A - Expression |
| Type: Array | N/A - Expression |
| Type: Array | N/A - Expression |
| Type: Integer |
|
| Type: String |
|
order_completed
Output Key | Description | Expected Input |
---|---|---|
| Type: String | Enrichment - |
| Type: String |
|
| Type: String | N/A - Expression |
| Type: Array | N/A - Expression |
| Type: Array | N/A - Expression |
| Type: Integer |
|
| Type: String |
|
Required & Recommended Identifiers
These identifiers must be mapped to Pinterest CAPI in order for successful user matching to occur. Without these IDs, any events sent to Pinterest CAPI may not be reflected within reporting. For your convenience, required and recommended IDs are mapped as Global parameters to ensure they are added to every event.
Attribute | Example | Sync Injector Required? |
---|---|---|
| d41d8cd98f00b204e9800998ecf8427e | No |
| 192.168.1.1 | No |
| Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36 | No |
| 130161d0-8fee-4167-aa4d-d151eed27c6b | No |
| abcdef1234567890 | Yes |
| City: newyork | No |
| State: ny | No |
| Zipcode: 10001 | |
| Country: us | No |
Additional Identifiers
These identifiers should be mapped to Pinterest CAPI whenever possible to ensure the highest user match rates possible. If using these identifiers, they must be added as Global or Event Specific mappings.
Attribute | Description | Example |
---|---|---|
| Sha256 hashes of user's "Google Advertising IDs" (GAIDs) or "Apple's Identifier for Advertisers" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. | GAID/IDFA: 123e4567-e89b-12d3-a456-426614174000 SHA-256 Hash: 03ac674216f3e15c761ee1a5e255f067e2e3a08ef0d751154643452c6b9ee7f8 |
| Sha256 hashes of user's phone numbers, only digits with country code, area code, and number. Remove any symbols, letters, spaces and leading zeros. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. | Formatted: 12345678901 SHA-256 Hash: bf13be1992a112e35ac07fb2cdbf03a7c648ea7c593aa82ae388651adcb5efb6 |
| Sha256 hashes of user's gender, in lowercase. Either "f" or "m" or "n" for non-binary gender. | Gender: f SHA-256 Hash: 2d711642b726b04401627ca9fbac32f5c5d5a1f59e80e04c3e8abf2d4d68b14e |
| Sha256 hashes of user's date of birthday, given as year, month, and day. | a69c6a58fe3821425dc1705a7a72c527504b52e7d5bb97854f4e48cf1a4055e7 |
| Sha256 hashes of user's last name, in lowercase. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. | Last Name: smith SHA-256 Hash: 872e4b0f8323b7fc6cb67e8a3e00094ed88d2f71c6a38ffb70f2e3107d8e7964 |
| Sha256 hashes of user's first name, in lowercase. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA. | First Name: john SHA-256 Hash: 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12 |
Additional Pinterest CAPI Documentation
Updated 18 days ago