Skip to main content

Ad Click IDs on Clicks (fbclid, gclid, ttclid)

How Trackdesk captures ad platform click IDs — gclid (Google Ads), fbclid (Meta Ads), and ttclid (TikTok Ads) — on every tracked click.

Written by David Rolenc
Updated yesterday

When an affiliate drives paid traffic through Google Ads, Meta Ads, or TikTok Ads, those platforms append a unique click identifier to the destination URL. Trackdesk automatically captures this identifier on every tracked click so you can attribute conversions back to specific ad platforms and forward the value downstream to your own reporting or server-to-server postbacks.

This article explains which ad click IDs Trackdesk supports, how they are captured, how they appear in the click report, and how to forward them through postbacks.

Supported ad click IDs

Trackdesk recognises three ad platform click ID query parameters on the incoming URL:

  • gclid — Google Ads click ID, added automatically when auto-tagging is enabled on your Google Ads account.

  • fbclid — Meta (Facebook and Instagram) Ads click ID, added automatically to outbound links from Meta ad placements.

  • ttclid — TikTok Ads click ID, added automatically to outbound links from TikTok ad placements.

The parameter names are case-sensitive and must appear exactly as shown. You do not need to add them manually — each ad platform appends its own click ID to the final URL at click time.

How Trackdesk captures ad click IDs

An ad click ID is captured whenever a click is registered in Trackdesk.

  • Redirect clicks — When an affiliate's tracking link routes through Trackdesk's redirect service, the redirect reads the gclid, fbclid, and ttclid query parameters from the URL and stores the value on the click before forwarding the visitor to the final destination.

  • Direct clicks — When a visitor lands on your website and the tracking script fires a click event, the script reads the same parameters from the current page URL and sends them along with the click.

In both cases, the capture is automatic. As long as the parameter is present on the URL at the moment the click is tracked, it will be associated with that click.

One ad click ID per click

Each click can store a single ad click ID. Trackdesk keeps the type (which platform it came from) and the value (the identifier itself) side by side on the click record.

If more than one of the supported parameters happens to be present on the same URL, Trackdesk picks one according to the following priority order:

  1. gclid (Google Ads)

  2. fbclid (Meta Ads)

  3. ttclid (TikTok Ads)

In that case, the type is set to the highest-priority platform found on the URL and the value is stored as the literal string MULTIPLE_AD_CLICK_IDS. This is a deliberate signal that the incoming URL was ambiguous — for example, because a landing page was already tagged with one platform's click ID when traffic arrived from a second platform. Seeing MULTIPLE_AD_CLICK_IDS in the click report is an indication to review the campaign setup for the affiliate or the landing page that produced the click.

Viewing ad click IDs in the click report

Ad click IDs are surfaced as two columns in the click report:

  • Ad click ID type — The ad platform the click ID belongs to (gclid, fbclid, or ttclid).

  • Ad click ID value — The identifier captured from the URL.

Open the click report from Analytics → Click report. If the columns are not visible, they can be toggled from the Edit Columns action.

Hiding the ad click ID columns from affiliates

Ad click ID parameter visibility for affiliates can be managed via the Data visibility feature:

  1. Navigate to Settings → Affiliates → Data visibility

  2. Toggle the Ad click ID switch on to expose the columns for affiliates, or off to hide them.

  3. Save your changes.

This toggle controls column visibility in the click report for affiliates only. Hiding the columns does not stop Trackdesk from capturing the ad click ID, or from showing it to admin user roles.

Forwarding ad click IDs via postbacks

Ad click IDs can be forwarded downstream using Trackdesk's postback templates. Three variables are available for use in postback URLs and request bodies:

  • {gclid} — The Google Ads click ID captured on the click, if any.

  • {fbclid} — The Meta Ads click ID captured on the click, if any.

  • {ttclid} — The TikTok Ads click ID captured on the click, if any.

When a postback fires, Trackdesk substitutes each placeholder with the corresponding value from the click that produced the conversion. Only the variable matching the captured ad click ID type is populated — the other two are replaced with an empty string. For example, if the click carried a gclid, the {gclid} placeholder resolves to the stored value while {fbclid} and {ttclid} resolve to empty strings.

Related articles

Did this answer your question?