Set up tracking with ValueTrack parameters

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.

Note:ValueTrack IDs are 64-bit.

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

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

  1. Sign in to your Google Ads account .
  2. Click and follow one of the setup instructions below.
Set up or edit a tracking template with ValueTrack parameters at the campaign level
  1. Go to  Campaigns  within the Campaignsmenu Campaigns Icon.
  2. Select the Settingstab at the top and select “Campaign Settings”.
  3. Add the “Tracking template” column to your table.
    1. Select the column iconA picture of the Google Ads columns iconabove the statistics table, then select  Modify columns.
    2. Expand the "Attributes" option and select  Tracking template.
    3. Select  Apply.
  4. Use the horizontal scroll bar at the bottom to scroll across the table to find the added column.
  5. Hover over any entry in the "Tracking template" column.
  6. Select the pencil iconEditwhen it appears.
  7. 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}
  8. Select  Testto test the tracking template.
  9. Select  Save.
Set up or edit a tracking template with ValueTrack parameters at the ad group level
  1. Go to  Ad groups  within the  Campaigns menu Campaigns Icon.
  2. Add the “Tracking template” column to your table.
    1. Select the column iconA picture of the Google Ads columns iconabove the statistics table, then select  Modify columns.
    2. Expand the "Attributes" option and select  Tracking template.
    3. Select  Apply.
  3. Use the horizontal scroll bar at the bottom to scroll across the table to find the added column.
  4. Hover over any entry in the "Tracking template" column.
  5. Select the pencil iconEditwhen it appears.
  6. 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}
  7. Select  Testto test the tracking template.
  8. Select  Save.
Set up or edit a tracking template with ValueTrack parameters at the Ads level
  1. Go to  Ads  within the  Campaignsmenu Campaigns Icon.
  2. Hover over the ad.
  3. Select the pencil iconEditwhen it appears and select  Edit.
  4. Expand the "Ad URL Options".
  5. 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}
  6. Select  Testto test the tracking template.
  7. Select  Save.
Set up or edit a tracking template with ValueTrack parameters at the Asset group level
  1. In your Google Ads account, select Campaignsicon Campaigns Icon
  2. Select the Performance Max campaign with assets you would like to set up or edit a tracking template for.
  3. Under “Campaigns”, choose Asset groups .
  4. If you have Summary view enabled, locate the asset group you want to edit and select  Edit Assets.
  5. If you have Table view enabled, find the asset group you want to edit and select Edit Asset Group, and then select Edit Assets.
  6. Expand the "More options" menu.
  7. 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}
  8. Select Testto test the tracking template.
  9. Select  Save.
Set up or edit a tracking template with ValueTrack parameters at the sitelink level
  1. Go to  Assets  within the Campaignsmenu Campaigns Icon.
  2. Under the "Associations" tab, select Sitelinksummary card header for the type of asset.
  3. Hover over any of the assets and select the pencil iconEditwhen it appears.
  4. Select  Editand then expand Sitelink URL options.
  5. 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}
  6. Select  Testto test the tracking template.
  7. Select  Save.
Set up or edit a tracking template with ValueTrack parameters at the keywords level
  1. Go to Search keywords within the Campaignsmenu Campaigns Icon.
  2. Add the “Tracking template” column to your table.
    1. Select the column iconA picture of the Google Ads columns iconabove the statistics table, then select  Modify columns.
    2. Expand the "Attributes" option and select  Tracking template.
    3. Select  Apply.
  3. Use the horizontal scroll bar at the bottom to scroll across the table to find the added column.
  4. Hover over any entry in the new “Tracking template” column, and select when the pencil iconEditappears.
  5. 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}
  6. Select  Save.
Set up or edit a tracking template with ValueTrack parameters at the Dynamic ad targets level
  1. Go to Dynamic ad targets  within the Campaignsmenu Campaigns Icon.
  2. Note:You may have to select "+ More" at the bottom of the page menu to view “Dynamic ads target”.
  3. Add the “Tracking template” column to your table.
    1. Select the column iconA picture of the Google Ads columns iconabove the statistics table, then select  Modify columns.
    2. Expand the "Attributes" option and select  Tracking template.
    3. Select  Apply.
  4. Use the horizontal scroll bar at the bottom to scroll across the table to find the added column.
  5. Hover over any entry in the new “Tracking template” column, and select when the pencil iconEditappears.
  6. 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}
  7. 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: {feeditemid} isn't available for Display ads.

{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: {extensionid} isn't available for Display ads.

{targetid}

The ID of the keyword (labeled "kwd"), 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 {targetid} would be replaced by "aud-456:kwd-123."

Note: {targetid} doesn't include affinity and in-market audience.  {targetid} is not compatible with Hotel tROAS. 

{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, or "b" for "broad".
{network}

Where the click came from:

  • “g” for Google search
  • “s” for search partners
  • “d” for Display Network
  • “ytv” for YouTube
  • “vp” for Google video partners
  • “gtv” for Google TV
  • “x” for all Performance Max traffic
  • “e” for all App campaigns for engagement (ACe) traffic, except Google search traffic
{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), {keyword}  returns a blank value.

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.
Tracking template only

Recommended

Parameter What it returns
{lpurl}

The final URL. It will be escaped unless you put {lpurl} at the beginning of your tracking template. If {lpurl} isn't at the beginning of your tracking template, it escapes the characters ?, =, ", #, \t, ', and [space].

Example

Final URL:http://example.com

Tracking template: {lpurl}?matchtype={matchtype}

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}
Not at the beginning %25253F {lpurl+3}%25253F
{unescapedlpurl}
Anywhere ? {unescapedlpurl}?
{escapedlpurl}
Anywhere %3F {escapedlpurl}%3F
{escapedlpurl+2}
Anywhere %253F {escapedlpurl+2}%253F
{escapedlpurl+3}
Anywhere %25253F {escapedlpurl+3}%25253F

If your final URL already contains a question mark, Google Ads will replace the question mark in your tracking template with an ampersand (&) or a correctly escaped version of &.

Final URL only

Parameter What it does
{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. For example, if your final URL is http://www.example.com/product?p1=a&p2=b&p3=c&p4=d , and the tracking info following the question mark in the URL doesn’t change the landing page, you can insert {ignore} before your tracking info to indicate that everything after it's merely tracking info. Here’s an example of how to do this: http://www.example.com/product?{ignore}p1=a&p2=b&p3=c&p4=d

Here are some things to keep in mind when using {ignore}

  • {ignore} can’t be embedded inside other ValueTrack parameters (for example, {ifmobile:{ignore}} isn't allowed).
  • You must use {ignore} in your final URL if anything in your final URL can be modified by a third party when someone clicks on your ad. Learn more about our editorial policies

Example

Final URL: http://www.example.com/product?p1=a&p2=b&p3=c&p4=d

Tracking info: p1=a&p2=b&p3=c&p4=d

If the tracking information following the question mark in the URL doesn’t change the landing page, you can insert {ignore} before your tracking information to indicate that everything after it's merely tracking information.

Final URL with {ignore}

http://www.example.com/product?{ignore}p1=a&p2=b&p3=c&p4=d

Shopping campaigns only

You can use the following parameters with Product Shopping ads.

Parameter
What it returns
{adtype}

For Product Shopping ads, one of the following is returned:

  • “pla” if the click is coming from a Shopping ad.
  • “pla_multichannel” if the clicked Shopping ad included options for both “online” and “local” shopping channels.

  • “pla_with_promotion” if the clicked Shopping ad displayed a merchant promotion.

  • "pla_with_pog" if the click is coming from a Purchases on Google-enabled Shopping ad.

{merchant_id}
The ID of the Merchant Center account directly owning the clicked Shopping ad.
{product_channel}
The type of shopping channel (“online” or “local”) through which the product featured in the clicked Shopping ad is sold. If an ad includes options for both shopping channels, {product_channel} will show the type of channel clicked on (“online” or “local”) and {adtype} will show “pla_multichannel.”
{product_id}
The ID of the product featured in the clicked ad, as indicated in your Merchant Center data feed.
{product_country}
The country of sale for the product in the clicked ad.
{product_language}
The language of your product information, as indicated in your Merchant Center data feed.
{product_partition_id}
The unique ID for the product group the clicked product ad belongs to.
{store_code}
For local products in Shopping campaigns, you’ll find the unique ID of the local store. This parameter has a 60 character limit.

Video campaigns only

Parameter What it returns
{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.)
{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.)
{creative} A unique ID for your ad.
{device} What device the click came from: "m" for mobile (including WAP), "t" for tablet, and "c" for computer.
{loc_interest_ms} The ID of the location of interest that helped trigger the ad. Visit 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 developer website for location IDs . Reported only for campaigns that show ads to people in your targeted locations.
{network}
{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).
{sourceid}

Hotel campaigns only

Parameter
What it returns
{hotelcenter_id}
The ID of the Hotel Center account linked to the campaign that generated the ad when clicked.
{hotel_id}
The hotel ID of the hotel from the associated account’s hotel feed.
{hotel_partition_id}
The unique ID of the hotel group that the clicked hotel ad belongs to.
{hotel_adtype}
  • Hotel if an ad for a hotel was clicked
  • Room if an ad for a Room Bundle was clicked
{travel_start_day} {travel_start_month} {travel_start_year}
The check-in date’s day, month, and year displayed in the ad.
{travel_end_day} {travel_end_month} {travel_end_year}
The check-out day, month, and year displayed in the ad.
{advanced_booking_window}
The number of days between the date of the ad click and the check-in date being advertised (for example, ‘3’ for an ad clicked on June 5 with a check-in date of June 8).
{date_type}
  • “default” if Google selected the start and end dates (to show the user representative prices)
  • “selected” if the end-user picked the dates themselves in a date picker
{number_of_adults}
The number of adults who will stay in the room that was shown in the ad.
{price_displayed_total}
The total cost of the room that is displayed to the user in the user's local currency.
{price_displayed_tax}
The amount of taxes and fees displayed to the user in the user's local currency.
{user_currency}
Three-letter currency code indicating the user's local currency. This is also the currency for {price_displayed_total} and {price_displayed_tax} . For example, "USD" or "CAD".
{user_language}
The two-letter language code that specifies the display language of the ad. For example, "en" or "fr".
{adtype}
The type of Travel ad that was clicked on.
  • “travel_booking” if the click was on a booking module
  • “travel_promoted” if the click was on a Travel Promotion Ad
{rate_rule_id}
The identifier of any special price that was clicked on. Travel advertisers can apply conditional rates to specific users (for example, loyalty members), specific devices (for example, discount for mobile users), and specific countries.

Demand Gen ads campaigns

The following ValueTrack parameters aren't supported for Demand Gen ads:

  • {placement}
  • {target}
  • {keyword}
  • {ifsearch:[value]}
  • {ifcontent:[value]}
  • {network}
  • {targetid}

Check the available ValueTrack parameters for the values supported.

Performance Max campaigns

Some ValueTrack parameters are fully supported within Performance Max campaigns. Parameters with limited support only apply to some channels or ad formats within the campaign.

Parameter
Compatibility
What it returns
{adtype}
Limited support
The type of ad that was clicked on.
  • “pla” if the click is coming from a Shopping ad.
  • “pla_multichannel” if the clicked Shopping ad included options for both “online” and “local” shopping channels.
  • “pla_with_promotion” if the clicked Shopping ad displayed a merchant promotion.
  • "pla_with_pog" if the click is coming from a Purchases on Google-enabled Shopping ad.
{assetgroupid}
Fully supported
The asset group ID. (Use this when you've set up your tracking information at the account or campaign level and want to know which asset group served your ad.)
{campaignid}
Fully supported
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.)
{device}
Fully supported
What device the click came from: "m" for mobile (including WAP), "t" for tablet, and "c" for computer.
{gclid}
Limited support
The Google click identifier of a click that comes from your ad.
{ifmobile:[value]}
Fully supported
Whatever you define for "[value]," if your ad's clicked from a mobile phone.
{ifnotmobile:[value]}
Fully supported
Whatever you define for "[value]," if your ad's clicked from a computer or tablet.
{loc_interest_ms}
Fully supported
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}
Fully supported
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.
{lpurl}
Fully supported

The final URL. It will be escaped unless you put {lpurl} at the beginning of your tracking template. If {lpurl} is not at the beginning of your tracking template, it escapes the characters ?, =, ", #, \t, ', and [space].

Example

Final URL:http://example.com

Tracking template: {lpurl}?matchtype={matchtype}

Landing page URL:http://example.com?matchtype={matchtype}

{lpurl+2}
Fully supported
The final URL escaped twice. Useful when you have a chain of redirects.
{lpurl+3}
Fully supported
The final URL escaped 3 times. Useful when you have a chain of redirects.
{merchant_id}
Limited support
The ID of the Merchant Center account directly owning the clicked Shopping ad.
{product_channel}
Limited support
The type of shopping channel (“online” or “local”) through which the product featured in the clicked Shopping ad is sold. If an ad includes options for both shopping channels, {product_channel} will show the type of channel clicked on (“online” or “local”) and {adtype} will show “pla_multichannel.”
{product_country}
Limited support
The country of sale for the product in the clicked ad.
{product_id}
Limited support
The ID of the product featured in the clicked ad, as indicated in your Merchant Center data feed.
{product_language}
Limited support
The language of your product information, as indicated in your Merchant Center data feed.
{random}
Fully supported
A random Google-generated number (an unsigned 64-bit integer), commonly used to force the page to reload.

Best practices

Parallel tracking is available for your Google Ads account. Parallel tracking helps load your landing page more quickly, which can reduce lost visits. It sends customers directly from your ad to your final URL while click measurement happens in the background. Parallel tracking is the only click measurement tracking method for all accounts. Check with your click measurement provider to make sure parallel tracking is compatible. Learn more About parallel tracking .

Related links

Was this helpful?

How can we improve it?
true
Google Ads logo
Drive Revenue with Optiscore

Want to improve account health and drive business goals? Learn from industry & Google experts on how to drive revenue with the help of Optimization Score & Auto Apply Recommendations.

Register Now

Search
Clear search
Close search
Google apps
Main menu
15389276132974483832
true
Search Help Center
true
true
true
true
true
73067
false
false
false
true
false
Design a Mobile Site
View Site in Mobile | Classic
Share by: