How Clakta tracking works

The path a visitor takes from an ad click to an attributed order, and which part of the system is responsible for each step.

Understanding the flow makes every troubleshooting question easier to answer. There are four moving parts, and each one can fail independently.

The flow

  1. A visitor clicks an ad. The destination URL carries a clkt parameter that the ad platform filled in with its own macros — platform, placement, campaign id, ad set id and ad id.
  2. The script records the landing. It reads the URL, captures the clkt value and the UTM parameters, and sends a page view tied to a session.
  3. The visitor browses and buys. Further page views and ecommerce events — product views, add to cart, checkout started — extend the session.
  4. Your server reports the order. When the purchase actually completes, your backend posts it to the Orders API with the tracking context that came from the browser.

Clakta then walks backwards from the order through the visitor's touchpoints, keeps the ones inside the attribution window, and assigns credit using the project's attribution model.

The clkt parameter

This is what makes ad matching work. It is a single URL parameter with five colon-separated segments:

clkt={platform}:{source}:{campaignId}:{adSetId}:{adId}

A real Meta click resolves to something like:

clkt=fb:facebook:120210000000:120211111111:120212222222

Each platform writes it with its own dynamic macros, so you set the template once per platform and the platform fills in the values on every click. Google has no ad set concept, so that segment arrives as null and is stored as empty rather than as the literal string.

Clakta normalizes the platform token, so fb, facebook, instagram and ig all resolve to meta; google, google_ads and youtube all resolve to google.

Setting this up is covered in Tag your ad URLs.

Sessions

A session groups everything one visitor did in one sitting. How it is established depends on your project's tracking mode:

  • Full attribution — the script creates a session id in the browser and sends it with every event, so the same visitor is recognised across page loads and, over time, across visits.
  • Privacy-friendly — no identifier is stored in the browser. The server derives an anonymous daily session hash from the request's IP, User-Agent and site domain. It links events within a day but not across days.

See Tracking modes for the full comparison.

Linking the order back to the session

When your backend posts an order, it passes a tracking object. This is what connects a server-side purchase to the browser session that produced it:

FieldPurpose
clktThe ad click that brought the visitor in.
utm_source, utm_medium, utm_campaign, utm_contentStandard campaign parameters, kept for reporting.
sessionIdThe browser session the order belongs to. Ignored in privacy-friendly projects.
domainThe hostname the purchase originated on. Required for privacy-friendly projects with more than one tracking domain.

For privacy-friendly projects you also pass the shopper's ip and userAgent so the server can recompute the same anonymous session hash the page views got. Pass the shopper's values as your storefront saw them — not your server's.

What can go wrong, and where

SymptomWhere the problem is
No events at allThe script is not loading, or the domain is not in the allowlist.
Events but no ordersYour backend is not posting to the Orders API.
Orders with no campaign dataYour ad URLs are missing the clkt parameter.
Orders with clkt but no sessionThe sessionId (or the IP/User-Agent pair) is not being forwarded from the browser to your backend.
Spend but no conversionsAd accounts are connected, but tracking is not — check the two rows above.

Related articles