S2S – Server-to-Server
Discover the most-read articles
Server-to-Server (S2S) is a click and conversion tracking method that works differently from C2S: the Affilae JavaScript tag is not required. It relies on a unique click identifier, the clickID, which you store on your side and send back to Affilae when the conversion happens.
This clickID is unique and travels as a variable throughout the whole conversion funnel. It is what identifies the partner to be compensated.
Set your program to Server-to-Server
- In the sidebar, open Manage my programs, then click your program name.
- Click Configuration.
- Open the Global Settings section.
- On the URL format field, select Server-to-Server (S2S).
Why use S2S
- Tracking works even with ad blockers.
- Click collection operates independently of user consent.
- You keep full control over the clickID, since you are the one storing it.
- Tracking works on mobile, where cookies are often blocked.
- It is the ideal approach for mobile attribution with a solution such as Branch or Appsflyer.
How it works, from click to conversion
The click
- A user clicks on an affiliate link.
- Affilae generates a unique clickID, for example
603ed1800000000000000000. - The clickID is automatically appended to your landing page:
https://yoursite.com/?aecid=603ed1800000000000000000
Storage
You must store this clickID in a secure cookie, set on the user’s browser when the landing page loads. This cookie must carry the HttpOnly and Secure flags.
The conversion
On the advertiser side, you then send this information back to Affilae. Two options are available.
1. The postback URL. Configure its trigger so that it fires after the conversion is validated by the customer, and populate the cids variable with the collected clickID or clickIDs, separated by a hyphen.
2. The API. The full reference is available on rest.affilae.com/reference.
Upon receipt, Affilae checks whether the clickID is unique and valid. If it is, the conversion is recorded. If the clickID is invalid or duplicated, because of a server error, fraud or any accidental user action, it is rejected.
Headers to send
| HEADER | EXPECTED CONTENT |
|---|---|
x-ae-d-ip |
The client IP v4 or v6, for example 185.179.113.132. |
x-ae-d-ua |
The client user agent, for example Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36. Optional, but strongly recommended. |
Referer |
The referrer, for example https://www.site.fr. |

Implementation checklist
- Program configured as S2S in Affilae.
- The
aecidparameter is received on your landing page. - A cookie stores the clickID or clickIDs, with the HttpOnly and Secure flags.
- The cookie is read to transmit the clickIDs on conversion, by postback or by API.
- Testing.
Key considerations
- The clickID is always 24 characters long, for example 603ed1800000000000000000.
- Cookies must be HttpOnly and Secure.
- Test with multiple user journeys.
- Verify that conversions are properly recorded in Affilae.
Related articles
- Affilae tracking fundamentals
- S2S – GTM
- S2S – Appsflyer
- Automating conversion tracking via API
- Testing click and conversion tracking
Frequently asked questions
Voir plus de questions reponses
S2S does not rely on the Affilae JavaScript tag. Tracking goes through a unique click identifier, the clickID, which you store server-side and send back to Affilae at conversion time. S2S therefore keeps working with an ad blocker, or on a mobile device that blocks cookies.
In Manage my programs, open your program, then Configuration and the Global Settings section. On the URL format field, select Server-to-Server (S2S). This setting switches tracking links to redirect mode.
A clickID is always 24 characters long, for example 603ed1800000000000000000. It reaches your landing page in the aecid parameter of the URL.
Depending on your program’s session duration or geofencing settings, the clickID can be ignored, and it is then not appended to the landing page. Check both settings before concluding there is an integration problem.
In a cookie set on the user’s browser when the landing page loads. This cookie must carry the HttpOnly and Secure flags. At conversion time, you read the cookie back to transmit the clickID or clickIDs.
Both options are valid. The postback URL fires after the conversion is validated by the customer, with the clickIDs in the cids variable separated by a hyphen. The API gives you more control, its reference is published on rest.affilae.com/reference.
It is rejected. Upon receipt, Affilae checks whether the clickID is unique and valid. A clickID that is invalid or duplicated, because of a server error, fraud or any accidental user action, does not create a conversion.
No. CMP implementation remains mandatory, even though click collection operates independently of user consent.