> For the complete documentation index, see [llms.txt](https://docs.platform.gamezop.com/publishers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.platform.gamezop.com/publishers/guides/session-performance-postbacks-spp.md).

# Session Performance Postbacks (SPP)

### Why do I need this?

If your app or website rewards users for completing tasks (like playing games or engaging with content) you need visibility into the value each user actually generates. SPP gives you that insight.

For example, if you’ve added a “Play Games” section powered by Gamezop, you can use these postbacks to know approximately how much revenue each session drove. This lets you distribute rewards fairly while keeping your program profitable.

***

### How it works

Steps you need to follow to consume our Session Performance Postbacks:

#### **Step 1: Create a Postback URL**

Set up an endpoint on your server where we can send session data via HTTP POST after every user session.

Your Postback URL should:

* Accept POST requests containing JSON data (details below).
* Respond with HTTP 200 when you successfully record the data.
  * Any other status code will be treated as a failure on your end.

Optionally, you can secure the postbacks using Bearer Token authentication. Just share your token with us when you provide the Postback URL, and we’ll include it in the `Authorization` header for every request.

#### **Step 2: Append a User ID when sending users to us**

When redirecting users to any Gamezop link, append a `sub` parameter to pass a unique user identifier. This lets us include that same identifier in the postback payload we send to your server.

For example, if you’re [embedding games via the All Games API](/publishers/gamezop/types-of-integration/all-games-api.md) and a game’s URL is:

```
https://www.gamezop.com/g/9lpHai56Q
```

and your user’s unique ID is `d73e8d1d`, open:

```
https://www.gamezop.com/g/9lpHai56Q?sub=d73e8d1d
```

We’ll then include sub: `d73e8d1d` in the data payload of the SPP for that session.

{% hint style="success" %}
**Important:** The `sub` parameter and our SPP feature works not just for direct game links, but for all pages across all our products (such as Quizzop, Astrozop, and so on).
{% endhint %}

#### **Step 3: Receive and process the Postback payload**

After each user session ends, we’ll send a POST request to your Postback URL with a JSON body containing all relevant metrics for that session. This data helps you record and act on each user’s performance and revenue contribution.

A typical payload looks like this:

```json
{
  "user-id": "sub1",
  "session-id": "b48a8368-a369-49a4-b427-2d5891ef3763",
  "country": "IN",
  "count-of-ads-viewed": 1,
  "your-estimated-revenue": "0.000012",
  "session-duration": 163,
  "property-id": "1234"
}
```

Notes on the payload fields:

<table><thead><tr><th width="190.41796875">Key</th><th>Description</th></tr></thead><tbody><tr><td>user-id</td><td>This is the <code>sub</code> value sent by you to us</td></tr><tr><td>session-id</td><td>Unique identifier for the user's session generated by us (useful for deduplication)</td></tr><tr><td>country</td><td>The <a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO 3166-1 alpha-2 country code</a> for the country where the conversion was recorded</td></tr><tr><td>count-of-ads-viewed</td><td>Our <strong>estimate</strong> on the number of ads viewed by the user in that particular session</td></tr><tr><td>your-estimated-revenue</td><td>Our <strong>estimate</strong> of <a data-footnote-ref href="#user-content-fn-1">your share</a> of ad revenue generated in that particular session, in USD</td></tr><tr><td>session-duration</td><td>Duration of the session, in seconds</td></tr><tr><td>property-id</td><td>Your <a data-footnote-ref href="#user-content-fn-2">Property ID</a> against which that user session was recorded</td></tr></tbody></table>

Upon receiving our postback, your server should:

* Validate the Bearer Token, if you chose to enable it.
* Record the payload data into your system.
* Respond with HTTP 200 upon success.

***

### Other notes

* Ad networks do not provide session-level revenue data in real time. To ensure timely reporting, we estimate session revenue using your historical performance data and other signals. **This number should NOT be taken as a guarantee of booked revenue.** We recommend maintaining a sufficient buffer in your reward calculations to account for any such variance.
* For each user session, you’ll receive the Session Performance Postback approximately **10–12 minutes after that session ends**.
* When your users open our products, ad network crawlers may also load those same URLs (including your `sub` query parameter) to inspect page content. To the best of our ability, we detect known self-identifying bots and exclude their sessions from postbacks.

[^1]: Important to note. This amount is **after** removing Gamezop's share of ad revenue.

[^2]:


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.platform.gamezop.com/publishers/guides/session-performance-postbacks-spp.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
