ValueTrack parameters: what each one returns, how to read the codes, and which ones affiliates need
November 28, 2026 · Hoplytic team · 5 min read
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 parameters are placeholders in curly braces that Google replaces with real values on every click.
- Most return short codes: {device} gives m, t or c, {matchtype} gives e, p, b or a, {network} gives g, s, d, ytv and more.
- {keyword} is empty for keywordless matches such as Performance Max, Dynamic Search Ads and AI Max, so don't build reports that assume it's always there.
- {lpurl} and its variants only work in the tracking template; everything else also works in the final URL suffix.
- Name your parameters consistently across ad platforms, so one report can compare Google with every other source.
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
| Parameter | Returns | Example value |
|---|---|---|
{campaignid} | Campaign ID (a number) | 21458820117 |
{adgroupid} | Ad group ID | 164209311874 |
{creative} | Ad ID | 702114559321 |
{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 keywordless | p |
{device} | m mobile, t tablet, c computer | m |
{network} | g Google Search, s search partners, d Display, ytv YouTube, vp video partners, gtv Google TV, x Performance Max | g |
{placement} | The site where a Display or Video ad was clicked | example-news.com |
{targetid} | What triggered the ad, with a prefix: kwd- keyword, aud- audience, dsa- dynamic target, pla- product group | aud-4410:kwd-9925841 |
{loc_physical_ms} | Location ID where the person was | 1023191 |
{loc_interest_ms} | Location ID they searched about | 2840 |
{devicemodel} | Phone or tablet model, Display only | Apple+iPhone |
{assetgroupid} | Asset group in Performance Max | 6488201733 |
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:
{ifmobile:mob}printsmobon mobile clicks, nothing otherwise.{ifnotmobile:desk}printsdeskon computer and tablet clicks.{ifsearch:srch}prints on Search Network clicks.{ifcontent:disp}prints on Display Network clicks.
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 type | Watch out for |
|---|---|
| Search with AI Max, Dynamic Search Ads | {keyword} is blank on keywordless matches; {matchtype} can be a |
| Performance Max | No keyword; {network} is always x; use {campaignid}, {assetgroupid} and {device}. gclid support is limited. |
| Demand Gen | No {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:
- Short names. Many affiliate networks cap sub-ID length, and long URLs get truncated in some redirects.
- The same names on every platform. Call the campaign
campaignon Google, Microsoft and Meta, and one report can compare them all. See UTM vs sub-ID for how these values relate to UTM tags. - No gclid in the suffix. Auto-tagging adds it; adding
gclid={gclid}yourself is unnecessary. - Keyword text can contain spaces and symbols. Google encodes them in the URL, but some networks drop sub-ID values with unusual characters. Pass the keyword to your tracker, not straight into a network sub-ID.
Mistakes that leave values blank
- Wrong braces or spelling.
{campaignID},[keyword]or{{keyword}}stay in the URL as text. Google's names are lowercase in single braces. - A parameter the campaign type doesn't fill.
{placement}on Search,{keyword}in Performance Max. The URL works, the value is just empty. - The suffix overridden lower down. A suffix on one ad group replaces the account suffix for that ad group completely. If values vanish in one place only, check the lower levels.
- Values only in the tracking template. With parallel tracking, the template runs in the background, so your landing page never sees what's in it.
- A redirect that drops the query. If your final URL redirects (for example from
httptohttps, or to a trailing slash), make sure the redirect keeps the parameters.
Turning codes into decisions
- Device: compare earnings per click for
mandc. Offers often convert very differently by device, and a device bid adjustment follows from the gap. - Network:
s(search partners) often has a different conversion rate fromg. If it loses money, switch partners off in the campaign settings. - Match type: when broad (
b) keywords earn less per click than phrase (p), the search terms report shows which queries to add as negatives. - Placement: on Display, exclude placements that take clicks but never sell.
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.
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