Postback Data for Server-Side Integrations
This guide is for sites that send events from their own server with the Server-side events API instead of the JavaScript library. It explains how to send the visitor's consent and the customer information that Tracify needs for conversion postback.
With the JavaScript library, the browser sends Tracify the visitor's consent, IP address, user agent, and click IDs on its own. When your server sends the events, it has to send this information itself.
Important
Your Account Manager must turn on conversion postback for your account before Tracify sends any conversions to your ad platforms. Contact your Account Manager before you start.
How consent works for server-side events
Tracify only keeps the information it needs for conversion postback, such as the IP address and click IDs, from events that say the visitor consented to tracking. If an event does not say, Tracify treats the consent as unknown and keeps none of this information. If your events never include consent, Tracify cannot send any conversions to your ad platforms.
There are two ways to tell Tracify about consent:
- On every event. Add the
tracking_consentobject todata. Once you know the visitor's choice, include it on every event you send for them. - With a
consentevent. Send one when the visitor accepts or revokes consent in your consent management platform (CMP).- When the visitor accepts, send the page they are on again, this time as a
consentevent: the sameurlwith its ad parameters, pluscustomer_information. Do not send a second page view. Tracify adds the information to the visit that page view belongs to. - When the visitor revokes, the
consentevent records it straight away, even if the visitor never sends another event.
- When the visitor accepts, send the page they are on again, this time as a
Consent does not affect the hashed identity_data. Send it on every event, with or without consent, as described under Event Properties.
Getting the consent status to your server
Your CMP runs in the visitor's browser, so your server needs a way to find out what the visitor chose. There are two common ways:
- Read the CMP's cookie on each request. Most CMPs save the visitor's choice in a first-party cookie, for example
CookieConsentfor Cookiebot orOptanonConsentfor OneTrust. Your server can read it from the request and check whether the visitor accepted the marketing category. - Pass the choice from the browser to your server. Listen for your CMP's consent event in the browser (see Managing Consent via CMP for examples) and send the choice to your server, which then sends the
consentevent to Tracify.
Tracify belongs in the marketing category of your consent banner.
The tracking_consent object
Add tracking_consent to the data object of any event.
| Property | Type | Required | Description |
|---|---|---|---|
is_given |
boolean | Yes | true if the visitor consented to tracking, false if they declined or revoked it. Must be true or false, not a string such as "true". |
consent_id |
string | No | The ID of the consent record in your CMP, if it has one. |
The API returns HTTP 400 if tracking_consent is not an object, is_given is not true or false, consent_id is not a string, or a consent event has no tracking_consent.
Tip
You can send the same consent status on every event. Tracify only records changes, so repeating it does not create extra records.
The customer_information object
Only add customer_information to an event's data when the same event has tracking_consent.is_given: true. Do not send it while the visitor has not consented, or while you do not know their choice yet.
Send the values unhashed, exactly as you received them. Tracify passes them to the ad platforms with each conversion. The object can also hold the buyer's contact details.
| Property | Type | Description |
|---|---|---|
ipv4 |
string | The visitor's IPv4 address. |
ipv6 |
string | The visitor's IPv6 address. |
user_agent |
string | The visitor's User-Agent header, unchanged. |
gclid |
string | Google Ads click ID. |
fbclid |
string | Meta (Facebook / Instagram) click ID. |
msclkid |
string | Microsoft Ads click ID. |
ttclid |
string | TikTok click ID. |
tblci |
string | Taboola click ID. |
ScCid |
string | Snapchat click ID. |
ob_click_id, ob_clid, OutbrainClickId |
string | Outbrain click ID. Use whichever of these names your Outbrain links use. |
epik |
string | Pinterest click ID. |
_fbc |
string | The value of Meta's _fbc cookie. |
_fbp |
string | The value of Meta's _fbp cookie. |
Only include the properties you have. Take the click IDs from the URL of the page the event is for, and keep the parameter names exactly as they appear there, including upper and lower case (for example ScCid).
Note
Tracify currently sends conversions to Meta, Google Ads, and Outbrain only. Send every click ID in the table anyway, including those for other platforms such as TikTok (ttclid) or Pinterest (epik). Tracify keeps them, so when it adds another platform, postback works without changes to your server code.
"customer_information": {
"ipv4": "203.0.113.7",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
"gclid": "Cj0KCQiA4L67BhDUARIsADWrl7G",
"_fbp": "fb.1.1795601702000.1234567890"
}
IP address. Send the visitor's IP address, not the address of your own server or load balancer. If your server runs behind a proxy or CDN, take the visitor's IP from the header your proxy adds, for example the first address in X-Forwarded-For, or CF-Connecting-IP on Cloudflare. Only trust that header if your own infrastructure sets it. Use the same IP address and user agent that you hash for identity_data.
Contact details
Meta and Google Ads can match more conversions when they also get the buyer's contact details. Add them to customer_information, usually on the purchase event, using the order's billing address. If you have them earlier, for example because the visitor is logged in, you can send them on any event.
| Property | Type | Description |
|---|---|---|
email |
string | Email address. |
phone_number |
string | Phone number. Include the country code if the buyer entered one, for example +49 30 1234567. |
first_name |
string | First name. |
last_name |
string | Last name. |
address1 |
string | First line of the street address. |
address2 |
string | Second line of the street address. |
city |
string | City. |
postal_code |
string | Postal code. |
state |
string | State or province code. |
country_code |
string | Two-letter country code, for example DE. |
Send these values unhashed, as the buyer entered them. Tracify formats and hashes them the way each ad platform requires before sending them. As with the rest of customer_information, only send them on events with tracking_consent.is_given: true.
"customer_information": {
"ipv4": "203.0.113.7",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
"email": "jane.doe@example.com",
"phone_number": "+49 30 1234567",
"first_name": "Jane",
"last_name": "Doe",
"address1": "Musterstraße 12",
"city": "Berlin",
"postal_code": "10115",
"country_code": "DE"
}
Meta cookies
_fbc and _fbp are first-party cookies that Meta uses to match conversions. Meta's Pixel sets them if it runs on your site. If it does not, the Tracify JavaScript library creates them once the visitor consents. When you use the Server-side events API, your server has to handle them instead. Only do this on requests where the visitor has consented:
_fbp: If the request has an_fbpcookie, send its value as it is. If not, create one, save it as a cookie on your domain for 90 days, and send that value. Never replace an existing_fbp, so every event for the visitor has the same value._fbc: If the page URL has anfbclidparameter, compare it with the fourth part of the existing_fbccookie (the part after the third dot). If there is no cookie, or the two differ, create a new_fbcfrom thefbclid, save it as a cookie for 90 days, and send it. Otherwise send the existing cookie as it is. If the URL has nofbclid, send the existing_fbccookie, if there is one.
Both cookies use Meta's format fb.<subdomain index>.<creation time>.<value>:
| Part | Value |
|---|---|
<subdomain index> |
The number of dot-separated parts in the cookie's domain, minus one: 1 for example.com, 2 for www.example.com. |
<creation time> |
When you create the cookie, as a Unix timestamp in milliseconds. |
<value> |
For _fbc, the fbclid from the URL. For _fbp, a random 10-digit number. |
For example, a visitor who consents and lands on https://www.example.com/?fbclid=IwAR3xY at 2026-11-25 10:15:09 UTC gets _fbc=fb.1.1795601709000.IwAR3xY if the cookie is set on example.com.
If a cookie already existed, send its full value unchanged, even if it has more than four parts.
Do not create, change, or read these cookies for Tracify before the visitor has consented.
Consent given after the landing page
Click IDs only appear in the URL of the page the visitor lands on from an ad. Most visitors make their consent choice on that page, so the consent event has the click ID in its url and in customer_information.
Set the url of a consent event to the page where the visitor made their choice, and use the same identity_data as on their other events. Tracify then links the consent to the matching earlier ad visit.
If the visitor accepts on a later page, the consent event has no ad parameters. Tracify then links the consent to the visitor's most recent paid visit, but only the consent itself. The IP address, user agent, and click IDs on the consent event are not added to that visit, and the landing page view had none because the visitor had not consented yet. As a result, there is no click ID to send with the conversion. Meta and Google Ads can still match it using other information, such as the buyer's contact details. Outbrain needs the click ID, so it does not receive the conversion. The JavaScript library works the same way.
If the consent event names a paid source that matches no earlier visit, Tracify ignores it.
What to send at each step
| Situation | tracking_consent |
customer_information |
|---|---|---|
| Consent status not yet known | Leave out | Leave out |
| Visitor declined | {"is_given": false} |
Leave out |
Visitor accepts (send a consent event) |
{"is_given": true} |
Include |
| Every later event while consent is given | {"is_given": true} |
Include |
Visitor revokes (send a consent event) |
{"is_given": false} |
Leave out |
| Every later event after revocation | {"is_given": false} |
Leave out |
When a visitor revokes consent, Tracify stops using their information for conversion postback from that point on. Conversions that Tracify has already prepared for sending are still sent.
Set the datetime of a consent event to the time the visitor made their choice, in UTC. It must not be earlier than the page view where they made it. The usual datetime rules also apply: no times in the future, and no events older than 24 hours.
Example payloads
The examples below follow one visitor who comes from a Google ad, sees the consent banner, and accepts it.
1. Landing page view, before the visitor has chosen
The URL has the ad parameters. The visitor has not chosen yet, so the event has no tracking_consent and no customer_information.
{
"events": [
{
"url": "https://www.yourwebsite.com/?utm_source=google&utm_medium=cpc&gclid=Cj0KCQiA4L67BhDUARIsADWrl7G",
"customer_site_id": "00000000-0000-0000-0000-000000000000",
"identity_data": {
"b4e6a7c8d9e0f1d2c3b4a5e6f7e8d9c0b1a2d3e4f5d6c7e8a9b0c1d2e3f4d5c6": 2,
"e7d6c5b4a3b2c1d0e9f8e7d6c5b4a3d2e1f0d9c8b7a6e5d4c3b2a1d0e9f8c7b6": 3,
"a5b4c3d2e1f0e9d8c7b6a5d4c3b2e1d0c9b8a7d6e5f4c3b2a1d0e9f8c7b6a5d4": 4
},
"datetime": "2026-11-25 10:15:02",
"type": "pageview",
"data": {
"origin": "https://www.yourwebsite.com",
"utm_source": "google",
"utm_medium": "cpc",
"gclid": "Cj0KCQiA4L67BhDUARIsADWrl7G"
}
}
]
}
2. Consent event, when the visitor accepts the banner
The consent event repeats the page view from step 1, with three differences: its type is consent, its datetime is when the visitor accepted, and it adds tracking_consent and customer_information.
{
"events": [
{
"url": "https://www.yourwebsite.com/?utm_source=google&utm_medium=cpc&gclid=Cj0KCQiA4L67BhDUARIsADWrl7G",
"customer_site_id": "00000000-0000-0000-0000-000000000000",
"identity_data": {
"b4e6a7c8d9e0f1d2c3b4a5e6f7e8d9c0b1a2d3e4f5d6c7e8a9b0c1d2e3f4d5c6": 2,
"e7d6c5b4a3b2c1d0e9f8e7d6c5b4a3d2e1f0d9c8b7a6e5d4c3b2a1d0e9f8c7b6": 3,
"a5b4c3d2e1f0e9d8c7b6a5d4c3b2e1d0c9b8a7d6e5f4c3b2a1d0e9f8c7b6a5d4": 4
},
"datetime": "2026-11-25 10:15:09",
"type": "consent",
"data": {
"origin": "https://www.yourwebsite.com",
"utm_source": "google",
"utm_medium": "cpc",
"gclid": "Cj0KCQiA4L67BhDUARIsADWrl7G",
"tracking_consent": {
"is_given": true,
"consent_id": "cmp-record-7f3a"
},
"customer_information": {
"ipv4": "203.0.113.7",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
"gclid": "Cj0KCQiA4L67BhDUARIsADWrl7G"
}
}
}
]
}
3. Purchase, later in the same visit
Every event after consent has tracking_consent and customer_information, including the purchase. The purchase also adds the buyer's contact details. The other purchase fields are the same as in the purchase example.
{
"events": [
{
"url": "https://www.yourwebsite.com/checkout/thank-you",
"customer_site_id": "00000000-0000-0000-0000-000000000000",
"identity_data": {
"d6c77f0e3e6c1c276c2e9e6e7e1d8d0a5b4e7c7e3f1e7e7e5d8f7e2e7d5a5d7e": 1,
"b4e6a7c8d9e0f1d2c3b4a5e6f7e8d9c0b1a2d3e4f5d6c7e8a9b0c1d2e3f4d5c6": 2,
"e7d6c5b4a3b2c1d0e9f8e7d6c5b4a3d2e1f0d9c8b7a6e5d4c3b2a1d0e9f8c7b6": 3,
"a5b4c3d2e1f0e9d8c7b6a5d4c3b2e1d0c9b8a7d6e5f4c3b2a1d0e9f8c7b6a5d4": 4
},
"datetime": "2026-11-25 10:31:44",
"type": "purchase",
"is_returning_customer": false,
"data": {
"origin": "https://www.yourwebsite.com",
"order_id": "ORD-691123-XYZ",
"order_id_is_sensitive": false,
"currency": "EUR",
"amount": "89.90",
"payment_status": "paid",
"tracking_consent": {
"is_given": true,
"consent_id": "cmp-record-7f3a"
},
"customer_information": {
"ipv4": "203.0.113.7",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
"email": "jane.doe@example.com",
"phone_number": "+49 30 1234567",
"first_name": "Jane",
"last_name": "Doe",
"address1": "Musterstraße 12",
"city": "Berlin",
"postal_code": "10115",
"country_code": "DE"
}
}
}
]
}
Revoking consent
{
"events": [
{
"url": "https://www.yourwebsite.com/account/privacy",
"customer_site_id": "00000000-0000-0000-0000-000000000000",
"identity_data": {
"b4e6a7c8d9e0f1d2c3b4a5e6f7e8d9c0b1a2d3e4f5d6c7e8a9b0c1d2e3f4d5c6": 2,
"e7d6c5b4a3b2c1d0e9f8e7d6c5b4a3d2e1f0d9c8b7a6e5d4c3b2a1d0e9f8c7b6": 3,
"a5b4c3d2e1f0e9d8c7b6a5d4c3b2e1d0c9b8a7d6e5f4c3b2a1d0e9f8c7b6a5d4": 4
},
"datetime": "2026-11-26 08:02:10",
"type": "consent",
"data": {
"origin": "https://www.yourwebsite.com",
"tracking_consent": {
"is_given": false,
"consent_id": "cmp-record-7f3a"
}
}
}
]
}
Verify the setup
- Send a test page view with ad parameters and no consent, then a
consentevent withis_given: trueand the sameidentity_data. Each request should return{"status": true}. - Check that both events show up in your Recent Activity dashboard (this can take about 5 minutes).
- Send a test purchase for the same visitor. Then ask your Account Manager to confirm it reached the ad platform with the IP address, user agent, and click ID you sent.
If a purchase does not reach the ad platform, check that the events have tracking_consent.is_given: true, that customer_information is inside data, and that the consent event and the purchase use the same identity_data as the ad visit.