Skip to content

Server-Side Postbacks

Server-Side HTTP Request Integration Guide

Server-side postbacks execute as backend HTTP requests from LendingTree's servers to vendor endpoints. They provide guaranteed delivery and access to complete user data including PII and revenue information.

🏷 Available Tokens

Common Tokens

For comprehensive token documentation, see: Complete Tokens & Macros Reference


Session Postbacks

Server-Side Session Tracking

  • HTTP Method: GET / POST
  • Event Trigger: User initial entry to funnel

Token Availability for Session Postbacks

  • Core event tokens are available for all session postbacks
  • User data tokens: ❌ Not available (session start only - no form completion yet)
  • Revenue tokens are available (typically 0 for session events)
  • Session data access: Limited since no form completion has occurred yet
  • URL parameter tokens: Available from initial entry URL via {req.qs.PARAM} patterns

💻 Implementation Examples

Basic Session Tracking

https://example.com/session?sessionid={sessionid}&campaign={campaignid}&clickid={req.qs.clickid}&utm_source={req.qs.utm_source}

Basic POST Session Tracking Payload

{
  "event_type": "session",
  "session_id": "{sessionid}",
  "campaign_id": "{campaignid}",
  "utm_source": "{req.qs.utm_source}",
  "timestamp": "{timestamp}",
  "ip_address": "{ipaddress}",
  "user_agent": "{useragent}"
}


Conversion Postbacks

Server-Side Conversion Tracking

  • HTTP Method: GET / POST
  • Event Trigger: User form completion or conversion

Token Availability for Conversion Postbacks

  • Core event tokens are available for all conversion postbacks
  • User data tokens: ✅ Available (form completion provides contact data)
  • Revenue tokens are available (typically 0 for conversion events)
  • Session data access: Full access to completed form data via {req.sessionData.PROPERTY}
  • URL parameter tokens: Available from initial entry URL via {req.qs.PARAM} patterns

💻 Implementation Examples

Basic Conversion Tracking

https://example.com/conversion?sessionid={sessionid}&email={email}&phone={phone}&campaign={campaignid}&utm_source={req.qs.utm_source}

Basic POST Conversion Tracking Payload

{
  "event_type": "conversion",
  "session_id": "{sessionid}",
  "user_data": {
    "email": "{email}",
    "phone": "{phone}",
    "first_name": "{req.sessionData.contact.firstName}",
    "last_name": "{req.sessionData.contact.lastName}"
  },
  "campaign_id": "{campaignid}",
  "utm_source": "{req.qs.utm_source}",
  "timestamp": "{timestamp}"
}


Payout Postbacks

Server-Side Revenue Tracking via GET / POST Request

  • HTTP Method: GET / POST
  • Event Trigger: Revenue generation or payout attribution
  • Payout Type Required: Yes

Token Availability for Payout Postbacks

  • Core event tokens are available for all payout postbacks
  • Revenue tokens are available and populated based on actual revenue events
  • Session data access provides full access to form submission data via {req.sessionData.PROPERTY} patterns
  • PII data is available in raw format (not hashed) for server-side postbacks
  • Payout Type filtering determines which revenue events trigger the postback ("All", "Payout", "Debit")

💻 Implementation Examples

Basic Revenue Tracking

https://example.com/revenue?sessionid={sessionid}&revenue={publisherrevenue}&advertiser={advertisername}&campaign={campaignid}&external_id={externalidentifier}

Basic POST Revenue Tracking Payload

{
  "event_type": "payout",
  "session_id": "{sessionid}",
  "revenue_data": {
    "amount": "{publisherrevenue}",
    "advertiser": "{advertisername}",
    "external_id": "{externalidentifier}"
  },
  "user_data": {
    "email": "{email}",
    "phone": "{phone}"
  },
  "campaign_id": "{campaignid}",
  "timestamp": "{timestamp}"
}


Platform API Integrations

Facebook Conversion API

Facebook Conversion API Integration for Lead Tracking

  • Portal Name: Facebook Conversion API
  • HTTP Method: POST
  • API Endpoint: https://graph.facebook.com/{API_VERSION}/{PIXEL_ID}/events?access_token={TOKEN}
  • Event Name: Lead

Token Availability for Facebook Conversion API

  • Core event tokens are available for all Facebook conversion postbacks
  • User data tokens are available and automatically SHA256 hashed for Facebook compliance
  • Session data access provides full access to form submission data
  • Facebook cookies are available when users have interacted with Facebook ads

💻 Implementation Examples

Basic Facebook Conversion Setup

  • URL: https://graph.facebook.com/{API_VERSION}/{PIXEL_ID}/events?access_token={TOKEN}

JSON Payload:

{
  "data": [
    {
      "event_name": "Lead",
      "event_time": "{event_time}",
      "event_id": "{sessionid}",
      "event_source_url": "{locationurl}",
      "action_source": "website",
      "user_data": {
        "em": "{email}",
        "ph": "{phone}",
        "fn": "{first_name}",
        "ln": "{last_name}",
        "ge": "{gender}",
        "db": "{dob}",
        "ct": "{city}",
        "st": "{state}",
        "zp": "{zip}",
        "country": "{country}",
        "external_id": "{external_id}",
        "client_ip_address": "{ipaddress}",
        "client_user_agent": "{useragent}",
        "fbc": "{req.cookie._fbc}",
        "fbp": "{req.cookie._fbp}"
      },
      "opt_out": false
    }
  ]
}

Facebook Revenue API

Facebook Conversion API Integration for Revenue Tracking

  • Portal Name: Facebook Revenue API
  • HTTP Method: POST
  • API Endpoint: https://graph.facebook.com/{API_VERSION}/{PIXEL_ID}/events?access_token={TOKEN}
  • Event Name: Lead

Token Availability for Facebook Revenue API

  • Core event tokens are available for all Facebook revenue postbacks
  • Revenue tokens are available and populated based on actual revenue events
  • User data tokens are available and automatically SHA256 hashed for Facebook compliance
  • Session data access provides full access to form submission data
  • Facebook cookies are available when users have interacted with Facebook ads

💻 Implementation Examples

Basic Facebook Revenue Setup

  • URL: https://graph.facebook.com/{API_VERSION}/{PIXEL_ID}/events?access_token={TOKEN}

JSON Payload:

{
  "data": [
    {
      "event_name": "Lead",
      "event_time": "{event_time}",
      "event_id": "{externalidentifier}",
      "event_source_url": "{locationurl}",
      "action_source": "website",
      "user_data": {
        "em": "{email}",
        "ph": "{phone}",
        "fn": "{first_name}",
        "ln": "{last_name}",
        "ge": "{gender}",
        "db": "{dob}",
        "ct": "{city}",
        "st": "{state}",
        "zp": "{zip}",
        "country": "{country}",
        "external_id": "{external_id}",
        "client_ip_address": "{ipaddress}",
        "client_user_agent": "{useragent}",
        "fbc": "{req.cookie._fbc}",
        "fbp": "{req.cookie._fbp}"
      },
      "custom_data": {
        "currency": "USD",
        "value": "{publisherrevenue}"
      },
      "opt_out": false
    }
  ]
}


Snapchat Conversion API

Snapchat Conversion API Integration for Lead Tracking

  • Portal Name: Snapchat Conversion API
  • HTTP Method: POST
  • API Endpoint: https://tr.snapchat.com/v3/{PIXEL_ID}/events?access_token={TOKEN}
  • Event Name: SIGN_UP

Token Availability for Snapchat Conversion API

  • Core event tokens are available for all Snapchat conversion postbacks
  • User data tokens are available and automatically SHA256 hashed for Snapchat compliance
  • Session data access provides full access to form submission data
  • Snapchat cookies are available when users have interacted with Snapchat ads

💻 Implementation Examples

Basic Snapchat Conversion Setup

  • URL: https://tr.snapchat.com/v3/{PIXEL_ID}/events?access_token={TOKEN}

JSON Payload:

{
  "data": [
    {
      "event_name": "SIGN_UP",
      "event_time": "{event_time}",
      "event_id": "{sessionid}",
      "event_source_url": "{locationurl}",
      "action_source": "website",
      "user_data": {
        "em": "{email}",
        "ph": "{phone}",
        "fn": "{first_name}",
        "ln": "{last_name}",
        "ge": "{gender}",
        "db": "{dob}",
        "ct": "{city}",
        "st": "{state}",
        "zp": "{zip}",
        "country": "{country}",
        "external_id": "{external_id}",
        "client_ip_address": "{ipaddress}",
        "client_user_agent": "{useragent}",
        "sc_click_id": "{req.qs.ScCid}"
      }
    }
  ]
}

Snapchat Revenue API

Snapchat Conversion API Integration for Revenue Tracking

  • Portal Name: Snapchat Revenue API
  • HTTP Method: POST
  • API Endpoint: https://tr.snapchat.com/v3/{PIXEL_ID}/events?access_token={TOKEN}
  • Event Name: PURCHASE

Token Availability for Snapchat Revenue API

  • Core event tokens are available for all Snapchat revenue postbacks
  • Revenue tokens are available and populated based on actual revenue events
  • User data tokens are available and automatically SHA256 hashed for Snapchat compliance
  • Session data access provides full access to form submission data
  • Snapchat cookies are available when users have interacted with Snapchat ads

💻 Implementation Examples

Basic Snapchat Revenue Setup

  • URL: https://tr.snapchat.com/v3/{PIXEL_ID}/events?access_token={TOKEN}

JSON Payload:

{
  "data": [
    {
      "event_name": "PURCHASE",
      "event_time": "{event_time}",
      "event_id": "{externalidentifier}",
      "event_source_url": "{locationurl}",
      "action_source": "website",
      "user_data": {
        "em": "{email}",
        "ph": "{phone}",
        "fn": "{first_name}",
        "ln": "{last_name}",
        "ge": "{gender}",
        "db": "{dob}",
        "ct": "{city}",
        "st": "{state}",
        "zp": "{zip}",
        "country": "{country}",
        "external_id": "{external_id}",
        "client_ip_address": "{ipaddress}",
        "client_user_agent": "{useragent}",
        "sc_click_id": "{req.qs.ScCid}"
      },
      "custom_data": {
        "currency": "USD",
        "value": "{publisherrevenue}",
        "referrer_url": "{refererUrl}"
      }
    }
  ]
}


TikTok Conversion API

TikTok Conversion API Integration for Lead Tracking

  • Portal Name: TikTok Conversion API
  • HTTP Method: POST
  • API Endpoint: https://business-api.tiktok.com/open_api/v1.3/pixel/track/
  • Event Name: SubmitForm

Token Availability for TikTok Conversion API

  • Core event tokens are available for all TikTok conversion postbacks
  • User data tokens are available and automatically SHA256 hashed for TikTok compliance
  • Session data access provides full access to form submission data
  • TikTok cookies are available when users have interacted with TikTok ads

💻 Implementation Examples

Basic TikTok Conversion Setup

  • URL: https://business-api.tiktok.com/open_api/v1.3/pixel/track/

JSON Payload:

{
  "pixel_code": "{pixelCode}",
  "event": "SubmitForm",
  "event_id": "{sessionid}",
  "timestamp": "{event_time}",
  "context": {
    "ad": {
      "callback": "{req.cookie.ttclid}"
    },
    "page": {
      "url": "{locationurl}",
      "referrer": "{refererUrl}"
    },
    "user": {
      "external_id": "{external_id}",
      "phone_number": "{phone}",
      "email": "{email}",
      "ttp": "{req.cookie._ttp}"
    },
    "user_agent": "{useragent}",
    "ip": "{ipaddress}"
  }
}

TikTok Revenue API

TikTok Conversion API Integration for Revenue Tracking

  • Portal Name: TikTok Revenue API
  • HTTP Method: POST
  • API Endpoint: https://business-api.tiktok.com/open_api/v1.3/pixel/track/
  • Event Name: CompletePayment

Token Availability for TikTok Revenue API

  • Core event tokens are available for all TikTok revenue postbacks
  • Revenue tokens are available and populated based on actual revenue events
  • User data tokens are available and automatically SHA256 hashed for TikTok compliance
  • Session data access provides full access to form submission data
  • TikTok cookies are available when users have interacted with TikTok ads

💻 Implementation Examples

Basic TikTok Revenue Setup

  • URL: https://business-api.tiktok.com/open_api/v1.3/pixel/track/

JSON Payload:

{
  "pixel_code": "{pixelCode}",
  "event": "CompletePayment",
  "event_id": "{externalidentifier}",
  "timestamp": "{event_time}",
  "context": {
    "ad": {
      "callback": "{req.cookie.ttclid}"
    },
    "page": {
      "url": "{locationurl}",
      "referrer": "{refererUrl}"
    },
    "user": {
      "external_id": "{external_id}",
      "phone_number": "{phone}",
      "email": "{email}",
      "ttp": "{req.cookie._ttp}"
    },
    "user_agent": "{useragent}",
    "ip": "{ipaddress}"
  },
  "properties": {
    "currency": "USD",
    "value": "{publisherrevenue}"
  }
}


Specialized Integrations

Session Ad Pixel

Specialized Session-Based Ad Tracking with Cache Integration

  • Portal Name: Session Ad Pixel
  • HTTP Method: POST
  • Payload Required: Yes
  • Post to Ad Request: Yes

Token Availability for Session Ad Pixels

  • Core event tokens are available for all session ad pixels
  • User data tokens are available and automatically SHA256 hashed for compliance
  • Ad response data: {adresponse} token contains ad-specific response information
  • Revenue tokens: ❌ Not available (non-revenue event)

💻 Implementation Examples

Basic Session Ad Pixel Setup

  • URL: https://example.com/ad-pixel

JSON Payload:

{
  "adresponse": "{adresponse}",
  "campaign": "{campaignid}",
  "emailaddress": "{req.session.contact.email}",
  "first_name": "{req.session.contact.first_name}",
  "last_name": "{req.session.contact.last_name}",
  "sessionid": "{sessionid}"
}