Skip to content
Browse documentation

ValueTrack reference

Which Google Ads ValueTrack tags the tracker accepts, the click column and report dimension each one fills, and exactly how the {lpurl} family is escaped and decoded.

Last updated 6 min read

On this page

Google Ads replaces ValueTrack tags such as {campaignid} in your tracking template at click time. TrackCrown reads the resulting query parameters on every click path (/c/, /r/, /s/, /click) and stores them on the click. This page lists the supported tags, where each value is stored, and the {lpurl} escaping rules.

How parameters are read#

  • Names are case-insensitive. CampaignId= and campaignid= fill the same column.
  • Aliases. Each column has a list of accepted names; the first one with a non-empty value wins.
  • Empty values are ignored, so a tag a campaign type does not fill (for example {keyword} in Performance Max) does no harm.
  • Everything else is kept as an extra click parameter (up to 50 keys, key length 64), visible in the click detail. url, force_transparent and token are never stored as extras.
  • Length limits. Values are trimmed and cut at 512 bytes (matchtype and device 32, network 64, location and asset IDs 64, devicemodel 128). Click identifiers (gclid, gbraid, wbraid, msclkid, fbclid, ttclid) keep up to 1,024 bytes. 64-bit IDs such as 18446744073709551615 are stored as text, never overflowed.

Supported tags and where they go#

Template parameterValueTrack tagAlso acceptedReport dimension
gclid{gclid}—(click log, conversion field)
campaignid{campaignid}campaign_id, cid, cmp, utm_campaignCampaign ID
adgroupid{adgroupid}adgroup_id, agid, ag, adset_idAd group ID
creative{creative}ad_id, adid, crid, crAd / creative ID
keyword{keyword}kw, utm_termKeyword
matchtype{matchtype}mtMatch type
network{network}netNetwork (Google)
device{device}devDevice (Google)
placement{placement}pl, sitePlacement
loc_physical_ms{loc_physical_ms}loc, loc_physicalLocation (Google)
loc_interest_ms{loc_interest_ms}loc_interestLocation of interest
targetid{targetid}tid, tgtsplit, see below
feeditemid{feeditemid}feed_item_idFeed item ID
extensionid{extensionid}extension_idExtension ID
assetgroupid{assetgroupid}asset_group_idAsset group ID
devicemodel{devicemodel}device_modelDevice model (Google)
target{target}—Placement category
product_id{product_id}—Product ID
merchant_id{merchant_id}—Merchant Center ID
adtype{adtype}ad_typeAd type

Campaign ID, Ad group ID, Ad / creative ID, Keyword and Placement are copied to conversions as well; the other Google Ads dimensions are click attributes — impressions and conversions are not split by them.

Further tags Google accepts and the linter allows — {param1}, {param2}, {random}, {sourceid}, {product_channel}, {product_country}, {product_language}, {product_partition_id}, {store_code} — have no column of their own. Name them as you like in the template (the Shopping preset uses ch={product_channel}, the Video preset src={sourceid}); the values are stored as extra click parameters.

{targetid}#

{targetid} can hold several criteria joined by : (for example aud-456:kwd-123). The raw value is always kept; the known prefixes are also split into their own columns:

PrefixColumnReport dimension
kwd-keyword criterion IDKeyword criterion ID
aud-audience IDAudience ID
dsa-dynamic ad target IDDynamic ad target ID
pla-product partition IDProduct partition ID

hpi-, kwl- and unknown prefixes stay only in the raw value.

Codes#

TagValues
{network}g Google Search, s Search partners, d Display Network, ytv YouTube, vp Google video partners, gtv Google TV, x Performance Max (cross-network)
{matchtype}e Exact, p Phrase, b Broad
{device}m Mobile, t Tablet, c Computer

{loc_physical_ms} and {loc_interest_ms} are Google geo-criterion IDs; reports show their names when the platform has loaded Google's geo-target table.

Conditional tags#

{ifmobile:x}, {ifnotmobile:x}, {ifsearch:x} and {ifcontent:x} insert x when the condition holds and nothing otherwise. The builder offers dev={ifmobile:m}{ifnotmobile:d} (stored as the device value) and src={ifsearch:s}{ifcontent:c} (stored as an extra parameter). Demand Gen does not support {ifsearch} / {ifcontent}.

Custom parameters#

{_name} — an underscore followed by 1–16 letters or digits — is a Google Ads custom parameter. Use it as the value of any parameter: sub1={_creative}. Microsoft Advertising may send a custom parameter it does not know as the literal text {_name}; the click is still redirected and the literal is stored.

Click identifiers#

IdentifierSourceNotes
gclid{gclid} in the template, or the url= landing pageKept exactly once, case preserved.
gbraid, wbraidonly the url= landing pageiOS traffic. Google appends them by auto-tagging.
msclkid{msclkid} or the landing pageMicrosoft Advertising.
fbclid, ttclidthe link or the landing pageMeta, TikTok.

The tracker reads these from the query of the decoded url= value without modifying it; a value on the tracking link itself wins. Their presence also sets the click's traffic source (google, meta, microsoft, tiktok) unless the link carries ts=<source>.

The {lpurl} family#

Google inserts the landing page (final URL + Final URL suffix, with parameters substituted) in place of these tags. Only use them in the tracking template, as the value of url=.

TagHow Google inserts the landing pageExample for https://example.com/p?a=1&b=2
{lpurl} at the very start of a templateunescaped (a following ? becomes &)https://example.com/p?a=1&b=2
{lpurl} elsewhereescaped: ? = & # " ', tab and space; the :// stays literalhttps://example.com/p%3Fa%3D1%26b%3D2
{lpurl+2}, {lpurl+3}escaped again (% → %25)https://example.com/p%253Fa%253D1%2526b%253D2
{escapedlpurl} (+2, +3): / % escaped as wellhttps%3A%2F%2Fexample.com%2Fp%3Fa%3D1%26b%3D2
{unescapedlpurl}as is — must be the last parameterhttps://example.com/p?a=1&b=2
parallel-tracking background call{lpurl} = https://www.google.com/asnc/<id>the tracker must redirect there

Many browsers and proxies deliver the escaped forms fully percent-encoded (https%3A%2F%2F…); both arrive correctly.

How the tracker decodes url=#

  1. The first url= (key matched case-insensitively) is the next hop. A second url= with a different value is refused with 403 (duplicate_url).
  2. Fully encoded value (url=https%3A%2F%2Fexample.com%2Fp%3Fa%3D1): decoded once, and again while it still starts with an encoded scheme (for {lpurl+2} / {lpurl+3}), at most three times. + stays +.
  3. Literal scheme with an escaped query (url=https://example.com/p%3Fa%3D1%26b%3D2, Google's partial escaping): only Google's escapes are undone until ? / # is literal again → https://example.com/p?a=1&b=2.
  4. Other literal values ({unescapedlpurl}): used byte for byte. If the value has its own ?, it runs to the end of the query string — which is why url= must be last (a trailing force_transparent=true is removed).

Percent-escapes that belong to the landing page survive (q=c%2B%2B stays c%2B%2B), #fragments are kept and nested tracker URLs are decoded exactly once. The decoded URL must be absolute http/https, at most 4,096 characters, with a public hostname (no IP address, localhost or credentials); otherwise the tracker answers 403 with reason invalid, too_long, scheme, credentials, ip_host, local_host or bad_host.

See also: Tracking template builder · Microsoft Advertising · Template linter, simulator and tester.

Something unclear or missing in this article?Tell us