Track clicks with ValueTrack

ValueTrack parameters are a type of URL parameter. These parameters append tracking values to your ads’ landing page URLs and collect additional data about the source of your ad clicks. Want to know if your clicks came from mobile or not? ValueTrack parameters can track that and much more.

About ValueTrack parameters

ValueTrack parameters are a type of URL parameter. Each URL parameter is a piece of text that starts and ends with braces ({}), like {matchtype}. These parameters can be part of your ad’s final URL, tracking template, or custom parameter.

Once someone clicks on your ad, AdWords replaces the ValueTrack parameter with a value that’s based on the details of the ad when it was clicked. For example, the parameter {matchtype} indicates the match type of the keyword that triggered your ad. When you view your data, instead of seeing {matchtype}, ValueTrack records the value "b" for broad match, "p" for phrase match, or "e" for exact match.

Note

When a value can’t be inserted, the ValueTrack parameter will be replaced by an empty space. For example, the ValueTrack parameter {merchant_id} can only be used with Product Listing Ads. The URL http://example.com?merchant={merchant_id} would be replaced by http://example.com?merchant= on a non-Product Listing Ad.

How ValueTrack works

Here's how ValueTrack works:

  1. You add a ValueTrack parameter to your ad's final URL, tracking template, or custom parameter.
  2. When someone clicks your ad, the ValueTrack parameter is replaced with certain details about the ad in the URL that are based on the kind of ValueTrack parameter you use.
  3. You can view these details in Google Analytics or in your third-party software.

Example

Let's say you manage a shoe store with the website http://www.example.com, and you want to track what type of device people are using when they click your ad.

You could set your final URL to www.example.com. Next, you could add the {lpurl} and {device} ValueTrack parameters to your tracking template in URL options (we recommend setting this up at the account level). Your tracking template would look like this:

 

{lpurl}?device={device}

 

Now, when someone searches on their desktop or laptop computer and clicks on your ad, the URL they click through will look like this:

 

www.example.com/?device=c

 

Using this ValueTrack parameter lets your tracking software track devices people use to reach your website.

Some URL parameters have "IF" functions, which means you can specify a particular value that you would like to insert depending on the nature of the ad. You can replace [value] with any text that you prefer—this text is what shows up in your data.

Example

You can see whether your ad was clicked on the Search Network with the {ifsearch:[value]} parameter. If you change [value] to search, you'll see the text "search" in your data if someone clicks your ad on the Search Network (for example, from a Google search results page).

Want to add more than one ValueTrack parameter to a single URL? Simply append them together in your URL using an ampersand (&), like this: matchtype={matchtype}&device={device}.

Tip

Running a campaign for your mobile app? Find out how ValueTrack works with mobile app campaigns.

How to set up ValueTrack parameters

You can set up your ValueTrack parameters at a few different levels. Set up ValueTrack for your whole account, or choose whatever level makes sense for the tracking you’d like to do. We recommend that you set up your tracking by first defining your final URL, then adding your ValueTrack parameters in the “Tracking template” field.

Set up a ValueTrack parameter at the account level tracking template

Remember, you’ll need to use final URLs to define your landing page in order to set up ValueTrack at the account level.

  1. Click the Campaigns tab.
  2. Click the Shared library link in the side navigation bar.
  3. Click URL options.
  4. Next to “Tracking template,” click Edit.
  5. Fill in your final URL, along with a slash, question mark, and the ValueTrack parameter you want to use.
    • For example, if your final URL is www.example.com, and you want to use the {matchtype} parameter, your tracking parameter would be: www.example.com/?matchtype={matchtype}
  6. You don’t need to fill out any custom parameters, since the function of ValueTrack parameters are already defined. Learn more about custom parameters.
  7. Click Save.
Set up a ValueTrack parameter at the ad, sitelink, ad group, or campaign level tracking template
  1. When you create a new ad, keyword, or sitelink, define a final URL as your landing page. The final URL can contain redirects within your domain but not redirects to third party domains.
  2. Under “URL options,” fill in your final URL, along with a slash, question mark, and the ValueTrack parameter you want to use.
    • For example, if your website is www.example.com, and you want to use the {matchtype} parameter, your tracking parameter would be: www.example.com/?matchtype={matchtype}
  3. You don’t need to fill out any custom parameters, since the function of ValueTrack parameters are already defined. Learn more about custom parameters.
  4. Keep in mind that AdWords uses the most specific tracking templates that you create. This means that if you create a tracking template at the ad level, as well as a tracking template at the ad group level that contains it, AdWords will use the ad-level tracking template.
Set up ValueTrack parameter at the keyword or auto target level tracking template

These steps will set up ValueTrack only when you’ve used final URLs to define your landing page.

  1. Go to to the keyword or auto target table, by clicking the Keywords or Auto target tab.
  2. Click the Columns drop-down, then choose Modify columns.
  3. Under “Select metrics,” choose Attributes.
  4. Find “Tracking template” in the list of attributes and click Add.
  5. Click Apply at the bottom of the window.
  6. Hover over any entry in the new “Tracking template” column, and click when the pencil appears.
  7. Fill in the URL you use for tracking. You can include both ValueTrack parameters and custom parameters (custom parameters begin with an underscore, for example, {_mykwid}).
  8. Click Save.  

Tip

Be careful to avoid spaces in your URLs. Spaces will cause your URLs to "break," and the tracking won't work.

You may see %20 appear 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 info 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 info at the account or campaign level and want to know which ad group served your ad.)
{feeditemid} The ID of the extension that was clicked.
{targetid} The ID of the keyword (labeled "kwd"), dynamic search ad ("dsa"), or remarketing list target ("aud") that triggered an ad. 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 "kwd-123:aud-456".
{loc_physical_ms} The ID of the geographical location of the click. See developer website for location IDs.
{loc_interest_ms} The ID of the location of interest that helped trigger the ad. See developer website for location IDs.
{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, or "d" for the Display Network
{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")
{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 is matched to the search query. For the Display Network: the keyword from your account that is matched to 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 AdWords API
{param2}  Creative parameter #2, if you're using the AdParamService with the AdWords API
{random}  A random Google-generated number (an unsigned 64-bit integer), commonly used to force the page to reload
{aceid}  The control or experiment ID from your AdWords Campaign Experiments
{adposition} The position on the page that your ad appeared in, with a value like "1t2"(this means page 1, top, position 2)
{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 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

Note: {ignore} can’t be embedded inside other ValueTrack parameters (e.g., {ifmobile:{ignore}} is not allowed).

Tracking template only
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} is not at the beginning of your tracking template, it escapes the characters ?, =, ", #, \t, ', and [space].
{lpurl+2} The final URL, escaped twice. Useful when you have a chain of redirects.
{lpurl+3} The final URL, escaped three 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 three times. Useful when you have a chain of redirects.

Important

If you want to use these ValueTrack parameters along with additional URL parameters in your tracking template, be sure to 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, AdWords 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.

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

  • {ignore} can’t be embedded inside other ValueTrack parameters (e.g., {ifmobile:{ignore}} is not 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

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

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

Shopping campaigns only
Parameter What it returns
{adtype} One of the following:
  • “pla” if the click is coming from a Product Listing Ad.
  • “pla_multichannel” if the clicked Product Listing Ad included options for both “online” and “local” shopping channels.
  • “pla_with_promotion” if the clicked Product Listing Ad displayed a merchant promotion.
{merchant_id} The ID of the Google Merchant Center account directly owning the clicked Product Listing Ad.
{product_channel} The type of shopping channel (“online” or “local”) through which the product featured in the clicked Product Listing 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 {ad_type} 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} With a campaign using the local shopping channel, you’ll see the unique ID of the local store. This parameter has a 60 character limit.

How you can use ValueTrack

Depending on your advertising goals, you can use ValueTrack to get more details about your ad performance -- such as finding out where your ads get the most traffic, or which ads and keywords get the most clicks. We'll illustrate just a few examples of ways you can use ValueTrack.

Remember, your options aren't limited to just the scenarios below -- you can use any combination of ValueTrack parameters listed in this article to gather more details about your ads.

Example #1: Networks

Campaign type

Keyword-targeted

Goal

You want to know how much of your ad traffic is coming from the Google Search Network (search sites like Google.com and Amazon.com) versus the Google Display Network (content sites like Gmail and the New York Times).

URL parameter

ValueTrack allows you to set two tracking URLs per keyword: {ifsearch:[value]} for search, and {ifcontent:[value]} for display.

Sample URL

Since only one parameter will be triggered by your ad and therefore only one value will appear in your data, you don't need to include an & between the two URL parameters. The URL parameters will look like this: {ifsearch:[value]}{ifcontent:[value]}.

In our example, we replaced [value] with "Search Network" for the ifsearch condition and "Display Nework" for the ifcontent condition, and we used the label source. The resulting ValueTrack URL looks like this:
http://www.example.com/?source={ifsearch:SearchNetwork}{ifcontent:DisplayNetwork}

Sample data

ValueTrack will update your URLs with information about the network that the ad appeared on.

  • For a Search Network click, you'll see:
    http://www.example.com/?source=SearchNetwork
  • For a Display Network click, you'll see:
    http://www.example.com/?source=DisplayNetwork
Example #2: Keywords and match types

Campaign type

Keyword-targeted

Goal

You want to see which keyword triggered an ad that a customer clicked, as well as what the keyword's match type was.

URL parameter

For search campaigns, the {keyword} parameter will tell you the specific keyword that triggered your ad for search campaigns. For display campaigns, the best-matching keyword will be reported, since targeting on the Display Network is done at the ad group level.

The {matchtype} parameter records the match type of the keyword that resulted in the ad click ("b" for broad or modified broad, "p" for phrase, or "e" for exact).

Sample URL

In our example, we used the labels keyword and matchtype. The resulting ValueTrack URL looks like this:
http://www.example.com/?keyword={keyword}&matchtype={matchtype}

Sample data

ValueTrack will update your URLs with the actual keyword and match type:
http://www.example.com/?keyword=socks&matchtype=e
http://www.example.com/?keyword=pink%20socks&matchtype=p

Example #3: Ads

Campaign type

Placement-targeted campaigns and keyword-targeted campaigns that target the Google Display Network.

Description

You want to see the specific ad that was displayed and received the click.

Parameters

The {creative} parameter records the creative ID of the ad that was displayed.

Sample URL

In our example, we used the label creative. The resulting ValueTrack URL looks like this:
http://www.example.com/?creative={creative}

Sample data

ValueTrack will update your URLs with the ad's creative ID:
http://www.example.com/?creative=599041118

Example #4: Placements

Campaign type

Placement-targeted

Description

You'd like to find out which category your ad appeared for in a placement-targeted campaign.

Parameter

When using a keyword-targeted campaign, the {placement} parameter works on display campaigns to record the domain where the ad was displayed (gmail.com, for example). For a placement-targeted campaign, the {placement} parameter records the matching placement targeting criteria for the website where your ad appears (widgetreviews.com/homepage.html, for example). In other words, we'll record whatever placement you decided to target, instead of the full URL of the website where your ad appears.

The {target} parameter records the placement category that generated the click.

Sample URL

In our example, we used the labels target and placement. The resulting ValueTrack URL looks like this:
http://www.example.com/?target={target}&placement={placement}

Sample data

ValueTrack will update your URLs with the placement and placement category:
http://www.example.com/?target=%2Fentertainment%2Fcelebrities&placement=gmail.com

Example #5: Devices

Campaign type

All campaigns

Description

You'd like to find out the device on which your ad appeared.

Parameter

{device} is replaced with "m" if your ad appeared on mobile devices, "t" if on tablet devices, or "c" if on desktop or laptop computers.

Sample URL

In our example, we used the label “device.” The resulting ValueTrack URL looks like this:
http://www.example.com/?device={device}

Sample data

ValueTrack will update your URLs with information about the device on which your ad appeared.

  • For a click from a mobile device, you'll see:
    http://www.example.com/?device=m
  • For a click from a tablet device, you’ll see:
    http://www.example.com/?device=t
  • For a click from a desktop or laptop computer, you’ll see:
    http://www.example.com/?device=c
Example #6: Ifmobile and Ifnotmobile

Campaign type

All campaigns

Description

You'd like to append different values to your URL depending on which device your ad appeared.

Parameter

{ifmobile:[value]} is replaced with [value] if your ad shows on a mobile device.

{ifnotmobile:[value]} is replaced with [value] if your ad shows on a tablet or on desktop and laptop computers.

Sample URL

Let’s say that you track performance by device, using your own internal IDs. For the keyword “widgets,” you have an internal ID of “df32” on mobile devices, and “df33” on tablets and computers. As a result, you may want to use a custom parameter to specify different values for the same keyword, depending on the device.

Example: adding ifmobile and ifnotmobile at the ad level
Final URL http://www.example.com
Tracking template {lpurl}?myid={_myid}
Custom parameter {my_id}={ifmobile:df32}{ifnotmobile:df33}
 

Now when someone clicks your ad, your tracking will update based on which device your ad appeared.

For a click from a mobile device, you'll see:
http://www.example.com/?myid=df32

For a click from a tablet or computer, you’ll see:
http://www.example.com/?myid=df33

Was this article helpful?