The /lp endpoint (gclid joins, direct and organic clicks)
Request and response contract of POST /lp, which returns the click ID a landing page should keep.
Last updated 4 min read
POST https://trackcrown.com/lp is the call the landing-page SDK
makes on page load. Call it yourself when you cannot use the script — for example from a single-page app or a
server-rendered landing page. It answers with the click ID the page should keep and report conversions with.
Request#
Response#
{"click_id":"0192f3c1a2b4e1f0c9d84b2a7e6f5d3c","source":"gclid"}The tracking domain answers in this order:
A parallel-tracking click is found immediately, even while it is still waiting to be written to the reporting database (the recent-click cache is checked first).
Direct and organic clicks get the visitor's IP, geo, device, user agent, language and referrer, are checked for
uniqueness (same key as tracking links: offer, partner, IP and user agent within 24 hours) and get fraud flags. They
are reported with link type direct, status reason lp (or organic).
Errors#
All errors are JSON {"error":"…"}.
Examples#
Parallel tracking on a shared brand domain, where the landing page only knows the gclid:
curl -s https://trackcrown.com/lp -H 'Content-Type: text/plain' \
-d '{"gclid":"EAIaIQobChMI","url":"https://www.example.com/?gclid=EAIaIQobChMI"}'
# {"click_id":"0192f3c1a2b4e1f0c9d84b2a7e6f5d3c","source":"gclid"}Direct visit for a partner's direct link:
curl -s https://trackcrown.com/lp -H 'Content-Type: text/plain' \
-d '{"offer":"SHOP01","aff":"partner7","url":"https://www.example.com/?sub1=summer","referrer":""}'
# {"click_id":"0192f3c5…","source":"direct"}Browser code without the SDK:
fetch("https://trackcrown.com/lp", {
method: "POST",
headers: { "Content-Type": "text/plain" },
body: JSON.stringify({ offer: "SHOP01", gclid: new URL(location.href).searchParams.get("gclid") || "",
url: location.href, referrer: document.referrer }),
}).then((r) => r.json()).then((r) => { if (r.click_id) localStorage.setItem("atk_cid", r.click_id); });Google Ads auto-tagging#
Google's auto-tagging adds gclid (or gbraid / wbraid on iOS) to the final URL. With a transparent tracking
template, the tracker reads them from the url= value of the click, so the template never needs {gbraid} or
{wbraid} tags — Google has no such ValueTrack parameters. The same values on the landing page then join the click
through /lp.