Pinterest Tag
Create and read Pinterest tags, manage their custom events, check stats and install them on Shopify or WordPress through the tracking tags API.
Manage Pinterest tags through the platform-neutral tracking tags API on your pinterestads account. You can:
- Create and read tags and manage their custom events
- Check when a tag last fired and its Event Quality Score
- Install it on a connected Shopify store or WordPress site
| Field | Value |
|---|---|
tagId | The numeric Pinterest tag id. It is also what the on-site code loads, so siteTagId equals id. |
adAccountId | The numeric ad account id. A tag belongs to one ad account; without adAccountId, per-tag calls find the owner across every ad account the connection can read. |
kind is tag.
GET .../tracking-tags lists the tags of every readable ad account. One account refusing access does not hide the others.
GET .../tracking-tags/{tagId} adds the tag's code (Pinterest's base code), lastFiredTime and installed.
const { data } = await zernio.trackingtags.createTrackingTag({
path: { accountId: '66b2e19d8c3f5a7e9d0b1c2d' },
body: { adAccountId: '549755885175', name: 'Storefront tag' }
});Response (201):
{
"platform": "pinterestads",
"tag": {
"id": "2612345678901",
"siteTagId": "2612345678901",
"name": "Storefront tag",
"platform": "pinterestads",
"kind": "tag",
"status": "active",
"lastFiredTime": null,
"installed": false,
"ownerAdAccountId": "549755885175",
"code": "<script type=\"text/javascript\">...pintrk('load', '2612345678901');...</script>"
}
}The create takes a name and, optionally, automaticMatchingFields. It switches on automatic enhanced match for those fields (em, ph, fn, ln, ct, st, zp, country, external_id, ...).
Create is the only time Zernio can set it, because Pinterest cannot edit a tag afterwards.
| Operation | Behavior |
|---|---|
Stats (GET .../stats) | No time range (startTime/endTime answer 400). Rows: the tag (lastFiredTime, status, enhancedMatchStatus), the events Pinterest has seen on it (page_visit and ocpm_eligible sources, with the matching siteEvent), and the ad account's Event Quality Score for the last 1 and 14 days. An account Pinterest cannot score yet reports why in its row. |
| Update | 501: API v5 only creates, lists and reads conversion tags (PATCH and PUT answer 405); rename a tag or change enhanced match in Pinterest Ads Manager. |
| Share | 501: a tag belongs to one ad account; use Pinterest Business Access. |
Conversion events (.../events) | Pinterest's advertiser defined events: a custom event name the site sends, mapped to a standard type. List, create (name plus type or siteEvent), update (only the type: the name is the event's id, so it cannot be renamed) and delete (Pinterest stops tracking it, state: "disabled"). They belong to the ad account, so every tag of that account lists the same ones. At most 15 per ad account, names of 1 to 100 letters, digits, _ or -, case-insensitive. type is one of Pinterest's optimizable types (CHECKOUT, ADD_TO_CART, LEAD, SIGNUP, PAGE_VISIT, ...). |
| Diagnostics, users and partners | 501. |
| Delete | Not offered: DELETE on a conversion tag answers 405 at Pinterest. |
| Install | Shopify and WordPress. WordPress gets Pinterest's base code with pintrk('page') and a pagevisit event (official fallback: Pinterest for WooCommerce, WooCommerce stores only). Shopify sends every storefront event to ct.pinterest.com/v3/, the endpoint Pinterest's noscript tag and core.js use, with core.js's parameter names, the epik click id kept in _epik and event_id set for dedup with the Conversions API. |
A 403 means the connected Pinterest user lacks a Business Access role on the ad account (Admin, Analyst, Audience or Campaign).