Analytics & data
Conversion tracking
Attribute leads, sales and signups to the click that brought them, with a click ID, a JavaScript snippet, server-to-server postbacks or the API.
Every recorded click gets a short, unique click ID. Pass it to your site, report it back when someone converts, and Letlink attributes the lead, sale or signup to the exact link, campaign, country and device.
1. Send the click ID to your site
Turn on Append click ID on the link. Visitors then arrive with ?lk_click=… on the destination. You can rename the parameter in the conversion settings — many affiliate networks expect subid or clickid.
Or place tokens in the destination URL yourself. {click_id} is replaced with the click ID (and nothing is appended), and these work too: {slug}, {country}, {device}, {utm_source}, {utm_medium}, {utm_campaign}, {utm_term}, {utm_content}.
https://shop.example.com/offer?subid={click_id}&src={utm_source}&geo={country}
2a. Report conversions from the browser
Add the snippet to every page of your site. It keeps the click ID in a first-party cookie and local storage, then reports conversions when you call letlink().
<script>window.letlink=window.letlink||function(){(letlink.q=letlink.q||[]).push(arguments)};</script>
<script async src="https://letl.ink/t.js" data-param="lk_click"></script>
<!-- on the thank-you page -->
<script>
letlink('sale', { value: 49.90, currency: 'USD', order_id: 'ORDER-123' });
</script>
Events are lead, sale, signup and custom (with event_name). Optional fields: value, currency (ISO code), order_id, email (used by the SendGrid and Mailchimp integrations) and metadata (a small object of extra fields).
2b. Report conversions server to server
Shops, CRMs and affiliate networks can call the postback URL with GET or POST:
https://letl.ink/postback?click_id={click_id}&event=sale&amount=49.90¤cy=USD&txid=ORDER-123
- Click ID:
click_id,clickid,cid,subid,sub_id,aff_sub. - Amount:
amount,payout,value,revenue. A negative amount is a refund. - Transaction:
txid,transaction_id,order_id. - Status:
approved(default),pending,declinedorrefunded. Report a pending sale first and approve it later with the same transaction ID. - Postback key: set one in the conversion settings and add
key=…to every postback; postbacks without it are refused.
Or call POST /api/v1/conversions with your API token (Growth and Ultimate).
Answers
The postback and the API always answer 200 with an X-Letlink-Result header: created, updated (a new status for a known transaction), duplicate, unknown_click, bad_key, outside_window, not_allowed (plan) or invalid. Retrying never helps, so networks should not.
Deduplication and attribution
- A conversion is counted once per click ID, event and transaction ID, whichever channel reports it first.
- Attribution is last click: the snippet always keeps the most recent click ID.
- A conversion counts only within the attribution window after its click — 30 days by default, adjustable from 1 to 365 days.
Send conversions to your ad platforms
On Growth and Ultimate, switch on Forward approved conversions to send them as purchase, lead and sign-up events to the Meta, TikTok, LinkedIn, Pinterest, Snapchat and Reddit Conversions APIs and your analytics integrations, matched to the original ad click. Google Tag Manager, Adobe Analytics, SendGrid and Mailchimp always receive them.