Conversions
Tell LinkLane when a click led to an outcome, such as a signup or a sale. Each conversion is tied to a link, so it shows up in that link's and its campaign's analytics.
These two endpoints need no auth. Your success page or your server calls them.
How attribution works
- Turn on conversion tracking for the link (
track_conversions: true). That needs Pro or above. - On each click, LinkLane adds a click id to the destination:
?ll_cid=<id>. - Your site keeps that id, for example in a cookie or with the order.
- When the outcome happens, send the id back with the pixel or the postback.
Without a click id you can send the link's code instead. LinkLane then credits the link but not one exact click.
| Rule | Detail |
|---|---|
| One per click | A second conversion with the same cid is ignored. Conversions sent by code are not deduplicated. |
| Value | Clamped to 0–1,000,000. Anything that isn't a number counts as 0. |
| Rate limit | 120 requests an hour per IP, shared by both endpoints. |
Parameters
Both endpoints take the same fields: as query parameters on the pixel, as a JSON body on the postback.
| Name | Type | Required | Description |
|---|---|---|---|
cid | string | One of cid or code | The ll_cid value from the click. Up to 64 characters. |
code | string | One of cid or code | The link's short code, when you have no click id. |
event | string | No | Your name for the outcome, such as signup or purchase. Default conversion. Up to 60 characters. |
value | number | No | Money value of the outcome. |
currency | string | No | Three-letter code. Default USD. |
Conversion pixel
A 1×1 GIF. Put it on your thank-you page. It always returns the image, even when nothing was recorded, so it never breaks the page.
<img
src="https://api.linklane.io/api/cv.gif?cid=LL_CID_FROM_THE_CLICK&event=purchase&value=49.99¤cy=USD"
width="1" height="1" alt="" />
Server postback
Records a conversion from your server. Use this when the outcome happens outside the browser, for example after a payment webhook.
- cURL
- JavaScript
- Python
curl -X POST https://api.linklane.io/api/conversions \
-H "Content-Type: application/json" \
-d '{ "cid": "LL_CID_FROM_THE_CLICK", "event": "purchase", "value": 49.99, "currency": "USD" }'
// e.g. in your payment-succeeded handler
await fetch("https://api.linklane.io/api/conversions", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ cid: order.llCid, event: "purchase", value: order.total, currency: "USD" }),
});
import requests
requests.post(
"https://api.linklane.io/api/conversions",
json={"cid": order.ll_cid, "event": "purchase", "value": order.total, "currency": "USD"},
)
{ "ok": true }
ok is false when LinkLane found no link for the cid or code. When you're rate limited, the status is still 202 and the body is { "ok": false, "error": "rate_limited" }.
See the results
Conversions, their total value and the conversion rate appear in link analytics and in campaign analytics in the app. The Conversion tracking guide shows the setup in the app.