Sign in
← Attribution docs
Developer documentation

Data source reference

Every value MTK Attribution can capture, what it means, and exactly what it looks for on the page. Use this to verify your field map and to spot issues — if a value arrives empty or wrong, the entry here tells you which signal it depends on.

How it works

  • First vs last touch. Every touch dimension is captured twice. first.* is frozen the very first time someone arrives and never changes; last.* refreshes at the start of each new session, so internal navigation can't degrade it.
  • The field map. Each row in Dashboard → license → Tag config maps a HTML Name (the left side, e.g. mtk_first_source) to a data source (the right side, the expressions on this page).
  • Delivery. On page load the resolved values are pushed to the mtk_attribution dataLayer event, keyed by each HTML Name, and written into any matching hidden form field (by name, or via a [mtk:…] token).

Query sources

Touch dimensions parsed from the URL query string (UTMs) and the referrer. Available as both first.* and last.*.

first.channel / last.channel
Channel

The normalized traffic grouping — Direct, Paid Search, Paid Social, Organic Search, Organic Social, Email, Referral, or Campaign. This is derived, not a raw parameter: the engine classifies each visit from its click IDs, utm_medium, utm_source, and referrer (see the “How MTK Attribution categorizes” page for the exact rules).

first.source / last.source
Source

The platform or site behind the visit — utm_source (title-cased) when present, otherwise inferred from the referrer domain (Google, Facebook, LinkedIn, …), otherwise “Direct”.

first.medium / last.medium
Medium

The raw utm_medium query value, exactly as passed (e.g. cpc, email, referral, paid_social). Channel is the grouping derived from it.

first.campaign / last.campaign
Campaign

The utm_campaign query value.

first.term / last.term
Term

The utm_term query value — Google Ads’ {keyword}.

first.content / last.content
Content

The utm_content query value — Google Ads’ {creative}.

first.ad_placement / last.ad_placement
Ad placement

The utm_placement query value — the ad placement, when your tracking template passes it.

Legacy aliases: first.placement / last.placement — old tags keep resolving.

first.landing_page / last.landing_page
Landing page

The landing-page path only — window.location.pathname (e.g. /pricing). No query string.

Legacy aliases: first.landing / last.landing — old tags keep resolving.

first.landing_page_group / last.landing_page_group
Landing page group

The first path segment of the landing-page path (e.g. “blog” for /blog/my-post) — groups landings by site section. A top-level page like /pricing yields “pricing”; empty only when the visitor lands on the homepage (/).

first.query / last.query
Query

The landing-page query string — window.location.search (e.g. ?utm_source=google&utm_medium=cpc), including the leading “?”. Holds the raw UTMs and click-id params exactly as they arrived.

Legacy aliases: first.landing_query / last.landing_query.

first.referrer / last.referrer
Referrer

The full referring URL of the visit that started the touch — document.referrer captured at the session’s first page. Empty on direct arrivals (typed URL, bookmark).

Cookies & Click IDs

Ad-platform click identifiers and Meta’s cookies — the raw keys used for Conversions API matching and offline conversion import. For Google and Microsoft, reach for last_paid.*: it holds the click ID of the most recent PAID touch and stays put through every direct or organic session that follows, so a conversion weeks after the ad click still has an ID to import against. The per-touch first.* / last.* forms are also available, but last.* empties the moment a visitor returns direct. Cookies and param: values are read live when the tag resolves.

last_paid.gclid
Google click ID (gclid) — last paid touch

Google Ads click ID of the most recent PAID touch. Sticky — it survives any number of direct or organic sessions afterward, so a conversion weeks after the ad click still carries the gclid for offline conversion import. Empty when the journey never had a paid touch.

first.gclid / last.gclid
Google click ID (gclid) — per touch

Google Ads click ID, read from the gclid URL query parameter.

last_paid.gbraid
Google gbraid — last paid touch

Google’s iOS web-to-app click ID from the most recent PAID touch, kept for as long as the journey runs — the gbraid counterpart to last_paid.gclid.

first.gbraid / last.gbraid
Google gbraid — per touch

Google’s iOS web-to-app click ID, from the gbraid URL query parameter.

last_paid.wbraid
Google wbraid — last paid touch

Google’s iOS app-to-web click ID from the most recent PAID touch, kept for as long as the journey runs — the wbraid counterpart to last_paid.gclid.

first.wbraid / last.wbraid
Google wbraid — per touch

Google’s iOS app-to-web click ID, from the wbraid URL query parameter.

last_paid.msclkid
Microsoft click ID (msclkid) — last paid touch

Microsoft / Bing Ads click ID of the most recent PAID touch, kept for as long as the journey runs — for Microsoft offline conversion import.

first.msclkid / last.msclkid
Microsoft click ID (msclkid) — per touch

Microsoft / Bing Ads click ID, from the msclkid URL query parameter. Its presence also classifies the visit as Paid Search / Bing.

param:fbclid
Facebook click ID (fbclid)

Read live from the fbclid URL parameter on the current page. Also captured per-touch as first.fbclid / last.fbclid.

last_paid.fbclid
Facebook click ID (fbclid) — last paid touch

The fbclid of the most recent PAID Meta touch. Narrower than last.fbclid on purpose: Meta appends fbclid to organic links too, and a bare fbclid is classified Organic Social, so it never reaches this record. For Conversions API matching use mtk_fbclid (param:fbclid) and mtk_fbc (cookie:_fbc) instead.

first.ttclid / last.ttclid
TikTok click ID (ttclid) — per touch

TikTok click ID, from the ttclid URL parameter. Its presence classifies the visit as Paid Social / TikTok.

last_paid.ttclid
TikTok click ID (ttclid) — last paid touch

The ttclid of the most recent PAID TikTok touch, kept for as long as the journey runs.

cookie:_fbc
Meta click cookie (_fbc)

Read live from the browser’s _fbc cookie — Meta’s click identifier, used for Conversions API matching.

cookie:_fbp
Meta browser cookie (_fbp)

Read live from the browser’s _fbp cookie — Meta’s browser / pixel identifier, used for Conversions API matching.

Insights

Values derived from the multi-touch journey and the moment of conversion — counts, the journey path, and conversion timing.

journey.string
Journey (readable)

The full multi-touch journey as text, e.g. “Paid Social/Facebook > Organic Search/Google > Direct/Direct”. One entry per session.

Legacy alias: path.string — old tags keep resolving.

journey.json
Journey (JSON)

The same path as a JSON array — each entry carries the touch timestamp, channel, source, and campaign — for parsing downstream.

Legacy alias: path.json.

session.count
Session count

The number of sessions (touchpoints) recorded in the journey.

Legacy alias: path.count.

pageview.count
Pageview count

Every page load across the whole journey, all sessions.

Legacy alias: pageview_count.

last.paid_touch
Last paid touch

The most recent PAID touch (Paid Search / Paid Social) as “channel/source”, e.g. “Paid Social/Facebook”. Sticky — kept outside the capped path, so it survives arbitrarily long journeys. Empty when the journey never had a paid touch. Individual dimensions: last_paid.channel, last_paid.source, last_paid.campaign; last_paid.time is that touch’s moment as Unix seconds for attribution-window math.

Legacy alias: last_paid.string — old tags keep resolving.

time_since_last_paid_touch
Time since last paid touch

Last paid touch → submit, human-readable (e.g. “2d 6h”). Empty when the journey never had a paid touch.

Legacy alias: time_since_paid.

paid_touch_count
Paid touch count

How many paid touches the journey had — “0” when none. The frequency picture behind a conversion.

time_to_conversion
Time to conversion

First touch → now, human-readable (e.g. “12d 4h”). Handy for your own reporting.

conversion_unix
Conversion unix

Submit time as Unix seconds — drops straight into Meta CAPI event_time. Timezone-less by nature.

Legacy alias: conversion_timestamp.

conversion_datetime
Conversion datetime

Submit time as “yyyy-MM-dd HH:mm:ss±HH:mm” — the format Google Ads offline conversion import expects. Rendered in the license's configured timezone when set (offset included either way).

custom_conversion_time
Custom conversion time

Submit time in the shape configured under “Custom conversion time” — MM/DD/YYYY or DD/MM/YYYY (month-name and hours/minutes/seconds toggles), Unix seconds, or the Google datetime format, with an optional per-field timezone override. Built for CRM and spreadsheet imports.

page.path
Conversion page path

The path of the page the form was submitted on, without the query string — resolved at submit, so it's the conversion page rather than the landing page.

page.url
Conversion page URL

The page the form was submitted on, as origin + path — no query string, since the landing-page, UTM, and click-ID fields already carry the parameters. Resolved at submit, so it's the conversion page rather than the landing page.

page.title
Conversion page title

The title of the page the form was submitted on, as the browser tab shows it.

referrer
Referrer

The raw document.referrer string for the current page.

attribution_summary
Attribution summary

Every OTHER mapped field, resolved and joined into one “name: value | name: value” string — for CRMs that only give you a single field. Empty values are skipped, and a field mapped to the summary itself is excluded.

Legacy alias: summary.

Other / custom resolvers

Generic prefixes for pulling in anything the built-in dimensions don’t cover. NAME / KEY / VALUE are placeholders you replace.

param:NAME
URL parameter

Reads any live URL query parameter on the current page, e.g. param:gclid or param:utm_id.

cookie:NAME
Cookie

Reads any browser cookie by name, e.g. cookie:_ga.

dl:KEY
dataLayer value

Reads a key from the GTM dataLayer (most recent value wins).

const:VALUE
Constant

Always resolves to the fixed literal you specify, e.g. const:paid_media.

datetime:FORMAT
Custom datetime

The conversion moment, formatted your way for a CRM field — e.g. datetime:MM/dd/yyyy hh:mm a → “08/06/2026 09:14 AM”. Tokens: yyyy yy MMM MM dd HH hh mm ss a; everything else passes through. Rendered in the license's configured timezone (else the visitor's clock). For Meta CAPI or Google offline import, use conversion_unix / conversion_datetime instead — those are purpose-built payloads.

func:NAME
Custom resolver

Calls a resolver function registered on the tag — for values none of the built-ins cover.

Values arriving empty or unexpected? Start with Troubleshooting, or check the field map in Dashboard → license → Tag config.