Skip to main content

Implement Pinterest Conversions API via ATS for Web

You can integrate your ATS for Web configuration with the Conversions API for Pinterest adapter to easily collect event data and send it to Pinterest. In this article, you will learn how to configure the events you want to send to the Pinterest CAPI. The event data can be collected via CSS selectors, URL, or by setting predefined, hardcoded values.

Make sure you have fulfilled the requirements for setting up the Conversions API for Pinterest before you get started.

Features Included

This implementation method allows you to:

  • Obtain identity envelopes

  • Handle opt-outs from IAB U.S. Privacy API and GPP

  • Collect required parameters from Pinterest

  • Set up customizable events

  • Set up customizable triggers for each event

Set Up ATS for Web to Send Event Data to Pinterest

The procedure below is a direct continuation of the steps from Set Up the Conversions API for Pinterest in Console.

  1. After providing the Pinterest account ID, and authentication token, and selecting the action source, you can now specify the events you want to send to Pinterest. Under ‘Events List’, click Create New.

    Pinterest_Create_New_Event.png
  2. Enter an Event Name and select the Event Type.

  3. In the Event Deduplication section, select how the Event ID should be obtained, and for which identifier. The Event ID is used to eliminate duplicate events by assigning a unique identifier to each event. In the example below, we are using the Order Number as the Event ID.

    Pinterest_Event_Deduplication.png

    Note

    • CSS selector allows you to obtain the parameter by targeting a specific HTML element in your page. We recommend using only ID selector to limit errors. For example; #product-value, #ItemValue

    • Alternatively, you can provide a URL parameter which is added at the end of a URL after the ‘?’ symbol. For example; currency, product-currency

    • If you want to pass predefined values, you can also select Hardcoded Values and enter a value you want to pass for the parameter. For example, if the transactions in your website are always in US dollars, you may want to set the value to "USD" for the Currency parameter

  4. If you selected the Checkout Event type, you must provide additional parameters under Required Custom Data for the Currency and Value and choose how to obtain them. Select URL or CSS Selector for each parameter and provide the required data.

    Pinterest_Required_Custom_Data.png
  5. (Optional) Enable Add Customer Information to include additional parameters based on the customer's location.

    Pinterest_Customer_information.png

    Tip

    You can add more parameters by clicking the plus button and remove them by clicking the minus button.

    Pinterest_Plus_Minus.png
  6. In the Custom Data section, enable 'Add Custom Data Parameters' to add custom parameters defined by Pinterest. The more parameters you add, the more accurate the data Pinterest will receive. The following parameters are available:

    • Content IDs: List of product IDs. For example, a list of products that a customer has in their cart for an Add To Cart event. This parameter is recommended for Page Visits, Add To Cart, and Checkout events.

    • Content Name: The name of the page or a product associated with the event.

    • Content Category: The category of the content associated with the event.

    • Content Brand: The brand of the content associated with the event.

    • Order ID: The order ID. This is recommended to deduplicate events when necessary and run other measurement products at Pinterest.

    • Number of Items: Total number of products in the event. For example, the total number of items purchased in a Checkout event. This parameter is recommended for Add To Cart and Checkout events.

  7. In the Custom Data section, enable Add Contents to provide more information on the item ID, price, and quantity. We recommend adding these parameters if you are creating a 'Page Visit', 'Add to Cart', or 'Checkout' event.

  8. Set up the Trigger event to decide when the events should be sent. You can select Automatically to have it sent every time the event happens, or by an API call.

    If you select to set up a trigger event by an API call, this can be done by calling ats.sendPinterestEvents(['name_of_event']) where 'name_of_event' should be replaced with the event name you provided in step 4.

    Note

    For non-checkout events such as 'Add To Cart', 'Signup', and others, we recommend setting up a trigger event only on some pages to make sure they are not fired on every page load.

  9. Specify to have the trigger added to all pages by selecting Always, or in specific pages by selecting On some pages. If you choose the latter, you need to provide the page URL and a domain identifier. Click the plus button to add multiple pages.

    Pinterest_Trigger__Event.png
  10. Click Save.

Once you are done with setting up the events, the Pinterest API for Conversions Adapter will collect and send the event data to Pinterest whenever the specified events occur on your website. All the conversion events should be visible in your Pinterest ads account where you can manage and track your conversions.

Pinterest_Ads_Manager.png

To track the conversion events, go to the following page: https://ads.pinterest.com/advertiser/{ACCOUNT_ID}/conversions/event-history/