---
title: "Server-to-Server (S2S) Postback"
description: "Server-to-Server (S2S) Postback integration allows advertisers to send measurement and conversion events directly to MomentScience from their server...."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.momentscience.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Server-to-Server (S2S) Postback

# Overview

Server-to-Server (S2S) Postback integration allows advertisers to send measurement and conversion events directly to MomentScience from their server. This method provides a reliable way to track conversions without requiring client-side implementation on conversion pages.

When MomentScience sends traffic to your landing pages, we include an `adpx_click_id`parameter in the URL. You store this identifier with the user session, then send it back to us via postback when conversions occur.

## Key Benefits

- **No client-side dependencies:** Track conversions without JavaScript, ideal when browser-based tracking is restricted or unreliable
- **Multi-event attribution:** Record multiple conversion actions per user session with dynamic payout values
- **Privacy-compliant:** Meet GDPR/CCPA requirements with server-side data handling
- **Cross-platform support:** Works with mobile apps, backend systems, and any environment that can make HTTP requests

## Prerequisites

Before you begin, ensure you have:

- Technical capability to capture URL parameters from incoming traffic
- Server infrastructure to store click identifiers and trigger postbacks

# How S2S Postback Works

1. **MomentScience sends traffic** to your landing page with `adpx_click_id` parameter
2. **Your system captures** the `adpx_click_id` and stores it with the user session
3. **User completes an action** (purchase, signup, etc.)
4. **Your server sends a postback** to MomentScience with conversion details


# Integration Steps

## Step 1: Capture the Click ID from Incoming Traffic

When MomentScience sends traffic to your landing page, capture the `adpx_click_id` parameter from the URL and store the `adpx_click_id` value with the user's session. The method depends on your technology stack.

The `adpx_click_id` must be stored reliably. If this value is lost, you won't be able to attribute conversions back to MomentScience.

Example Landing Page URL

> https\://yourdomain.com/landing-page?adpx\_click\_id=abc123def456\&other\_param=value

> **Note**
>
> If your system already reads click IDs from its own landing page parameter (for example `click_id` or `clickid`), MomentScience can send the click ID in that parameter instead. Ask your account manager to set this up. If you don't have such a parameter, use `adpx_click_id`. It is the recommended default.

## Step 2: Configure Your Postback URL

Configure your system to send postbacks to the MomentScience tracking endpoint. Every postback starts with this base URL:

> https\://trk.pubtailer.com/track/

Keep the trailing slash after /track/. Requests to /track without it can be rejected.

In the examples on this page, &#x7B;BASE\_URL\} stands for that address. Add the query string for the event you are tracking after it.

Examples:

Track a measurement event 

> &#x7B;BASE\_URL\}?click-id=&#x7B;ADPX\_CLICK\_ID\}\&measurement=1\&event=&#x7B;EVENT\}

Track a payable event (CPA only)

> &#x7B;BASE\_URL\}?click-id=&#x7B;ADPX\_CLICK\_ID\}\&measurement=1\&event=&#x7B;EVENT\}\&payout=&#x7B;PAYOUT\}

Track a payable event with sale value (ROAS)

> &#x7B;BASE\_URL\}?click-id=&#x7B;ADPX\_CLICK\_ID\}\&measurement=1\&event=&#x7B;EVENT\}\&payout=&#x7B;PAYOUT\}\&sale\_amount=&#x7B;AMOUNT\}

Conversions attribute to the original click for 30 days by default. Ask your account manager if your offer needs a different window.

> **Note**
>
> For the event parameter, you can use any event identifier that your offer supports. Common choices include `mosci`, `conversion`, `purchase`, or any custom event name.

### URL Parameters Reference

| **Parameter** | **Type** | **Required** | **Description**                                                                                                                                                                     |
| ------------- | -------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `click-id`    | String   | Yes          | The `adpx_click_id` value received from incoming traffic                                                                                                                            |
| `measurement` | Integer  | Conditional  | Must be set to `1`. Required whenever you send an `event`, with or without a `payout`.                                                                                              |
| `event`       | String   | Conditional  | Event type identifier (e.g., `purchase`, `signup`, `conversion`). Required for event-based and variable payout tracking; can be sent without `payout` for no-payout event tracking. |
| `payout`      | Decimal  | Conditional  | Payout amount for the conversion in USD (e.g., `25.50`). Only required when the event carries a payout, omit it for no-payout event tracking.                                       |
| `sale_amount` | Decimal  | No           | Sale amount for CPS goal tracking.                                                                                                                                                  |

## Step 3: Trigger Postbacks on Conversion Events

When a user completes a conversion action, send a postback to MomentScience with the stored `adpx_click_id`.

The curl examples below read the base URL from a shell variable. Set it once before running them:

> BASE\_URL="https\://trk.pubtailer.com/track/"

### Example Postback URLs

Signup Event (No Payout)

> curl -X GET "$&#x7B;BASE\_URL\}?click-id=abc123def456\&measurement=1\&event=signup" \\
>   -H "Accept: \*/\*" \\
>   -H "Cache-Control: no-cache"

Purchase Event with Payout

> curl -X GET "$&#x7B;BASE\_URL\}?click-id=abc123def456\&measurement=1\&event=conversion\&payout=25.00" \\
>   -H "Accept: \*/\*" \\
>   -H "Cache-Control: no-cache"

Lead Generation

> curl -X GET "$&#x7B;BASE\_URL\}?click-id=abc123def456\&measurement=1\&event=lead\&payout=5.00" \\
>   -H "Accept: \*/\*"

Subscription with Payout and Sale Amount (for CPS)

> curl -X GET "$&#x7B;BASE\_URL\}?click-id=abc123def456\&measurement=1\&event=subscription\&payout=29.99\&sale\_amount=149.99" \\
>   -H "Accept: \*/\*"

> **Caution**
>
> Use lowercase event names with underscores (e.g., `profile_complete`, `trial_start`). Keep names descriptive but concise, avoid special characters except underscores, and limit to 50 characters maximum.

> **Tip**
>
> You can send multiple postbacks for the same `adpx_click_id` if multiple conversion events occur. For example, a user might sign up (first event) and then make a purchase (second event) within your defined conversion window.

# Postback Response Codes

MomentScience returns HTTP status codes to indicate the result of your postback request:

| **Status Code**  | **Meaning**                      | **Action Required**                        |
| ---------------- | -------------------------------- | ------------------------------------------ |
| `200 OK`         | Conversion successfully recorded | No action needed. Do not resend.           |
| Any other status | Request failed or error occurred | Retry the request with exponential backoff |

> **Caution**
>
> Only retry postbacks that receive a non-200 status code. If you receive a `200 OK` response, the conversion has been recorded successfully and should not be sent again.

***

If you encounter any issues during integration or have questions about S2S postback tracking, contact us [help@momentscience.com](mailto:help@momentscience.com).

Source: https://docs.momentscience.com/advertisers/s2s-postback/index.mdx
