The Pinterest Conversion API Tag for Google Tag Manager Server-Side allows you to send site events and parameters directly to Pinterest servers using the Pinterest Conversion API (v5). It works with GA4 or the custom Data Client inside the GTM Server-Side container.
The tag supports standard and custom events, event deduplication, real-time server event testing, and automatic SHA-256 hashing of user data.
How to use the Pinterest Conversion API Tag
- Add the Pinterest Conversion API Tag to your server container in GTM.
- Choose your Event Name Setup Method: select a standard event, set a custom event name, or choose “Inherit from client” to automatically map GA4 events to Pinterest standard events.
- Enter your Pinterest Advertiser ID and API Access Token.
- Configure the Server Event Data Override, User Data, and Custom Data parameters as needed.
- Add a trigger to fire the tag (e.g., on a custom event or a GA4 client claim).
Event Name Setup
You can configure how events are sent in three ways:
- Standard: Manually select one of the supported Pinterest event names from a dropdown list.
- Inherit from client: The tag automatically maps common GA4 event names to their Pinterest equivalents (e.g.,
page_view→page_visit,purchase→checkout,add_to_cart→add_to_cart). If an event cannot be mapped, it defaults tocustom. - Custom: Set the event name manually if using the
customoption in the standard dropdown.
Parameters
Main Configuration
- Pinterest Advertiser ID: Your Advertiser ID starting with
549. You can find it in Pinterest Ads under the navigation dropdown or in the browser URL. - API Access Token: Required to authenticate with the Pinterest Conversion API. You can obtain it in Pinterest Ads under Conversions > Conversions API > Set up API.
- Action Source: Defines where the event originated. Select
Web,Offline,App iOSorApp Android, or use a variable that resolves toweb,offline,app_iosorapp_android(case-insensitive). Defaults towebwhen empty. The Event Source URL, IP address and user agent are auto-mapped for every action source. - Test Mode: When enabled, events are not recorded but the API returns the same response messages. Use this to verify your setup.
- Use Optimistic Scenario: The tag will call
gtmOnSuccess()immediately without waiting for a response from the API. This speeds up sGTM response time, but the tag will always report success even if the request fails.
Cookie Settings
When the epik URL parameter is present, the tag stores the Click ID in the _epik cookie.
- Do not set Click ID (_epik) cookie: The Click ID is still sent in the request, but it is not stored as a cookie.
- Cookie Domain: Defaults to
auto, which uses the top-level domain ofpage_locationor of theRefererheader. Enter a fixed domain (e.g.,example.com) to override it. - Cookie SameSite:
None,Lax(default) orStrict. - Use HttpOnly cookies: Forbids JavaScript from accessing the cookie when
true. Accepts variables. - Click ID Cookie Expiration: Cookie lifetime in days. Defaults to
365.
Server Event Data Override
Override or set server-side event parameters. Available properties:
- Event Time
- Event Source URL
- Opt Out
- Event ID
- App id / App name / App version
- Device brand / Device carrier / Device model / Device type
- OS version
- WiFi
- Language
User Data
Override or set user data parameters sent with the event. If a parameter requires hashing (per Pinterest documentation), the tag normalizes and SHA-256 hashes it before sending, unless it is already hashed:
- Email, first name, last name, country, external ID and MAIDs: trimmed and lowercased.
- Phone: digits only, without leading zeros (include the country code).
- Gender:
f,morn(female,maleandnon-binaryare converted). - Date of birth: digits only (e.g.,
1990-01-15becomes19900115). - City and state: lowercased, without spaces or punctuation (send the state as a two-letter code).
- Zip: lowercased, without spaces or dashes; a US ZIP+4 is cut to 5 digits.
Values that are empty after normalization are not sent.
Available properties:
- Phone
- Gender
- Date of Birth
- Last Name / First Name
- City / State / Zip / Country
- MAIDs (Mobile Advertiser IDs)
- Client IP Address
- Client User Agent
- External ID
- Click ID
- Customer Type
Custom Data
Override or set custom/product data parameters:
- Currency
- Value
- Content IDs
- Contents
- Num Items
- Order ID
- Search String
- Opt Out Type
- Content Name / Content Category / Content Brand
- Predicted Lifetime Value (LTV)
Tag Execution Consent Settings
Control whether the tag respects marketing consent:
- Send data always: The tag fires regardless of consent status.
- Send data in case marketing consent given: Aborts execution if marketing consent (
ad_storagevia Google Consent Mode or Stape’s Data Tag parameter) is not granted.
Useful Resources
Open Source
The Pinterest Conversion API Tag for GTM Server-Side is developed and maintained by the Stape Team under the Apache 2.0 license.