Stape
Search
Try for free

Pinterest conversion API

Updated
Nov 19, 2024
Published
Jul 22, 2022
Also available in

Thanks to the release of Pinterest Conversions API, implementing server-side tracking for this platform became possible. Pinterest CAPI is an excellent way to increase the accuracy of conversion tracking and, as a result, get a better return on investment for paid advertising.

This blog post will explain the possibilities of Pinterest CAPI and how the Stape Pinterest Conversion API tag for server GTM works.

Benefits of Pinterest Conversions API

The Pinterest Conversions API offers several compelling benefits for advertisers looking to optimize their campaigns:

  • Improved conversion tracking. Tracking conversion events on the server side helps you better understand campaign performance. Such a flow ensures that every conversion event is captured.
  • Better ad targeting. Advertisers can refine their ad targeting and placement strategies with access to precise conversion data.

Advertisers can improve their conversion reporting and achieve better advertising results by implementing the Pinterest Conversions API.

Before starting

To set up Pinterest Conversions API, you will need to set up a GTM server-side container.

Pinterest recommends using both browser and server tracking. Below, we will use the server Google Tag Manager container to set up Pinterest Conversions API. Please note that you should have a data stream from the web to the server container - this can be done with either GA4 or Data Tag/Data Client.

How to set up the Pinterest Conversions API tag

1. Download the Pinterest tag from GitHub and unzip the file.

Download from GitHub

2. Import the Pinterest Tag in server GTM. Go to Templates → Tag Templates → New → three dots in the right upper corner → Import.

Import template

3. Go to the Tags section, create a new tag, and choose the one uploaded to the server GTM in the previous step as a tag type.

Tag type

4. Configure the Pinterest tag.

4.1 Select Action Source - web, offline, Android or iOS app. 

4.2 Choose Event Name Setup Method:

  • Standard - with this option, you can choose the event from the list (e.g., page_visit, add_to_cart, checkout, etc.)
  • Inherit from client - the Pinterest CAPI tag will try to map events automatically into standard events or use a custom name if it’s impossible to map into a standard event.
  • Custom - if you choose this option, you can set up custom event tracking.

4.3 Add Pinterest Advertiser ID - to find it, login to your Pinterest Ad account → click Settings in the top left corner -> under the Manage Business category, click Conversions → choose the Set Up API page from the left-hand navigation. In the block called “Generate conversion access token,” you'll see your Ad account name and Pinterest Advertiser ID. Copy and paste this ID to the tag in the server container.

4.4 Add API Access Token - in the same block as the Pinterest Advertiser ID, click "Generate new token" to get your API access token.

Generate access token

4.5 (Optional) Check the following boxes:

  • Test Mode - if you check this box, the events will not be recorded but the API will still return the same response messages. Use this mode to verify your requests are working and your events are constructed correctly.
  • Use Optimistic Scenario - the tag will call gtmOnSuccess() without waiting for a response from the API. This will speed up sGTM response time however your tag will always return the status fired successfully even in case it is not.

5. Add advanced configuration for a Pinterest tag.

5.1 Server Event Data Override - select from a list of custom data.

The frequently asked question for this section is how to add an Event ID. The Event ID is automatically grabbed from event data, or you can redefine it in tag settings.

Event ID

5.2 User Data - select from a list of user data.

These are user data that Pinterest supports:

  • Email addresses
  • Phone numbers
  • Gender
  • Date of birthday
  • Last name
  • First name
  • City
  • State
  • Zip code
  • Country
  • Maids
  • Client IP address
  • Client user-agent
  • External ID
  • Click ID

5.3 Custom Data - select from a list of product data.

Along with events, you can send such custom data:

  • Currency
  • Value
  • Content IDs
  • Contents
  • Num items
  • Order ID
  • Search string
  • Opt out type
  • Content name
  • Content category
  • Content brand

5.4 Logs Settings - choose if you want to log requests to your stape account. This feature is handy when setting up server-side tagging since it allows seeing incoming and outgoing requests and network responses.

Below is an example of a configured tag:

Example of configured tag

6. Add the trigger for a tag.

Test Pinterest Conversions API tag setup

You can test the setup as usual in Google Tag Manager. Click on Preview, trigger the event, and check whether the tag has fired.

Preview in GTM

Conclusion

With help of Pinterest Conversions API tag, you can easily track web conversion events. Also you can choose any other action source that better fits your needs - offline conversions or app (iOS and Android) events. When the conversion event occurs, it will be recorded and thanks to the server-side tracking, you will get more reliable data.

The Pinterest tag configuration is easy and straightforward, especially if you have set up the Facebook Conversions API. If you have any questions, feel free to contact Stape's support.

Tagged with:gtm server

Try Stape for all things server-sideright now!