# Declare event delivery

Choose transports, events, fields, consent purposes, and server context for the next app release.

Open **Event Delivery** for the app in the Developer Portal, or edit `server_events` in [`tringify.app.json`](/apps/apps/configuration), which has a complete example. The available events, payload fields, consent purposes, and envelope fields come from the current platform registry.

## Configure the declaration

- Enable Browser pixel, Server delivery, or both. Browser delivery also needs a pixel in `storefront_embeds`; see [Storefront extensions](/apps/storefront-extensions).
- Select the events the integration needs.
- Remove payload fields the integration does not need.
- For each transport, choose one consent purpose for every event that transport delivers, and leave the others out. Every selected event needs a purpose on at least one transport.
- For server delivery, enter the public HTTPS endpoint and select only the context and envelope fields the integration requires.
- Review the browser and server payload previews, save the draft, and submit the complete app release for review.

## Browser declarations

Saving or submitting refuses a declaration that names an event no pixel could receive, and the error names the event:

- Every browser event must be one a storefront page can publish: `session_started`, `page_view`, `product_viewed`, `search`, `cart_add`, `cart_update`, `cart_remove`, `wishlist_add`, `wishlist_remove`, `begin_checkout`, `purchase`, `rec_impression`, `rec_click`, `customer_login`, `customer_register`, `newsletter_signup`, `contact_submitted`, `payment_info_added`, `comment_submitted`, `review_submitted`. `refund`, `cancellation`, `order_edited` happen after the shopper has left the storefront, so they are server-only.
- The browser purpose of every browser event must equal the `consent_category` of at least one of the app's pixel embeds, and every pixel embed's category must be the browser purpose of at least one event. A pixel only receives events whose browser purpose is its own category.
- Pixel embeds require the browser transport, and the browser transport requires at least one pixel embed.

## Context and envelope fields

`context_fields` and `envelope_fields` configure signed server delivery and can be declared only together with the server transport. The browser context is fixed by the runtime and minimised for sandboxed pixels; see [Build a browser pixel](/apps/event-delivery/browser). Two envelope fields also reach browser pixels, under the stricter rules below.

## Customer matching

`customer_match` is available only to an app with the `customer_matching` capability and `read_customers` permission. When an eligible customer is known, the server event may include a Tringify-generated external reference and normalized SHA-256 email or phone matches. `email_sha256` and `phone_sha256` follow the common ad-platform form (lower-case email, phone as international digits); `google_email_sha256` and `google_phone_sha256` follow Google's Data Manager rules (dots removed before the @ in Gmail addresses, phone in E.164 with its +), so send those to Google. Internal customer IDs and raw contact values are not delivered.

In the browser, only an `advertising` pixel of a release that declared `customer_match` receives the hashes, in its context, and only while the shopper allows both Advertising and Advertising data. Hashes are still personal data: send them only to the destination they were declared for.

## Catalog codes on events

When your release declares catalog item identities (channel identities with the `catalog_item` role), every event that names products carries your codes for them, so your pixel and your server sender use the same IDs as your catalog without looking them up. Codes are keyed `product:<product id>` and `variant:<variant id>`; use the variant's code for a line with a variant and the product's code otherwise. A product or variant without a code is absent, and the event still counts.

- **Server events:** each delivered event has `identities`, your codes for the products and variants it names.
- **Page pixels:** each event has `app_identities`, keyed by app ID; read `app_identities[<your app id>]`.
- **Checkout frame pixels:** each event posted to your frame has `identities`, your codes only.

## Session identity

Select `session_id` only when the destination must associate browser and server events from the same consented storefront visit. The value is Tringify's pseudonymous analytics visit ID, not a storefront cookie or customer identifier. Server delivery includes it for events delivered under the `analytics` purpose, so declaring it requires at least one server event with that purpose.

In the browser, only a pixel whose consent category is `analytics` receives it, as `session_id` on each event, and only while the shopper allows Analytics. It is the same value the server events carry. A release that declares `session_id` with the browser transport needs an analytics pixel. Map it to the destination's documented session or client identity; do not expose it to page scripts, URLs, logs, or unrelated providers.

## Click IDs every store records

Tringify records these landing URL parameters for every store, while the shopper allows Advertising, in the shared `attribution` context of the visit, its orders and every app's server events. No app declares them.

| Parameter | Network | Kind |
| --- | --- | --- |
| `gclid` | Google Ads | Click ID |
| `dclid` | Google Campaign Manager | Click ID |
| `wbraid` | Google Ads | Click ID |
| `gbraid` | Google Ads | Click ID |
| `srsltid` | Google Merchant Center | Click ID |
| `msclkid` | Microsoft Advertising | Click ID |
| `fbclid` | Meta | Click ID |
| `ttclid` | TikTok | Click ID |
| `sccid` (also `ScCid`) | Snapchat | Click ID |
| `li_fat_id` | LinkedIn | Click ID |
| `twclid` | X | Click ID |
| `epik` | Pinterest | Click ID |
| `rdt_cid` | Reddit | Click ID |
| `yclid` | Yandex Direct | Click ID |
| `nclid` | Naver Ads | Click ID |
| `ef_id` | Adobe Advertising | Click ID |
| `tblci` | Taboola | Click ID |
| `ob_click_id` (also `OutbrainClickId`) | Outbrain | Click ID |
| `irclickid` | Impact | Click ID |
| `awc` | Awin | Click ID |
| `clickref` | Partnerize | Click ID |
| `tduid` | Tradedoubler | Click ID |
| `gad_source` (also `gad`) | Google Ads | Campaign details |
| `gad_campaignid` | Google Ads | Campaign details |

## Your own click IDs and cookies

An ad platform whose click parameter is not in the list above declares its own under `server_events.attribution`, reviewed with the release. No platform change is needed: a store that installs the release captures them from then on.

Add and remove them under **Click IDs and cookies** on the app's **Event Delivery** page in the Developer Portal, or in `tringify.app.json`. Saving the page, `tringify app config check` and `tringify app config push` check them with the rules below, and a refused name comes back as an error naming the field, such as `server_events.attribution.cookies`.

```json
{
  "server_events": {
    "attribution": {
      "click_id_parameters": [
        "exclid"
      ],
      "cookies": [
        "_exa",
        "_exc"
      ]
    }
  }
}
```

| Field | Rules |
| --- | --- |
| `click_id_parameters` | Up to 5 landing URL query parameters. 3 to 32 lowercase letters, digits or underscores, starting with a letter, matched exactly. Never a parameter the platform records itself (or its alias), a `utm_*`, `gad_*`, `tf_*`, `tringify*`, `preview*`, `theme_*` or `admin_*` name, or a parameter storefront pages use (`page`, `variant`, `sort`, `locale`, `token` and similar). |
| `cookies` | Up to 5 first-party cookies your own browser code sets on the storefront, such as your pixel's click and browser cookies. 2 to 64 letters, digits, underscores, dots or hyphens. Never a platform or infrastructure cookie (`_tf*`, `tf_*`, `_sp_*`, `_session`, `__Host-*`, `__Secure-*`, edge network cookies `__cf*` and `cf_*`). |
| Both | No name may suggest personal data or a credential (`email`, `phone`, `name`, `address`, `token`, `session`, `password`, `user`, `customer` and similar), and none may repeat. Declare at least one name, and give at least one event an advertising consent purpose (`advertising`, `advertising_data` or `personalized_advertising`). |

What the storefront does with them:

- **Capture.** Only while the shopper allows Advertising. A landing URL that carries a declared parameter is a campaign touch like one carrying `utm_*` or a platform click ID. Its value (first occurrence, trimmed, at most 512 bytes) is kept with the visitor's first and last touch for the 30-day attribution window, and goes into the order's attribution snapshot when checkout creates the order. Tringify does not store cookies: it reads them from the shopper's request when an event happens, and leaves out a value over 512 bytes.
- **Delivery, to your app only.** Each server event with an advertising consent purpose carries `context.app_attribution` with the declared values the visitor has, whatever `context_fields` lists. Other apps never see them, and the shared `context.attribution` never carries them. In the browser your frame pixel receives them; see [Build a browser pixel](/apps/event-delivery/browser).
- **Checkout.** Checkout runs on the storefront's own domain, so the values follow the shopper through checkout and order confirmation: `begin_checkout` and `payment_info_added` carry them, and `purchase` carries the values the shopper had when the order was created. Your frame pixel on checkout and order confirmation receives them as on other pages.
- **Consent.** Withdrawing Advertising deletes the attribution touches on the next page and stops delivery at once, in the browser and on later server events. Events recorded before the withdrawal keep the consent they had.
- **Install screen and privacy.** Merchants see the names under **Ad click IDs and cookies**, with the Advertising purpose, before they install or update, and the app's generated privacy section lists them.

> Every selected field becomes part of the reviewed data contract shown during app review. Select only fields the integration uses. The app's privacy policy lists them in its generated section; explain their purpose in your part of it.

