# Pixel tool (Postbacks / Callbacks)

## Pixel types

TAP offers different types of Pixels (also called Postbacks or Callbacks):

* **S2S HTTPS** - Server to Server pixel call with GET method
* **Facebook/Instagram API** - Server-Side Conversion Tracking
* **TikTok API -** Server-Side Conversion Tracking
* **Google Ads -** Server-Side Conversion Tracking

\
**S2S HTTPS Pixel** is calling any specified URL with a set of dynamically appended parameters based on the affiliate request.\
**FB/Instagram API, TikTok API** and **Google Ads API** pixels are sending events to the social media platforms using Conversions API.

## Pixel triggering events/actions

Each of the pixels can be triggered on the following events/actions (considering the necessary data was reported to TAP). Affiliates can set more than one pixel definition (triggered on same or different events).

* **Lead -** will be triggered when a new registration is reported to the affiliate platform;
* **Qualified Lead** - will be triggered when a new registration has passed the deal qualifications ***(only for CPL deals)***;
* **FTD** - will be triggered when a new FTD (First-Time Deposit) is reported to the affiliate platform;
* **QFTD** - will be triggered when a new FTD passes all qualifications ***(only for CPA deals)***

## How to create pixel defintion

1. Go to ***'Pixel Definitions***' tab in the affiliate profile and click '***Create***'
2. Write a ***Name*** for the pixel&#x20;
3. Choose the ***Deal*** you want to relate the pixel to. \
   You can choose ***Global*** for any deal, or a specific deal among the different deals configured for the affiliate. Pixels will be fired only for players that are assigned to a deal (any deal or a specific deal, according to the pixel definition).

{% hint style="warning" %}
Pixels are not triggered for conversions from deal type '**None**'&#x20;
{% endhint %}

1. Choose the ***Action on which to trigger*** the pixel
2. Choose the ***Type of Pixel*** and fill in the necessary information.

## Server-to-server pixels (S2S)

Server-to-server pixels are defined as URLs that link to the server location with a set of dynamically appended parameters based on the affiliate request.

{% hint style="success" %}
A typical server-side pixel might look similar to the following:

> **<https://pixelserver.com>?**<mark style="color:blue;">**click\_id=**</mark>**{{afp}}&**<mark style="color:blue;">**lead\_id=**</mark>**{{registration\_id}}**

Where:

* *{{registration\_id}}* - is part of TAP's internal parameters supported out of the box.&#x20;
* *{{afp}}* - is an example of a dynamic custom parameter used by the affiliate to fit dynamic data like click\_id in a PPC campaign etc.
  {% endhint %}

### Additional Parameters&#x20;

{% hint style="warning" %}
Available for **S2S HTTPS** pixels
{% endhint %}

Pixel URLs can include ***Default*** supported parametrs or ***Custom*** parameters. \
TAP will collect any **additional parameters** the affiliate is sending, so later they can passed back in the pixel.

For ***Default*** parameters supported by TAP, explanations can be found in ***'List of Default parameters'*** below or when hovering over the parameter in the Pixel Definition modal.\
Parameters without any explanations will be those collected by TAP from all clicks ever made on the affiliate's tracing links. From the example below, custom parameter is for ***{{click\_id}}.***

<details>

<summary>List of Default parameters</summary>

**{{deal\_id}}** - ID of the deal that is matched to the customer brand, country, source id, campaign id \
\&#xNAN;**{{deal\_group\_id}}** - ID of the deal group that was set in the original link used by customer **{{deal\_group\_name}}** - Name of the deal group \
\&#xNAN;**{{campaign\_id}}** - Campaign ID if it was specified in the original link used by customer \
\&#xNAN;**{{campaign\_name}}** - Campaign name that corresponds to campaign\_id \
\&#xNAN;**{{brand\_id}}** - ID of the brand \
\&#xNAN;**{{brand\_name}}** - Name of the brand \
\&#xNAN;**{{link\_id}}** - ID of the destination link to which customer was redirected \
\&#xNAN;**{{link\_name}}** - Link name that corresponds to link\_id \
\&#xNAN;**{{asset\_id}}** - ID of the media asset if it was specified in the original link used by customer \
\&#xNAN;**{{asset\_name}}** - Media asset name that corresponds to asset\_id \
\&#xNAN;**{{asset\_type}}** - Media asset type that corresponds to asset\_id (e.g. email, banner etc.) \
\&#xNAN;**{{country\_code}}** - 2 symbol country code of the customer used in registration \
\&#xNAN;**{{source\_id}}** - Optional source\_id if it was specified in the original link used by customer \
\&#xNAN;**{{registration\_id}}** - Unique ID of registration in Affiliation system \
\&#xNAN;**{{customer\_id}}** - ID of the customer as it's known in the destination platform \
\&#xNAN;**{{payout}}** - Payout amount for CPA or CPL deals \
\&#xNAN;**{{payout\_currency}}** - 3 symbols currency code of the payout amount \
\&#xNAN;**{{utm\_source}}** - Additional parameter passed by affiliate \
\&#xNAN;**{{utm\_medium}}** - Additional parameter passed by affiliate \
\&#xNAN;**{{utm\_campaign}}** - Additional parameter passed by affiliate \
\&#xNAN;**{{afp}}** - Additional parameter passed by affiliate \
\&#xNAN;**{{afp1}}** - Additional parameter passed by affiliate \
\&#xNAN;**{{afp2}}** - Additional parameter passed by affiliate \
\&#xNAN;**{{afp3}}** - Additional parameter passed by affiliate \
\&#xNAN;**{{afp4}}** - Additional parameter passed by affiliate \
\&#xNAN;**{{afp5}}** - Additional parameter passed by affiliate \
\&#xNAN;**{{afp6}}** - Additional parameter passed by affiliate \
\&#xNAN;**{{afp7}}** - Additional parameter passed by affiliate \
\&#xNAN;**{{afp8}}** - Additional parameter passed by affiliate\
\&#xNAN;**{{afp9}}** - Additional parameter passed by affiliate \
\&#xNAN;**{{deposit}}** - Total deposits known to affiliate system at the moment of sending pixel \
\&#xNAN;**{{registration\_date}}** - User registration date in unix epoch format \
\&#xNAN;**{{first\_deposit\_amount}}** - User first deposit amount\
\&#xNAN;**{{first\_deposit\_date}}** - User first deposit date in unix epoch format

</details>

<figure><img src="https://2789002490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkbip9hFgRFwIv4mXJPnz%2Fuploads%2FI0nxEZJYWAorqRW4XEDd%2Fimage.png?alt=media&#x26;token=12e61217-5f92-4579-9d8e-54fcc3688196" alt=""><figcaption></figcaption></figure>

***If you are an affiliate*****,** go to "Pixels" and click "Create". A creation model will open for you to fill the necessary information.

<figure><img src="https://2789002490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkbip9hFgRFwIv4mXJPnz%2Fuploads%2FEUMSMgF4O8FOhDtUwvwW%2Fimage.png?alt=media&#x26;token=81058661-4899-4e06-ad6d-ac7c42430af8" alt=""><figcaption></figcaption></figure>

## Facebook/Instagram API

\
This feature allows the affiliate platform to send conversion events directly to Facebook or Instagram (via the Conversions API). By sharing this data, you help Facebook Ads or/and Instagram Ads systems optimize campaigns more accurately, resulting in better performance and reporting.

{% hint style="success" %}
As Instagram is a part of the Meta ecosystem, the setup for Facebook Ads Pixel will also apply to Instagram Ads. The same Pixel ID and configuration used for Facebook will track conversions and events on Instagram as well. \
\
Affiliate doesn't need a separate integration just for Instagram, as long as:

* Affiliate's Instagram campaigns are running under the same Meta Business account (and linked to the same Pixel/Data Source)
* Any server-side events sent via the Facebook Conversions API will automatically work for both Facebook and Instagram traffic.
  {% endhint %}

\
**How to set Facebook/Instagram API pixel**

1. Follow the steps for creating a pixel and choose pixel type **FB/Instagram API**&#x20;
2. Set the following details:

* **Facebook Pixel** **ID**: Your unique Pixel (Data Source) ID in Facebook (e.g., `1234567890`).
* **Facebook Access Token:** A valid token granting permission to send conversion events on your behalf. Access token is obtainable via your Facebook Business Manager or Events Manager setting

<figure><img src="https://2789002490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkbip9hFgRFwIv4mXJPnz%2Fuploads%2Fmy9koPNTH7B3KE66806i%2Fimage.png?alt=media&#x26;token=3b602e8d-6802-4c31-bdcc-359ef267287a" alt=""><figcaption></figcaption></figure>

***If you are an affiliate*****,** go to "Pixels" and click "Create". A creation model will open for you to fill the necessary information.

<figure><img src="https://2789002490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkbip9hFgRFwIv4mXJPnz%2Fuploads%2FVAjjYeA0nEuvFH1LVCKT%2Fimage.png?alt=media&#x26;token=063020ab-df85-4063-beda-7ce695b1d583" alt=""><figcaption></figcaption></figure>

\
**What is FBCLID?**

The **FBCLID** (Facebook Click Identifier) is a unique ID, appended to URLs when an user clicks on a Facebook/Instagram ad. It is used to identify the specific ad click. Adding FBCLID is usually not a manual process, but is handled by Meta. \
The affiliate is responsible for passing **FBCLID** upon user's visit (via their tracking link).\
TAP will store the **FBCLID** and will return it in the postback.

{% hint style="success" %}
***How to pass FBCLID to TAP on user visit:***\
1\. Affiliate builds a tracking link from TAP: \_<https://go.aff.theaffiliateplatform.com/1dshoj2_\\>
*2.* Meta appends FBCLID via auto-tagging upon user visit<br>

***Example***:\
\&#xNAN;*<https://go.aff.theaffiliateplatform.com/1dshoj2k>?**fbclid=IwAR0EXAMPLE123abc456XYZ789***
{% endhint %}

## TikTok API

\
**How to set TikTok API pixel**

1. Follow the steps for creating a pixel and choose pixel type **TikTok API**
2. Set the following details:

* **Pixel code :** Your unique Pixel code/ID in TikTok (e.g. `1234567890`).
* **Access token:** A valid token granting permission to send conversion events on your behalf. Access token can be generated in TikTok Business Center (Events Manager or Developer Tools)

<figure><img src="https://2789002490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkbip9hFgRFwIv4mXJPnz%2Fuploads%2F9nOPX6X8k2jtELctK5i7%2Fimage.png?alt=media&#x26;token=cd1ec8d7-b13d-4e6d-a207-cb60dba58c4c" alt=""><figcaption></figcaption></figure>

***If you are an affiliate*****,** go to "Pixels" and click "Create". A creation model will open for you to fill the necessary information.<br>

<figure><img src="https://2789002490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkbip9hFgRFwIv4mXJPnz%2Fuploads%2FYYXlQArsPHKxdNyXqJVw%2Fimage.png?alt=media&#x26;token=16df3fb6-de7e-4a89-9b76-c7d91e1851b4" alt=""><figcaption></figcaption></figure>

**What is TTCLID?**

The TTCLID (TikTok Click Identifier) is a unique ID, appended to URLs when an user clicks on a TikTok ad. It is used to identify the specific ad click. Adding TTCLID is usually not a manual process, but is handled by TikTok. \
The affiliate is responsible for passing TTCLID upon user's visit (via their tracking link).\
TAP will store the TTCLID and will return it in the postback.<br>

{% hint style="success" %}
***How to pass TTCLID to TAP on user visit:***\
1\. Affiliate builds a tracking link from TAP: \_<https://go.aff.theaffiliateplatform.com/1dshoj2_\\>
*2.* TikTok appends TTCLID  via auto-tagging upon user visit<br>

***Example***:\
\&#xNAN;*<https://go.aff.theaffiliateplatform.com/1dshoj2k>?**ttclid=1a2b3c4d5e6f7g8h9i***
{% endhint %}

## Google Ads

**How to set Google Ads API pixel**

1. Follow the steps for creating a pixel and choose pixel type **Google Ads**
2. Set the following details:

* **Conversion ID:** Your unique unique identifier assigned to your Google Ads account (e.g. `AW-123456789`).
* **Conversion Label:** Unique identifier for a specific conversion action within your Google Ads account.

<figure><img src="https://2789002490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkbip9hFgRFwIv4mXJPnz%2Fuploads%2Fxlt5jnohbxM1jCGY4P5b%2Fimage.png?alt=media&#x26;token=c3b559c1-0f2c-4e5c-a4ad-7feb8f58227b" alt=""><figcaption></figcaption></figure>

***If you are an affiliate*****,** go to "Pixels" and click "Create". A creation model will open for you to fill the necessary information.

<figure><img src="https://2789002490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkbip9hFgRFwIv4mXJPnz%2Fuploads%2FYCE3feo0w5NfU7mibpYA%2Fimage.png?alt=media&#x26;token=95810341-7223-46e7-ad3e-70538a392937" alt=""><figcaption></figcaption></figure>

#### What is **GCLID**?

The **GCLID** (Google Click Identifier) is a unique ID, appended to URLs when an user clicks on a Google ad. It is used to identify the specific ad click. Adding GCLID is usually not a manual process, but is handled by Google Ads. \
The affiliate is responsible for passing GCLID upon user's visit (via their tracking link).\
TAP will store the GCLID and will return it in the postback.

{% hint style="success" %}
***How to pass GCLID to TAP on user visit:***\
1\. Affiliate builds a tracking link from TAP: \_<https://go.aff.theaffiliateplatform.com/1dshoj2_\\>
*2.* Google Ads appends GCLID via auto-tagging upon user visit<br>

***Example***:\
\&#xNAN;*<https://go.aff.theaffiliateplatform.com/1dshoj2k>?**gclid=EAIaIQobChMI2MqR0P2h\_gIVkZBoCR0HgEgIO***
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://help.theaffiliateplatform.com/affiliate-platform/pixel-tool-postbacks-callbacks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
