ValueTrack parameters: what each one returns, how to read the codes, and which ones affiliates need

November 28, 2026 · Hoplytic team · 5 min read

The short version: this guide in 85 seconds.
Read the video transcript

Google has a long list of ValueTrack parameters. Which ones do affiliates actually need?

Mainly campaign ID, ad group ID, keyword, match type, device and network, plus placement on Display.

Most values come back as codes, not words. Device is m, t or c: mobile, tablet or computer. Match type is e, p, b or a. And network is g for Google Search, s for search partners, d for Display, and ytv for YouTube.

Put them in the final URL suffix with short, stable names, so one report can compare Google with other platforms. Keyword and match type come next. Then device and network.

A keyword report will put every Performance Max sale in an empty none row. That's correct, not a tracking failure.

Wrong braces or capital letters leave the text in the URL. Use lowercase names in single braces. A suffix on one ad group replaces the account suffix completely. And a redirect on your final URL can drop the parameters.

Pick Google Ads in the link maker, and the campaign, ad group, keyword and device values are added, with the click ID stored on its own. If the link sits on your landing page, the site script carries them to the click.

The full guide is right below. Hoplytic: ad tracking made simple.

Key points

ValueTrack is Google's word for URL macros: placeholders like {keyword} that become real values when someone clicks. The list is long, most values come back as one-letter codes, and several are empty in the campaign types people now use most. Here is what each useful one actually returns.

Short answer: for affiliate tracking you mainly need {campaignid}, {adgroupid}, {keyword}, {matchtype}, {device} and {network}, plus {placement} on Display and the gclid that auto-tagging adds. Put them in the final URL suffix, give them short stable names, and expect codes (m, e, g) rather than words.

The parameters that matter, and what they return

ParameterReturnsExample value
{campaignid}Campaign ID (a number)21458820117
{adgroupid}Ad group ID164209311874
{creative}Ad ID702114559321
{keyword}The keyword that matched (Search) or matched content (Display). Empty for keywordless matches.nordvpn coupon
{matchtype}e exact, p phrase, b broad, a AI Max keywordlessp
{device}m mobile, t tablet, c computerm
{network}g Google Search, s search partners, d Display, ytv YouTube, vp video partners, gtv Google TV, x Performance Maxg
{placement}The site where a Display or Video ad was clickedexample-news.com
{targetid}What triggered the ad, with a prefix: kwd- keyword, aud- audience, dsa- dynamic target, pla- product groupaud-4410:kwd-9925841
{loc_physical_ms}Location ID where the person was1023191
{loc_interest_ms}Location ID they searched about2840
{devicemodel}Phone or tablet model, Display onlyApple+iPhone
{assetgroupid}Asset group in Performance Max6488201733

Location IDs are Google's geo target codes. Google publishes the full list of codes, so you can turn 1023191 into a city in your reports. For country-level reports, your tracker's own IP country is usually simpler.

Conditional parameters

Four parameters print text you choose only when a condition holds:

They are handy when a downstream system expects words instead of codes, for example src={ifsearch:search}{ifcontent:display}. If you control the tracker, {device} and {network} carry more detail in fewer characters.

What's empty in which campaign type

Campaign typeWatch out for
Search with AI Max, Dynamic Search Ads{keyword} is blank on keywordless matches; {matchtype} can be a
Performance MaxNo keyword; {network} is always x; use {campaignid}, {assetgroupid} and {device}. gclid support is limited.
Demand GenNo {placement}, {keyword}, {network}, {targetid} or the search/content conditionals
Display{placement} is the main value; {keyword} is a content match, not a search

Plan reports around that. A report grouped by keyword will put every Performance Max sale into an empty "(none)" row, which is correct, not a tracking failure.

Template-only parameters

{lpurl} (your final URL), {lpurl+2}, {lpurl+3}, {unescapedlpurl} and {escapedlpurl} only work in the tracking template. They don't belong in the final URL suffix. How and when to use a template is covered in Google Ads tracking templates for affiliates.

Two more are rarely needed: {random} adds a random number (to defeat caching on an old pixel), and {ignore} marks parts of a final URL that Google's crawler should skip.

A ready suffix for affiliates

campaign={campaignid}&adgroup={adgroupid}&ad={creative}&kw={keyword}&match={matchtype}&device={device}&net={network}&placement={placement}

Notes on that choice:

Mistakes that leave values blank

Turning codes into decisions

In Hoplytic

When you pick Google Ads in the link maker, campaign, ad group, keyword and device values are added for you and the gclid is stored on its own. Every other value on the click is stored too. If the link sits on your landing page, the site script carries campaign, adgroup, ad, kw, placement and the gclid to the click by default; add other names such as match and net with data-keep="match,net" on the script tag. Reports can group by any of these values, for example campaign, then keyword, then device, with sales and earnings per click. The full macro list for the link maker is on the Google Ads macros page, and every other platform is in the ad platform macros index.

Pick the ad platform and its macros are added to your tracking link.

Questions people ask

Is there a ValueTrack parameter for campaign name?

No. Google gives {campaignid} and {adgroupid}, which are numbers. Map them to names in your reports, or add a custom parameter such as {_cname} with the name on each campaign.

Why does my URL show {keyword} literally?

Google didn't recognize the placeholder where you used it, usually because of a typo, wrong braces or a parameter that campaign type doesn't support. Copy the exact spelling from Google's list and check it's supported for that campaign type.

Are ValueTrack parameters case sensitive?

Write them exactly as Google documents them, in lowercase, for example {campaignid}. Microsoft Ads uses its own spellings such as {CampaignId}, so don't copy a template between platforms without checking.

More in Traffic sources and macros

Also: tracking glossary · ad platform macros · Markdown copy