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 that 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.

Before you begin

If you aren’t familiar with ValueTrack parameters or how tracking works, review the following:


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. In your Google Ads account, click the Campaigns icon Campaigns icon.
  2. Click the Campaigns drop-down in the section menu.
  3. Click Campaigns.
  4. Click the Settings tab at the top and select 'Campaign Settings'.
  5. Add the 'Tracking template' column to your table.
    1. Click the column icon A picture of the Google Ads columns icon above the statistics table, then click Modify columns.
    2. Expand the 'Attributes' option and click Tracking template.
    3. Click Apply.
  6. Use the horizontal scroll bar at the bottom to scroll across the table to find the added column.
  7. Hover over any entry in the 'Tracking template' column.
  8. Click the pencil icon Edit when it appears.
  9. Edit the tracking template or enter {lpurl}, a question mark and then any ValueTrack parameters that 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}
  10. Click Test to test the tracking template.
  11. Click Save.
Set up or edit a tracking template with ValueTrack parameters at the ad group level
  1. In your Google Ads account, click the Campaigns icon Campaigns icon.
  2. Click the Campaigns drop-down in the section menu.
  3. Click Ad groups.
  4. Add the 'Tracking template' column to your table.
    1. Click the column icon A picture of the Google Ads columns icon above the statistics table, then click Modify columns.
    2. Expand the 'Attributes' option and click Tracking template.
    3. Click Apply.
  5. Use the horizontal scroll bar at the bottom to scroll across the table to find the added column.
  6. Hover over any entry in the 'Tracking template' column.
  7. Click the pencil icon Edit when it appears.
  8. Edit the tracking template or enter {lpurl}, a question mark and then any ValueTrack parameters that 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}
  9. Click Test to test the tracking template.
  10. Click Save.
Set up or edit a tracking template with ValueTrack parameters at the ads level
  1. In your Google Ads account, click the Campaigns icon Campaigns icon.
  2. Click the Campaigns drop-down in the section menu.
  3. Click Ads.
  4. Hover over the ad.
  5. Click the pencil icon Edit when it appears and click Edit.
  6. Expand the 'Ad URL options'.
  7. Edit the tracking template or enter {lpurl}, a question mark and then any ValueTrack parameters that 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. Click Test to test the tracking template.
  9. Click Save.
Set up or edit a tracking template with ValueTrack parameters at the sitelink level
  1. In your Google Ads account, click the Campaigns icon Campaigns icon.
  2. Click the Assets drop-down in the section menu.
  3. Click Assets.
  4. Click the ‘Asset type’ link and select Sitelink.
  5. Hover over any of the assets and click the pencil icon Edit when it appears.
  6. Click Edit and then expand Sitelink URL options.
  7. Edit the tracking template or enter {lpurl}, a question mark and then any ValueTrack parameters that 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. Click Test to test the tracking template.
  9. Click Save.
Set up or edit a tracking template with ValueTrack parameters at the keywords level
  1. In your Google Ads account, click the Campaigns icon Campaigns icon.
  2. Click the Audiences, keywords and content drop-down in the section menu, then click Search keywords.
  3. Add the 'Tracking template' column to your table.
    1. Click the column icon A picture of the Google Ads columns icon above the statistics table, then click Modify columns.
    2. Expand the 'Attributes' option and click Tracking template.
    3. Click 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 click when the pencil icon Edit appears.
  6. Enter {lpurl}, a question mark and then any ValueTrack parameters that 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. Click Save.
Set up or edit a tracking template with ValueTrack parameters at the dynamic ad targets level
  1. In your Google Ads account, click the Campaigns icon Campaigns icon.
  2. Click Audiences, keywords and content, then click the Dynamic ad targets page menu.
    Note: You may have to click '+ More' at the bottom of the page menu to view 'Dynamic ads target'.
  3. Add the 'Tracking template' column to your table.
    1. Click the column icon A picture of the Google Ads columns icon above the statistics table, then click Modify columns.
    2. Expand the 'Attributes' option and click Tracking template.
    3. Click 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 click when the pencil icon Edit appears.
  6. Enter {lpurl}, a question mark and then any ValueTrack parameters that 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. Click 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 two 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 (labelled '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} does not include affinity and in-market audience.

{loc_interest_ms} The ID of the location of interest that helped to 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 a search partner, 'd' for the Display Network, 'ytv' for YouTube or 'vp' for Google video partners.
{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 that 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 was clicked from a mobile phone
{ifnotmobile:[value]} Whatever you define for '[value]', if your ad was clicked from a computer or tablet
{ifsearch:[value]} Whatever you define for '[value]', if your ad was clicked from a site in the Google Search Network
{ifcontent:[value]} Whatever you define for '[value]', if your ad was 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, unless you're using a Dynamic Search ad, which 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 the tracking elements of your Final URL to help to reduce the 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, then 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 the tracking elements of your Final URL to help to reduce the 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 is 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 bear 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 is 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 Centre 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 ad that was clicked, as indicated in your Merchant Centre data feed.
{product_country} The country of sale for the product in the ad that was clicked.
{product_language} The language of your product information, as indicated in your Merchant Centre data feed.
{product_partition_id} The unique ID for the product group that the product ad that was clicked belongs to.
{shop_code} For local products in Shopping campaigns, you’ll find the unique ID of the local shop. 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 to 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
{hotelcentre_id} The ID of the Hotel Centre 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 5 June with a check-in date of 8 June).
{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 property 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}

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.
{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 to 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 three 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.

Related links

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Main menu
18334580401783218477
true
Search Help Centre
true
true
true
true
true
73067
false
false
false