Integration technical guide (for developers)
This page was written to be sent to the technical team of the betting site, broker or affiliate platform that will send the conversions (sign-up, FTD, deposit) to Track4you. It describes the full contract: what Track4you sends to the platform and what the platform needs to send back.
Summary in one sentence
Track4you sends the visitor to your platform with a unique click identifier in the URL. The platform stores that value and, when the conversion happens, calls our postback URL, sending the same value back in the click_id parameter.
Flow overview
1. The visitor clicks the tracking link
https://t4y.io/v2/hJ7kL9mN
2. Track4you records the click and redirects (HTTP 302) to the destination,
adding the unique click identifier:
https://demobet.casino/signup?click_id=3f6c1a2e-8b4d-4e7a-9c15-2d8e0f7b6a41
3. The platform reads the parameter and stores the value with the user's account.
4. When the conversion happens (sign-up, FTD, deposit), the platform
calls the Track4you postback URL (server to server):
GET https://track4you.app/api/v1/webhook/event/hJ7kL9mN?click_id=3f6c1a2e-8b4d-4e7a-9c15-2d8e0f7b6a41&event=ftd&amount=150.00
5. Track4you recognizes the click and sends the conversion to the Meta pixel.Part 1: what Track4you sends to the platform
The tracking link
Each integration generates a short link in this format:
https://t4y.io/v2/{slug}{slug}is an 8-character code that identifies the integration (case-sensitive).- The link accepts UTM parameters (
utm_source,utm_medium,utm_campaign), which are recorded with the click.
The redirect to the destination
On every click, Track4you generates a unique identifier and redirects the visitor (HTTP 302) to the "Redirect Link (Destination)" set up in the integration, adding that identifier in a URL parameter:
https://demobet.casino/signup?click_id=3f6c1a2e-8b4d-4e7a-9c15-2d8e0f7b6a41- Value format: UUID v4, 36 characters (lowercase letters, numbers and hyphens). Example:
3f6c1a2e-8b4d-4e7a-9c15-2d8e0f7b6a41. - A new value for each click. Two clicks from the same visitor generate two different identifiers.
- If the destination already has parameters (
?ref=abc), the identifier is added at the end with&, and the existing parameters are kept.
The parameter name is configurable
By default the identifier goes in the click_id parameter. Since each platform reads the click identifier (sub-id) in a different parameter, the name can be changed in the integration's "URL Identifier" field:
| Option on the screen | How it arrives in the destination URL |
|---|---|
| "click_id (default)" | ?click_id=3f6c1a2e-... |
| "afp" | ?afp=3f6c1a2e-... |
| "utm_source", "utm_medium", "utm_campaign", "utm_content", "utm_term" | ?utm_source=3f6c1a2e-... (and so on) |
| "Custom" | any name with letters, numbers, _ or -, with no spaces. E.g. ?subid=3f6c1a2e-..., ?aff_sub=3f6c1a2e-... |
Check with the platform which parameter it reads
The identifier only comes back in the postback if the platform reads and stores the parameter it arrived in. Each platform uses a name (click_id, clickid, afp, subid, sub1, aff_sub, utm_*...). Ask the platform's support or affiliate manager which URL parameter it receives the affiliate's sub-id/click ID in, and choose that same name in the "URL Identifier".
Chose a UTM parameter?
If the "URL Identifier" is, for example, utm_source, that parameter in the destination URL starts carrying the click identifier. Don't use the same UTM for other information in the destination link.
Part 2: what the platform needs to send back (postback)
The postback URL
On the "Installation" step, the integration shows "Your Webhook URL (Postback)", in this format:
https://track4you.app/api/v1/webhook/event/{slug}?click_id={{click_id}}&event={type}[&amount={{value}}]Examples for each event type:
Sign-up:
https://track4you.app/api/v1/webhook/event/aB3dE5fG?click_id={{click_id}}&event=register
FTD:
https://track4you.app/api/v1/webhook/event/hJ7kL9mN?click_id={{click_id}}&event=ftd&amount={{value}}
Deposit:
https://track4you.app/api/v1/webhook/event/pQ2rS4tU?click_id={{click_id}}&event=deposit&amount={{value}}Parameters
| Parameter | Required | What to send |
|---|---|---|
click_id | Yes | The identifier the platform received in the redirect, exactly the same (same letters, hyphens and length). |
event | Yes | It comes already filled in the URL (register, ftd, deposit or custom). It sets the event that reaches the pixel. Don't change it. |
amount | Only for FTD and Deposit | The conversion value, with a point as the decimal separator and no currency symbol: 150.00, 49.9, 1000. |
The key is always click_id
Even if the "URL Identifier" is afp, subid or a UTM, in the postback URL the key is still click_id=. The only thing that changes is what goes inside the braces: the platform's macro that returns the value received in that parameter.
Example with "URL Identifier" = afp:
Track4you shows: ...?click_id={{afp}}&event=register
The platform uses: ...?click_id={afp}&event=register (platform macro)
Call that arrives: ...?click_id=3f6c1a2e-8b4d-4e7a-9c15-2d8e0f7b6a41&event=registerReplace {{...}} with your platform's macro
{{click_id}} and {{value}} are placeholders: Track4you doesn't fill them in. Before saving on the platform, replace each one with the macro (variable) the platform itself uses to fill in that data when it fires. Each platform has its own syntax:
| Common syntax | Example for the click ID | Example for the value |
|---|---|---|
| Single braces | {click_id} | {amount} |
| Double braces | {{clickid}} | {{payout}} |
| Square brackets | [click_id] | [deposit_amount] |
| Percent signs | %subid% | %value% |
The macro name varies from platform to platform (click_id, clickid, afp, sub1, subid, aff_sub...). Check the platform's postback documentation, or ask its support, which macro returns the value received in the parameter chosen in the "URL Identifier" and which macro returns the deposit amount.
Technical requirements for the call
- Method:
GET, with the parameters in the query string. Don't send a body (JSON or form). - Protocol:
https. - When to fire: one call per conversion, at the moment it happens (server to server). Each integration represents one event type: set up one postback URL for each event on the platform (one for sign-up, another for FTD, another for deposit).
- Response:
HTTP 200with the body{"status":"ok"}confirms receipt.HTTP 404means a wrong slug in the URL. - Special characters: if the platform's macro can contain spaces or accents, the value must be encoded (URL encode). The Track4you identifier doesn't have these characters.
Part 3: how to test
- Open the tracking link (
https://t4y.io/v2/{slug}) in your browser. - When you land on the platform, copy the parameter's value from the address bar (e.g.
click_id=3f6c1a2e-...). - Make a test conversion on the platform (e.g. a sign-up). If the platform has a postback test tool, use the identifier you copied.
- In Track4you, open Integrations → "Event History" and look for the identifier in the search field. The conversion shows up with the type, the pixel and the value.
- In the "Your Integrations" table, the integration status changes to "Receiving data".
A manual call goes to the real pixel
Firing the postback URL by hand (browser, curl, Postman) with a real identifier counts as a real conversion and is sent to the pixel. To validate only the communication with Meta, use the Integration Test Event.
Example of a manual call (replace the identifier with one generated in step 2):
curl "https://track4you.app/api/v1/webhook/event/aB3dE5fG?click_id=3f6c1a2e-8b4d-4e7a-9c15-2d8e0f7b6a41&event=register"Developer checklist
- ☐ The platform reads the parameter chosen in the "URL Identifier" and stores the value with the user's account.
- ☐ The stored value is the whole identifier (36 characters), with no cuts or changes.
- ☐ The postback URL was pasted without changing the domain, the slug and the
event. - ☐
{{click_id}}(or{{afp}},{{subid}}...) was replaced with the platform's macro, and the key is stillclick_id=. - ☐ For FTD and Deposit,
{{value}}was replaced with the value macro, with a decimal point. - ☐ Each event (sign-up, FTD, deposit) has its own postback URL, from the matching integration.
- ☐ The test showed up in the "Event History" and the integration is "Receiving data".
Common problems
| Symptom | Likely cause |
|---|---|
| Integration in "Invalid data" | The postback arrived without the click_id parameter, or with the key changed (e.g. clickid=, afp=). The key has to be click_id. |
| Integration in "Waiting for data" | No postback has arrived yet. Check that the URL was saved on the right event on the platform and that the conversion happened. |
| The postback arrives, but the conversion doesn't show up in the history | The value sent back isn't the one Track4you generated: the macro is wrong (it returns other data), the value was cut, or the visitor didn't go through the tracking link. |
click_id arrives literally as {{click_id}} or {click_id} | The macro doesn't exist on the platform. Check the variable's exact name in its documentation. |
| Wrong FTD/deposit value | Wrong value macro, or a value with a comma. Use a point: 150.00. |
Still have questions? Talk to Track4you support.
