What tracking or URL parameters can I use?

What tracking or URL parameters can I use?

Review the URL parameters you can add to your tracking template or destination URLs to find out how visitors got to your website.

You add URL parameters to your destination URL or tracking template to find out how visitors got to your website. URL parameters allow you to track information about the source of an ad click.

Although the variable names and the parameters can change, the structure is always the same:

  • A parameter, enclosed by { } that tells Bing Ads what data you want returned when an ad is clicked. The specific parameters to choose from are listed in the table below.
  • A variable that you define to store that data. The name of the variable is up to you, but it should be the name used in your website's script to store the value that the parameter is returning. Work with your website programmers who can help you define appropriate names to use.

Putting it all together, it looks like this:

www.yourLandingPageURL.com?variable={parameter}

If you are adding more than one variable={parameter}, you separate the variable/parameter pair with an ampersand (&).

Available parameters for:

Destination URL, final URLs, tracking templates and custom parametersexpando image
{CampaignId}
What it returns:

The ID of the campaign that triggered the ad. For example, suppose your destination URL is www.northwindtraders.com/{CampaignId}. Assuming that your campaign ID is 2410012280, the destination URL will be www.northwindtraders.com/2410012280.

{Campaign}
What it returns

The name of the campaign that triggered the ad. For example, suppose your destination URL is www.northwindtraders.com/{Campaign}. Assuming that your campaign name is Sale, the destination URL will be www.northwindtraders.com/Sale.

{AdGroupId}
What it returns

The ID of the ad group that triggered the ad. For example, suppose your destination URL is www.northwindtraders.com/{AdGroupId}. Assuming that your ad group ID is 2410012280, the destination URL will be www.northwindtraders.com/2410012280.

{AdGroup}
What it returns

The name of the ad group that triggered the ad. For example, suppose your destination URL is www.northwindtraders.com/{AdGroup}. Assuming that your ad group ID is Clearance, the destination URL will be www.northwindtraders.com/Clearance.

{TargetId}
What it returns

The ID of the keyword ("kwd"), remarketing list ("aud"), or dynamic ad target (“dat”) that triggered the ad.

{MatchType}
What it returns

The match type used to deliver an ad. This can be different from the {BidMatchType}. For example, if you bid on a broad match and the search term was an exact match. This can help you determine what match types are getting the most clicks.

  • e=exact
  • p=phrase
  • b=broad
  • b=expanded (Expanded match is treated as a broad match.)
{BidMatchType}
What it returns

The keyword bid match type. This can be different than {MatchType}. For example, if you bid on a broad match and the search term was an exact match. When used with {MatchType} this can help you refine your bidding, keyword and landing page strategies.

  • be=bidded exact
  • bp=bidded phrase
  • bb=bidded broad
{Network}
What it returns

The Ad network type on which the ad was served.

  • o = owned and operated (Bing and AOL results)
  • s = syndicated
For example, suppose your destination URL is www.northwindtraders.com/{Network}. Assuming that your network (ad distribution) is Bing, AOL and Yahoo search (owned and operated) only, the destination URL will be www.northwindtraders.com/network=o.
{Device}
What it returns

One of the following codes depending on where the click came from. This list can help you determine what type of devices are generating the most clicks. You can then customize your ads and bids accordingly.

  • m=mobile device
  • t=tablet device
  • c=desktop or laptop computer
{IfMobile:string}
What it returns

The string text (that you define) to the right of the colon if the ad is displayed on a mobile device. For example, if your parameter was {IfMobile:adDisplayedOnMobile} and your ad was displayed on a mobile device, your server log would receive adDisplayedOnMobile.

{IfNotMobile:string}
What it returns

The string text (that you define) to the right of the colon if the ad is displayed on a desktop, laptop, or tablet device. For example, if your parameter looked like this: {IfNotMobile:adNotOnMobile} and your ad was displayed on a mobile device, your server log would receive: adNotOnMobile.

{IfSearch:string}
What it returns

The string text (that you define) to the right of the colon if the ad is displayed on the search network. For example, if your parameter looked like this: {IfSearch:adDisplayedOnSearch} and your ad was displayed on the search network, your server log would receive: adDisplayedOnSearch.

{IfContent:string}
What it returns

The string text (that you define) to the right of the colon if the ad is displayed on the content network. For example, if your parameter looked like this: {IfContent:adDisplayedOnContent} and your ad was displayed on the content network, your server log would receive: adDisplayedOnContent.

{IfNative:string}
What it returns

The string text (that you define) to the right of the colon will be substituted into the URL if the ad is displayed as a native ad. For example, if your parameter looked like this: {IfNative:nativeAd} and your ad was displayed as a native ad, your server log would receive: nativeAd.

{IfPLA:string}
What it returns

The string text (that you define) to the right of the colon will be substituted into the URL if the ad is displayed as a product ad. For example, if your parameter looked like this: {IfPLA:productAd} and your ad was displayed as a product ad, your server log would receive: productAd.

{AdId}
What it returns

The numeric ID of the displayed ad.

You can get your ad ID on the Ads tab on the Campaigns page. If the Ad ID column is not displayed in the table, click Columns and select Ad ID. Then click OK.

{keyword:default}
What it returns

Substitutes the keyword that matched the user's search term. Spaces in the keyword will each be substituted with "%20" to ensure the URL is valid.

Note: You should provide a default string that the system will use if including the substitution value will cause the expanded string to exceed the string limit of the URL.

Substitution of your default text is not supported, so you should not include characters such as a space which would cause the URL to be invalid.

{msclkid}
What it returns

A unique ClickID for the clicks on the ad. To learn more, see Description of methodology

{OrderItemId}
What it returns

The numeric ID for the keyword that triggered the display of your ad.

{param1:default}
What it returns

Substitutes {Param1} in the URL with the Param1 setting of the keyword that matched the user's search term.

Note: You should provide a default string that the system will use if including the substitution value will cause the expanded string to exceed the string limit of the URL.

{param2:default}
What it returns

Substitutes {Param2} in the URL with the Param2 setting of the keyword that matched the user's search term.

Note: You should provide a default string that the system will use if including the substitution value will cause the expanded string to exceed the string limit of the URL.

{param3:default}
What it returns

Substitutes {Param3} in the URL with the Param3 setting of the keyword that matched the user's search term.

Note: You should provide a default string that the system will use if including the substitution value will cause the expanded string to exceed the string limit of the URL.

{QueryString}
What it returns

The search query text that the user entered.

{copy:queryparameter}

{copy} parameter doesn't work with final URLs but it does work with destination URLs.

When an ad with an App Extension, Image ad extension or Sitelink Extension is served, the {copy} string in the ad extension's destination URL is replaced with the specified query parameter from the ad’s resolved destination URL. The resolved destination URL is the URL used by the ad at the time the ad is served; after all dynamic text strings in the ad’s destination URL are substituted with actual values. For example, if a Sitelink Extensions's destination URL contains {copy:myId} and the ad’s resolved destination URL includes ?myId=123, the {copy:myId} string will be replaced with myId=123. If the ad’s resolved destination URL does not include the query parameter, the {copy} string will be replaced with the name portion of the query parameter. For example, myId=.

Note

If you have upgraded your keyword destination URLs to final URL but haven't upgraded your Sitelink Extension URLs yet, the {copy} parameter will still work for the Sitelink Extension. For example:

Keyword Final URL (upgraded):

http://www.example.com?a=1&b=desk

Keyword Mobile URL (upgraded):

http://www.example.com?a=1&b=mob

Sitelink Extension URL (not upgraded):

http://www.example.com?a=1&{copy:b}

Bing Ads does not support the following parameters. If these parameters are used, they will return an empty value:

  • {adextensionid}
  • {loc_physical_ms}
  • {loc_interest_ms}
Important

Custom parameters will return the variable if added to a tracking template but will return an empty value if added to a destination URL.

Tracking templates onlyexpando image

Tracking templates should include a parameter that inserts your landing page URL using either the {lpurl} or other advanced parameters. Once 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.

{lpurl} Basic setup
When to use:

You track your tags on the actual landing page.

Tracking template structure:

{lpurl}, a question mark, and then any parameters

Example:
Final URL:

http://example.com

Tracking template:

{lpurl}?matchtype={matchtype}

Landing page URL:

http://example.com?matchtype={matchtype}

{lpurl} 1 redirect and parameters
When to use:

You have 1 redirect to a tracking website and want to send parameters to it.

Tracking template structure:

Redirect URL, a question mark, url={lpurl}, an ampersand, and then any parameters

Example:
Final URL:

http://example.com

Tracking template:

http://tracker.com?url={lpurl}&matchtype={matchtype}

Landing page URL:

http://tracker.com?url=http%3A%2F%2Fexample.com&matchtype={matchtype}

{lpurl} 1 redirect and landing page parameters (tracking template)
When to use:

You have 1 redirect to a tracking website and want to send parameters to your landing page using a tracking template.

Tracking template structure:

Redirect URL, a question mark, url={lpurl}, %3F, %26, and then any parameters

Since {lpurl} is not at the beginning of the tracking template, you need to add %3F after {lpurl} instead of a question mark. You also need to replace the ampersand (&) with %26.

Example:
Final URL:

http://example.com

Tracking template:

http://tracker.com?url={lpurl}%3F%26matchtype={matchtype}

Landing page URL:

http://tracker.com?url=http%3A%2F%2Fexample.com%3F%26matchtype={matchtype}

{lpurl} 1 redirect and landing page parameters (no tracking template)
When to use:

You have 1 redirect to a tracking website and want to send parameters to your landing page without using a tracking template.

Tracking template structure:

Redirect URL, a question mark, url={lpurl}

Best to store landing page parameters in the final URL when using a redirect URL so that Bing does all the encoding inside {lpurl} when evaluating the tracking template.

Example:
Final URL:

http://example.com?matchtype={matchtype}

Tracking template:

http://tracker.com?url={lpurl}

Landing page URL:

http://tracker.com?url=http%3A%2F%2Fexample.com%3F%26matchtype={matchtype}

Note

We recommend that you put the {lpurl} at the beginning of the tracking template. If you don't, the final URL will be escaped. The characters that will be escaped are ?, =, ", #, \t, ' and [space].

Advanced parameters

There are also advanced parameters that you can use if you have more than 1 redirect or want to use escaped or unescaped URLs. Here is a quick summary:
ParameterWhat it returns
{lpurl+2} The Final URL escaped twice. Also known as double encoding. You use this when you have 2 redirects before reaching the landing page.
Final URL:

http://example.com

Tracking template:

http://a-tracker.com?urlb=http%3A%2F%2Fb-tracker.com%3Furl%3D{lpurl+2}

Landing page URL:

http://a-tracker.com?urlb=http%3A%2F%2Fb-tracker.com%3Furl%3Dhttp%253A%252F%252Fexample.com

{lpurl+3} The Final URL, escaped three times. Also known as triple encoding. You use this when you have 3 redirects before reaching the landing page.
Final URL:

http://example.com

Tracking template:

http://a-tracker.com?urlb=http%3A%2F%2Fb-tracker.com%3Furlc%3Dhttp%253A%252F%252Fc-tracker.com%253Furl%253D{lpurl+3}

Landing page URL:

http://a-tracker.com?urlb=http%3A%2F%2Fb-tracker.com%3Furlc%3Dhttp%253A%252F%252Fc-tracker.com%253Furl%253Dhttp%25253A%25252F%25252Fexample.com

{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.
What characters to add after the URL insertion parameter?expando image

As seen in the examples above, what you add after the URL insertion parameter is dependent on where in the tracking template you place it. You will want to adhere to the following rules or your website/third-party system may not properly save the information from your URL parameters.

ParameterTracking template locationFollowed byExample
{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+2}%253F

Bing Ads will replace the question mark in your tracking template with an ampersand or a correctly escaped version of an ampersand if your final URL already contains a question mark.

Final URL onlyexpando image
Parameter What it returns
{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 parameters.
  • You must use {ignore} in your Final URL if anything in your Final URL can be modified by a third party when someone clicks your ad.
Bing Shopping Campaigns onlyexpando image

If you advertise with product ads in your Bing Shopping Campaigns, the DestinationUrl of a BiddableAdGroupCriterion can include the following dynamic text strings. The strings are case-insensitive and must include the opening and closing braces.

Parameter What it returns
{CriterionId} The identifier of the Bing Shopping product group used with Product Ads.
{product_country} The country of sale for the product in the clicked ad. For example, US, UK, etc.
{ProductId} The numeric ID of the product that triggered your ad. This comes from your Bing Merchant Center catalog and is used with Product Ads.
{product_language} The language of your product information, as indicated in your Merchant Center data feed. For example, EN, FR.
{seller_name} The value associated with the seller for that product, which can be the seller name from the feed or the store name based on if the advertiser is an aggregator or not.

See more videos...