ValueTrack parameters are used to track information about the source of an ad click. By adding these parameters to your ads and campaigns, you can identify if people who clicked on your ads used mobile devices, where they were located when they clicked your ads, and much more.
This article explains the steps you’ll need to follow to add ValueTrack parameters in “URL options”. We suggest using ValueTrack parameters in your tracking template, but you can also insert them in your final URL and custom parameters.
If you aren’t familiar with ValueTrack parameters or how tracking works. Learn more About ValueTrack parameters and About tracking in Google Ads.
On this page
- How it works
- Instructions
- Available ValueTrack parameters
- Tracking Parameters and AI Max: Best practices for advertisers
- Best practices
How it works
Tracking templates at the account, campaign, or ad group level must include a ValueTrack parameter that inserts your final URL, like {lpurl}. When your ad is clicked, these parameters will insert your final URL. If you don’t include a URL insertion parameter in your tracking template, your landing page URL will break.
If you want to add more than one ValueTrack parameter to a single URL, simply append them together in your URL using an ampersand (&), like this: {lpurl}?matchtype={matchtype}&device={device}.
Note: Dynamic Search Ads and auto-targets require ValueTrack parameters that insert the final URL (for example, {lpurl}, {escapedlpurl}, {lpurl+2}) at all levels.
Instructions
- Sign in to your Google Ads account.
- Click and follow one of the setup instructions below.
- Go to Campaigns within the Campaigns menu
.
- Select the Settings tab at the top and select “Campaign Settings”.
- Add the “Tracking template” column to your table.
- Select the column icon
above the statistics table, then select Modify columns.
- Expand the "Attributes" option and select Tracking template.
- Select Apply.
- Select the column icon
- Use the horizontal scroll bar at the bottom to scroll across the table to find the added column.
- Hover over any entry in the "Tracking template" column.
- Select the pencil icon
when it appears.
- Edit the tracking template or enter
{lpurl}, a question mark, and then any ValueTrack parameters you want to use, separated by ampersands (&). For example, if you want to use the{matchtype}parameter, your tracking template would be:{lpurl}?matchtype={matchtype} - Select Test to test the tracking template.
- Select Save.
- Go to Ad groups within the Campaigns menu
.
- Add the “Tracking template” column to your table.
- Select the column icon
above the statistics table, then select Modify columns.
- Expand the "Attributes" option and select Tracking template.
- Select Apply.
- Select the column icon
- Use the horizontal scroll bar at the bottom to scroll across the table to find the added column.
- Hover over any entry in the "Tracking template" column.
- Select the pencil icon
when it appears.
- Edit the tracking template or enter
{lpurl}, a question mark, and then any ValueTrack parameters you want to use, separated by ampersands (&). For example, if you want to use the{matchtype}parameter, your tracking template would be:{lpurl}?matchtype={matchtype} - Select Test to test the tracking template.
- Select Save.
- Go to Ads within the Campaigns menu
.
- Hover over the ad.
- Select the pencil icon
when it appears and select Edit.
- Expand the "Ad URL Options".
- Edit the tracking template or enter
{lpurl}, a question mark, and then any ValueTrack parameters you want to use, separated by ampersands (&). For example, if you want to use the{matchtype}parameter, your tracking template would be:{lpurl}?matchtype={matchtype} - Select Test to test the tracking template.
- Select Save.
- In your Google Ads account, select Campaigns icon
.
- Select the Performance Max campaign with assets you would like to set up or edit a tracking template for.
- Under “Campaigns”, choose Asset groups.
- If you have Summary view enabled, locate the asset group you want to edit and select Edit Assets.
- If you have Table view enabled, find the asset group you want to edit and select Edit Asset Group, and then select Edit Assets.
- Expand the "More options" menu.
- In the “Asset group URL options” section, edit the tracking template or enter
{lpurl}, a question mark, and then any ValueTrack parameters you want to use, separated by ampersands (&). For example, if you want to use the{matchtype}parameter, your tracking template would be:{lpurl}?matchtype={matchtype} - Select Test to test the tracking template.
- Select Save.
- Go to Assets within the Campaigns menu
.
- Under the "Associations" tab, select Sitelink summary card header for the type of asset.
- Hover over any of the assets and select the pencil icon
when it appears.
- Select Edit and then expand Sitelink URL options.
- Edit the tracking template or enter
{lpurl}, a question mark, and then any ValueTrack parameters you want to use, separated by ampersands (&). For example, if you want to use the{matchtype}parameter, your tracking template would be:{lpurl}?matchtype={matchtype} - Select Test to test the tracking template.
- Select Save.
- Go to Search keywords within the Campaigns menu
.
- Add the “Tracking template” column to your table.
- Select the column icon
above the statistics table, then select Modify columns.
- Expand the "Attributes" option and select Tracking template.
- Select Apply.
- Select the column icon
- Use the horizontal scroll bar at the bottom to scroll across the table to find the added column.
- Hover over any entry in the new “Tracking template” column, and select when the pencil icon
appears.
- Enter {lpurl}, a question mark, and then any ValueTrack parameters you want to use, separated by ampersands (&). For example, if you want to use the
{matchtype}parameter, your tracking template would be:{lpurl}?matchtype={matchtype} - Select Save.
- Go to Dynamic ad targets within the Campaigns menu
.
-
Note: You may have to select "+ More" at the bottom of the page menu to view “Dynamic ads target”.
- Add the “Tracking template” column to your table.
- Select the column icon
above the statistics table, then select Modify columns.
- Expand the "Attributes" option and select Tracking template.
- Select Apply.
- Select the column icon
- Use the horizontal scroll bar at the bottom to scroll across the table to find the added column.
- Hover over any entry in the new “Tracking template” column, and select when the pencil icon
appears.
- Enter {lpurl}, a question mark, and then any ValueTrack parameters you want to use, separated by ampersands (&). For example, if you want to use the
{targetid}parameter, your tracking template would be:{lpurl}?targetid={targetid} - Select Save.
Tip: Avoid spaces in your URLs. Spaces will cause your URLs to "break," and the tracking won't work.
You may find %20 in your data in place of a space between words, such as when you have a keyword that's made up of 2 words. %20 is used to replace the space so that your URL will continue to work properly.
Available ValueTrack parameters
Final URL, tracking template, or custom parameter| Parameter | What it returns |
|---|---|
{campaignid} |
The campaign ID. (Use this when you've set up your tracking information at account level and want to know which campaign served your ad.) |
{adgroupid} |
The ad group ID. (Use this when you've set up your tracking information at the account or campaign level and want to know which ad group served your ad.) |
{feeditemid} |
The ID of the feed-based or legacy asset that was clicked. Update the URL to support the upgraded asset ValueTrack for asset upgrade. Note: |
{extensionid} |
The ID of the asset-based or upgraded asset that was clicked. Update the URL to support the upgraded asset ValueTrack for asset upgrade. Note: |
{targetid} |
The ID of the keyword (labeled "kwd"), ID for AI Max keywordless (“kwl”), dynamic search ad ("dsa") target, remarketing list target ("aud"), product partition ("pla"), or hotel group partition ("hpi") that triggered an ad. For multiple target IDs, the output shows in the following order: "aud, dsa, kwd, pla, hpi." For example, if you add a remarketing list to your ad group (criterion ID "456") and target the keywords ID "123" the Note: |
{loc_interest_ms} |
The ID of the location of interest that helped trigger the ad. Visit the developer website for location IDs. Reported only for campaigns that show ads to people searching for your targeted locations. |
{loc_physical_ms} |
The ID of the geographical location of the click. Visit the developer website for location IDs. Reported only for campaigns that show ads to people in your targeted locations. |
{matchtype} |
The match type of the keyword that triggered your ad: "e" for exact, "p" for phrase, "b" for broad, or "a" for AI Max keywordless. |
{network} |
Where the click came from:
|
{device} |
What device the click came from: "m" for mobile (including WAP), "t" for tablet, and "c" for computer. |
{devicemodel} |
What model of phone or tablet the click came from (for example, "Apple+iPhone"). Note: Only available on Display Network campaigns. |
{gclid} |
The Google click identifier of a click that comes from your ad. |
{ifmobile:[value]} |
Whatever you define for "[value]," if your ad's clicked from a mobile phone. |
{ifnotmobile:[value]} |
Whatever you define for "[value]," if your ad's clicked from a computer or tablet. |
{ifsearch:[value]} |
Whatever you define for "[value]," if your ad's clicked from a site in the Google Search Network. |
{ifcontent:[value]} |
Whatever you define for "[value]," if your ad's clicked from a site in the Google Display Network. |
{creative} |
A unique ID for your ad. |
{keyword} |
For the Search Network, the keyword from your account that matches the search query. If your ad matches without keywords (for example, in AI Max for Search campaigns, DSA, and Performance Max), For the Display Network, the keyword from your account that matches the content. |
{placement} |
The content site where your ad was clicked (for keyword-targeted campaigns), or the matching placement targeting criteria for the site where your ad was clicked (for placement-targeted campaigns). |
{target} |
A placement category (works with placement-targeted campaigns only). |
{param1} |
Creative parameter #1, if you're using the AdParamService with the Google Ads API (AdWords API). |
{param2} |
Creative parameter #2, if you're using the AdParamService with the Google Ads API (AdWords API). |
{random} |
A random Google-generated number (an unsigned 64-bit integer), commonly used to force the page to reload. |
{ignore} |
Ignores tracking elements of your final URL to help reduce crawl load on your website. It can only be used in your final or final mobile URL. |
Recommended
| Parameter | What it returns |
|---|---|
{lpurl} |
The final URL. It will be escaped unless you put Example Final URL: http://example.com Tracking template: Landing page URL: http://example.com?matchtype={matchtype} |
Advanced
| Parameter | What it returns |
|---|---|
{lpurl+2} |
The final URL escaped twice. Useful when you have a chain of redirects. |
{lpurl+3} |
The final URL escaped 3 times. Useful when you have a chain of redirects. |
{unescapedlpurl} |
The final URL unescaped. |
{escapedlpurl} |
The final URL escaped. Escapes the characters :, /, ?, =, and %. |
{escapedlpurl+2} |
The final URL escaped twice. Useful when you have a chain of redirects. |
{escapedlpurl+3} |
The final URL escaped 3 times. Useful when you have a chain of redirects. |
To use these ValueTrack parameters with other URL parameters in your tracking template, add the following characters after the ValueTrack parameter. Otherwise, your website or third-party system may not properly save the information from your URL parameters.
| Parameter | Location in tracking template | Followed by | Example |
|---|---|---|---|
{lpurl} |
Beginning | ? | {lpurl}? |
{lpurl} |
Not at the beginning | %3F | {lpurl}%3F |
{lpurl+2} |
Not at the beginning | %253F | {lpurl+2}%253F |
{lpurl+3} |