Skip to main content

Ad tracking on Meta ads

Manual setup, one snippet per ad — this page documents what we need, why, and how to install it.

Overview

One snippet, every ad

Meta's API doesn't expose a safe path to update URL parameters on a live ad without disrupting its delivery history. Kleerr provides one Meta-native snippet — copy it once, paste it into each ad's URL parameters field in Ads Manager. Macros resolve at click time, so every click flows through with the right campaign / ad-set / ad IDs attached.

Why this matters

Without these parameters on every ad, Kleerr can't tell you which placement — Facebook feed, Instagram Stories, Reels, or Audience Network — drove the sale, or which ad set is actually working. Meta's own attribution conflates them. Yours doesn't have to.

What each parameter captures

Each {{macro}} is a Meta-native placeholder that resolves to a real ID at click time.

ParamMacroResolves to
klr_phardcodedAlways meta. Identifies the platform.
klr_n{{site_source_name}}Surface code: fb, ig, an (Audience Network), msg (Messenger), th (Threads).
klr_c{{campaign.id}}Campaign ID — joined to campaign name and spend via the Marketing API.
klr_ag{{adset.id}}Ad set ID — Meta's middle hierarchy level.
klr_a{{ad.id}}Ad / creative ID — joined to creative metadata via the API.

Install it yourself

Copy the snippet and paste it into each ad’s URL parameters field in Meta Ads Manager.

URL Parameters

klr_p=meta&klr_n={{site_source_name}}&klr_c={{campaign.id}}&klr_ag={{adset.id}}&klr_a={{ad.id}}
  1. 1

    Open Meta Ads Manager and select an ad

    In the Ads tab, filter to the ads you want to track. Click an ad row, then click Edit.

  2. 2

    Find the URL parameters field

    Scroll the Edit panel to the Tracking section. The URL parameters field sits below Website URL.

  3. 3

    Paste the Kleerr template into URL parameters

    Use the snippet above. Paste as-is — no leading "?". Meta auto-formats it for you.

  4. 4

    Click Publish

    Publishing keeps the ad in active delivery and preserves the ad set's learning history. No re-review delay.

  5. 5

    Repeat for every active ad

    Meta has no campaign- or ad-set-level cascade for URL parameters — each ad needs the snippet pasted on its own.

  6. 6

    Verify in Kleerr

    Open Kleerr → Advertising → Ad Tracking → click Verify on the Meta row. The tracked / total counter updates within seconds.

Watch the walkthrough

The full flow in Meta Ads Manager — open Edit, paste the snippet into URL parameters, Publish.

Verify your installation

Open Kleerr → Advertising → Ad Tracking. The Meta row shows the count of active ads carrying Kleerr params. Click Verify to force a fresh read.

Why is this manual?

Meta’s API doesn’t expose a safe path to update URL parameters on a live ad without disrupting its delivery history. Pasting once per ad in Ads Manager is non-destructive and preserves the ad’s learning phase. Kleerr verifies coverage but never writes to Meta.