Affilae tracking fundamentals
Discover the most-read articles
Tracking is the mechanism that links a click on an affiliate link to a sale on your website, so the right partner gets paid. This page explains the notions you need before choosing your integration method.
How a click and then a sale get attributed to an affiliate
Affilae relies on two measurements: the click and the conversion. In between, the visitor must stay recognisable. That is the role of the tracking cookie or, in Server-to-Server mode, of the clickID.
If no cookie is available when the conversion happens, Affilae attempts a match by IP address over the same period. Server-to-Server tracking does not depend on the browser at all: it relies on the clickID you store on your side.
The vocabulary of Affilae tracking
- PID (Program ID): the unique identifier of your program. It makes sure conversions land on the right account.
- Key: the identifier of a commission rule. It is made of the rule identifier, a hyphen, then the PID. One rule means one key, so three rules mean three keys to handle in your integration.
- Conversion tag: the small piece of code placed on your confirmation page. It sends the key, a unique order identifier, the amount, the currency, and where relevant the voucher code, the customer identifier or the product identifiers.
- ClickID: the identifier of a click, sent back to Affilae at conversion time in Server-to-Server mode.
- C2S (Client-to-Server): tracking runs through JavaScript executed in the visitor browser.
- S2S (Server-to-Server): your server sends the conversion straight to Affilae, without depending on the browser.
- DataLayer: the JavaScript data container on your website, used by Google Tag Manager to read order information.
Where tracking is configured, and where to find your PID and keys
- Open Manage programs, then click the program you want.
- In the program menu, open Configuration.
- Select the Tracking tab.
- Expand Integration via an Affilae plugin.
- Pick a rule in the Rules and currencies list: the Program ID, the Rule ID, the Key and the Currency appear straight away.

The same tab offers three other methods: Custom integration (Script) with its two blocks Track clicks and Track conversions, Postback – Server-to-Server, and Custom Integration – API.
The settings that decide attribution
Three settings decide who earns the commission. The first two live in the Settings tab of the program, the third one in each rule of the Commission Rules tab.
- URL format: Parameter (the user lands directly on your website with an
?ae=1parameter), Redirect (the click goes through the Affilae tracking domain), or Server-to-Server (S2S). Note that when S2S is active, only redirect links are available to your affiliates. - Attribution mode, in the Attribution method section: First click, Last click or Share. Share splits the commission between every affiliate involved, according to their respective weight.
- Tracking duration (in days), inside each CPA or CPL rule: how long a click can still generate a commission. The field is pre-filled with 30 days when you create a rule from the program configuration, and must stay higher than 0.
Finally, the URL tracking management section lets you adjust the links given to your partners: the Tracking URL field, the Customize tracking URL switch, then Add custom parameter and Add dynamic parameter with variables such as {affiliateName} or {programName}. An advanced option, Redirect clicks through an attribution partner (advanced), exists for mobile attribution platforms.
Choosing your integration method
Client-to-Server is recommended to get started quickly. Server-to-Server is more robust, since it depends neither on the browser nor on ad blockers, but it requires development work.
- Ready-to-use e-commerce plugin for three platforms: Shopify, WooCommerce and PrestaShop. You simply fill in the Program ID and the key inside the plugin.
- Google Tag Manager with our tag templates, a good fit if your website runs on WordPress, Webflow or any other CMS already equipped with GTM.
- Custom integration with the manual C2S guide for other platforms, for example Magento, Wix, Squarespace, BigCommerce or Shopware.
- Server-to-Server with the S2S guide, or S2S through GTM, when your technical team prefers server-side tracking.
What you gain from mastering these notions
- You pick the right integration from day one, and avoid redoing everything after launch.
- You can explain to an affiliate why a sale was attributed to them, or was not.
- You quickly spot the source of an anomaly: missing key, missing tag on the confirmation page, tracking duration too short.
- You announce a clear tracking duration and attribution mode to your partners, which makes your program more attractive.
Good practices before launching
- Check that the click script is present on every page, and the conversion tag only on the order or lead confirmation page.
- Use a unique order identifier for each conversion, to avoid duplicates.
- Send the Order amount – tax excl., without shipping costs, and the correct currency.
- If you create several rules, match each confirmation page with the right key.
- If your conversions happen on a different domain from your clicks, fill in the Conversion domain name (optional) field of the rule.
Use cases
A Shopify store getting started. The advertiser creates a single sale rule, installs the Shopify plugin, pastes the Program ID and the key into it, then places a test order. The click and the conversion appear within 24 hours, and the program opens to affiliates.
A custom website with a long funnel. The technical team goes for Server-to-Server: it collects the clickID from the redirect URL, stores it with the cart, and sends it back to Affilae once the order is validated in the back office. No cookie is needed.
A subscription service. The advertiser creates two rules, one CPL rule for the free trial and one CPA rule for the paid subscription, with two distinct keys. Each confirmation page carries its own key, and the tracking duration of the CPA rule is extended to cover the decision period.
Related articles
- All available integrations
- Testing click and conversion tracking
- Resolving click discrepancies
- How are clicks counted?
- S2S, Server-to-Server
Frequently asked questions
The duration is set rule by rule, in the « Tracking duration (in days) » field of the CPA or CPL rule. The field is pre-filled with 30 days when you create a rule from the program configuration, and must stay higher than 0. Your partners can see this duration on your program page.
The « Tracking duration (in days) » decides whether a sale can still be linked to a past click. The « Delay before payment demand (in days) », set to 0 by default, is the period during which you can still refuse a conversion before it gets locked. Both live in the same rule, but they serve different purposes.
Open your program, then Configuration, Tracking tab, section « Integration via an Affilae plugin ». Pick a rule in the « Rules and currencies » list: the Program ID, the Rule ID, the Key and the Currency appear. The key is made of the rule identifier, a hyphen, then the PID.
Those three platforms have a ready-to-use plugin. For every other platform, two routes exist: Google Tag Manager with our tag templates, or the custom integration with manual C2S. If your technical team prefers server-side tracking, go for Server-to-Server.
In Client-to-Server mode, Affilae attempts a match by IP address over the same period when the cookie is missing, which limits losses without removing them. Server-to-Server does not depend on the browser: it relies on the clickID you store on your side, and remains the most reliable method.
Yes. Each rule generates its own key, which tells Affilae which commission level to apply. If you have three rules, your integration must handle three keys and send the right one depending on the event measured.