Article

S2S – Server-to-Server

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.

Prerequisites: your program’s URL format must be set to Server-to-Server (S2S). This setting switches tracking links to redirect mode and validates conversions server-side. CMP implementation remains mandatory.

Set your program to Server-to-Server

  1. In the sidebar, open Manage my programs, then click your program name.
  2. Click Configuration.
  3. Open the Global Settings section.
  4. On the URL format field, select Server-to-Server (S2S).
Affilae
MANAGE MY PROGRAMS
My program
Configuration
My affiliates
Medias
Clicks
Conversions
Payments
The « Configuration » item in the program menu, advertiser side.

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

  1. A user clicks on an affiliate link.
  2. Affilae generates a unique clickID, for example 603ed1800000000000000000.
  3. The clickID is automatically appended to your landing page: https://yoursite.com/?aecid=603ed1800000000000000000
Warning: depending on your program’s session duration or geofencing settings, the clickID may be ignored and will then not be appended to the landing page.

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.

https://lb.affilae.com/?key=5d6e34da18022f2871ee0c93-5d6e34ab18022f2871ee0c61&id={{UNIQUE_ID}}&amount={{AMOUNT}}&payment={{PAYMENT}}&customer={{CUSTOMER_ID}}&cv={{SUB_ID}}&voucher={{VOUCHER_CODE}}&currency=EUR&cids={{CLICK_IDS}}

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.
Diagram of the S2S journey, from the click to clickID storage and then the conversion
The journey of a clickID, from click generation to conversion recording.

Implementation checklist

  1. Program configured as S2S in Affilae.
  2. The aecid parameter is received on your landing page.
  3. A cookie stores the clickID or clickIDs, with the HttpOnly and Secure flags.
  4. The cookie is read to transmit the clickIDs on conversion, by postback or by API.
  5. Testing.

Key considerations

Tip: test several user journeys before opening your program, and check every time that the conversion reaches Affilae. A clickID sent incorrectly triggers no visible error, conversions are simply missing.
  • 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

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.

Need help?

Stay up to date with the latest trends in affiliate marketing and never miss any of our articles.

Contact Us