Install the pixel and connect your store
Copy the pixel code, install it on every page, create an API key and send paid orders through a signed call.
Two elements link your store to the platform:
- the tracking pixel: a small script that remembers the affiliate's click in the visitor's browser on your store;
- the signed call: your store sends each paid order (and each refund) to the platform, with an API key.
Both are on https://affiliations.online/app/integration (menu Integration, Account group). You must create the program first. Otherwise the page shows "Create your program to get your code.".
Install the pixel
- Open https://affiliations.online/app/integration. Expected result: the "Tracking pixel" title and the "Code to install" card appear, with a line of code of the form
<script async src="https://affiliations.online/pixel.js?p=prg_…"></script>. - Click the copy button under the code.
- Paste this code on every page of your store, just before the closing
</body>tag. - Save and publish your changes in your store tool. Expected result: the pixel weighs under 10 KB. The cookie is only set after the visitor consents (a banner is provided, with a text adapted to their region).
The "How it works" panel sums up: the visitor clicks an affiliate's link and lands on your store with a click identifier; if the visitor consents, the pixel remembers this identifier for the cookie duration; the sale is attached to this click when your store sends the order.
Check that the pixel is detected
The Integration page shows no detection indicator. Detection is checked elsewhere:
- Open a page of your store in a browser, so the pixel loads at least once from the address declared in the program.
- Open https://affiliations.online/app/verification and look for the line "Pixel installed and seen on the store" in the "Going live" card. Expected result: the line is ticked. It changes at most once per hour: wait, then reload the page.
The platform considers the pixel installed when it is loaded from the store domain given in the "Store URL" of your program.
Create an API key
This step is reserved for the owner. It is used to sign your store's calls.
- Further down the same page, in the "API keys" card, enter a "Label (optional)", for example "WooCommerce".
- Click Create a key. Expected result: the "Copy your secret now" block shows the "Key identifier" and the "Signing secret". It will never be shown again.
- Click Copy the key identifier and Copy the signing secret, then store them somewhere safe (password manager, your server's environment variables).
- To remove a lost or compromised key, click Revoke next to it and confirm. Calls signed with this key will be refused: this is irreversible. Create another one.
The number of active keys is limited. The Create a key button is greyed out when the limit is reached.
Send a paid order
Your developer calls POST /api/conversions on https://affiliations.online, with three headers:
X-Aff-Key: the key identifier;X-Aff-Timestamp: the time in Unix seconds (tolerance set by the platform);X-Aff-Signature:sha256=followed by the HMAC-SHA256 of "timestamp + "." + raw body", computed with the secret.
The body contains in particular orderId, amountMinor, currency, clickIds and source. Amounts are whole minor units (no decimals). The same order sent twice is counted once. For a refund, call POST /api/refunds with orderId, refundId, amountMinor and currency. The "Send a paid order" panel gives a full example.
Follow the calls received
The "Received calls log" panel lists each call: date, event, order and result ("Accepted", "Duplicate ignored", "Rejected", "Ignored"). A reason goes with the cases that are not accepted: "No attributable click", "Affiliate suspended", "Unknown order", "Order without commission", "Commission already closed", "Refund too late".
Common problems
| Symptom | Cause | Solution |
|---|---|---|
| The "Pixel installed and seen" line stays unticked | The code is not on the page, or the loaded domain does not match the "Store URL" | Check that the code is on every page and that the program address is your public store. |
| No click is kept | The visitor did not accept the consent banner | This is normal: without consent, no cookie is set. |
| Call refused: "Invalid signature, key or timestamp." | Wrong secret, body changed before signing, server clock off | Sign the exact raw body, synchronize the server clock. |
| "The order amount must be a strictly positive integer, in minor units of the currency." | Amount with decimals | Send whole minor units. |
| "The order currency differs from the program currency." | Wrong currency | Send the program currency. |
| "The buyer email is required for an attributed sale." | Buyer email missing | Add the buyer email to the call. |
| Result "No attributable click" | The order has no valid click identifier | Pass the clickIds kept by the pixel. |
| Lost secret | It is shown only once | Revoke the key and create another one. |
Points to verify
- The WooCommerce connector is announced: "The WooCommerce connector will use these same calls; until then a developer can send them from your store." No ready-to-install connector is described here.
- The exact field of the click identifier kept by the pixel, and how to read it in your store, are not detailed on screen. Ask the team for the technical documentation if your developer needs it.
- The signature timestamp tolerance is a platform setting: the screen gives it in the help text.