Parameters transferred in ad URLs

You can transfer various parameters and tags (including UTM tags) in Direct ad URLs. They can be used for tracking various statistical data (such as traffic sources) and assessing the effectiveness of ad campaigns.

What are URL parameters?

URL parameters are variables which can be added to the link to an advertiser's site. Using link parameters and web analytics tools like Yandex.Metrica, Google Analytics, etc., you can obtain additional information about the clicks generated by these links.

For example, you can use a parameter to notify Yandex.Metrica that a user has reached the site via a keyword:



The parameter itself is a "name-value" pair. Depending on the set value, parameters can be as follows:

  • static — you can set the value to be transferred, e.g. utm_term=sony_playstation (utm_term — name, sony_playstation — static value)
  • dynamic — the required values are automatically added by the system, e.g. term={keyword}, where {keyword} stands for the keyword which triggered the ad impression

How to add a parameter

You can add parameters when creating or editing ads in the Link to site field by using the operators ? and &, for example:

http://www.site.ru/?utm_source=yandex-direct&term={keyword}

You should choose a parameter name, e.g. term={keyword} or keyword={keyword}.

Make sure that the pages the links redirect to are available.

Attention. Cyrillic characters transferred in the URL are automatically encoded in UTF-8. It's important that your site correctly accepts requests in this encoding. When encoding Cyrillic characters in UTF-8, the URL will become longer. If the URL exceeds 4096 bytes, only the yclid and _openstat tag values will be transferred.

Yandex.Direct's dynamic parameters

The table below provides a list of values for Yandex.Direct's dynamic parameters which are recommended for collecting detailed statistics.

Value to be inserted in URL

Description

Transferred value

{ad_id} or {banner_id}

ID of ad

number

{addphrases}

Whether the impression was initiated by related keywords

yes — ad impression according to related keyword

no — ad impression according to one of the source phrases

{addphrasestext}

Text of related keyword

keyword text — when serving ads for related keyword

none — this impression was not triggered by a related keyword

{campaign_type}

Campaign type

type1 — Text & Image ads

type2 — Ads for Mobile Apps

type3 — Dynamic ads

type4 — Smart banners

{campaign_id}

Ad campaign ID

number

{creative_id}

Creative ID from the Ad Builder

number

{device_type}

Device type on which impression was made

desktop — desktop

mobile — mobile phone

tablet — tablet

{gbid}

Group ID

number

{keyword}

The keyword for which the ad was displayed (Text & Image Ads or Ads for Mobile Apps)

keyword text without negative keywords

{phrase_id}

The ID of the keyword for the Text & Image Ads or Ads for Mobile Apps

number

{retargeting_id}

ID of the audience target that links an ad group with a retargeting list or targeting by mobile app category. Read more about audience targets in the Yandex.Direct API documentation

number

{coef_goal_context_id}

Bid adjustment ID for retargeting list

number

{interest_id}

ID of a mobile app category number

{adtarget_name}

Dynamic text ad target

name of a dynamic text ad target

{adtarget_id}

ID of a targeting condition for dynamic ad.

number

{position}

Exact position of an ad within a block. Transfers only the position number for which it is not possible to determine the block type where the ad is displayed (use with {position_type})

position number in a block (for example 1)

0 — ad was displayed in the ad networks (YAN or ad exchanges)

{position_type}

Ad block type if the ad appeared on a Yandex search results page

premium — premium placement

other — block to the right or at the bottom

none — ad was displayed in the ad networks (YAN or ad exchanges)

{source}

Display space

site domain (for example, travel.ru) — during impressions in the ad networks (YAN or ad exchanges)

none — during impressions on Yandex search

{source_type}

Type of site on which the ad has been displayed

search — search site

context — ad network site

{region_name} Name of the region where the ad has been displayed name of the region

{region_id}

ID of the region where the ad has been displayed number

A link with dynamic parameters will look something like this:

http://www.site.ru/?type={source_type}&source={source}&added={addphrases}&block={position_type}&pos={position}&key={keyword}&campaign={campaign_id}&retargeting={retargeting_id}&ad={ad_id}&phrase={phrase_id}&gbid={gbid}&device={device_type}&region={region_id}&region_name={region_name}
Note. In sitelinks the insertion of values of the parameters {campaign_id}, {ad_id}, {banner_id}, {phrase_id} is guaranteed only when these parameters are also present in the ad URL itself.

Special parameters {param1} and {param2}

The dynamic parameters {param1} and {param2} are general purpose parameters. First, for collecting statistics you can use them as additional parameters, for which you manually set a list of transferred values. Second, by using {param1} and {param2} you can redirect users to different pages of your site, who all encountered the same ad but according to different keywords.

You can only set {param1} and {param2} values in XLS/XLSX files, in , or via the API.

For example, you can use Excel spreadsheets to set the values like so:

Phrase (including negative keywords)

Link to website

Parameter 1

roses

http://site.ru/{param1}

rose.html

lilac

http://site.ru/{param1}

lilac.html

iris

http://site.ru/{param1}

iris.html

The ad which will be displayed according to the keyword roses will lead to the page http://www.site.ru/rose.html.

The ad which will be displayed according to the keyword lilac will lead to the page http://www.site.ru/lilac.html.

Attention.
  • The link indicated in the uploaded file is checked without the parameters {param1} and {param2}. For example, if the link http://site.ru/{param1} is entered, then Yandex.Direct verifies the page by referring to the link http://site.ru/. Make sure that this page is available and correctly displays in all browsers.

  • Special characters in the values of {param1} and {param2} parameters are automatically encoded in UTF-8. For example, if you use “flowers/lilac.html” as the {param1} parameter, the “/” character (slash) will be converted into “%2F”, and the ad will lead to the http://www.site.ru/flowers%2Flilac.html page.

UTM tags

UTM is a standard means for obtaining statistics. Here are the basic names of UTM tags:

  • utm_source — source of click
  • utm_medium — traffic type
  • utm_campaign — ad campaign name
  • utm_content — additional information which helps to differentiate ads
  • utm_term — keyword

The parameters utm_source, utm_medium, and utm_campaign are required, while utm_content and utm_term are optional. You must use all UTM tags to get the correct information in the standard tags report in Yandex.Metrica. Please note that if you use all UTM tags apart from utm_content, then data for utm_term may not be received, and can only be done by reconstructing the report (you must remove theutm_content dimension in the report settings).

UTM tags can be used with Yandex.Direct's dynamic parameters:

http://www.site.ru/?utm_source={source}&utm_medium=cpc&utm_campaign={campaign_id}&utm_content={position_type}.{position}&utm_term={keyword}

Openstat tags

You can track ad campaign results in Yandex.Direct by using independent third-party statistics systems like Openstat or LiveInternet. Just add the special parameter — tag _openstat to your ad link (see the Openstat documentation for more information).

On the campaign settings page in the Metrica section, check the box marked Add _openstat tag to links. After you've enabled this option, the _openstat tag with encoded data (Unicode) will automatically be added to all your campaign's ads. Make sure that the landing pages that your links with _openstat parameters lead to are available.

Links that use the _openstat tag look like this:

http://www.site.ru/?_openstat=ZGlyZWN0LnlhbmRleC5ydTsxMjM0OzU2Nzg5O3lhbmRleC5ydTpwcmVtaXVt
For Openstat users
Ad click-through statistics can be found in the Click-throughs from Ads report in the Openstat interface (for more information, see the Openstat documentation).
For LiveInternet users
You will see a Direct click-through report in your website statistics.

Using parameters with templates

Parameters can be used with templates:
http://www.site.ru/?key=##&ad_id={ad_id}

Please make sure that the pages to which the template links redirect are available.

For impressions initiated by related keywords, the text and ID of the phrase are not inserted into the template.

Use of special parameters to click-through from one ad to different site pages.

Depending on the keyword, you can use a template along with special parameters to send the user to different pages when they click on an ad.

You can do this using XLS/XLSX files, in , or through the API. If you have several groups of ads of the same type, combine these ads into one group. Just change the group number for all the ads you want to combine into one group. Set a unique keyword for each ad and add a template to the title and text. Add the {param1} parameter to the link for all the ads. Enter its value in the “Parameter 1” column.

If you need to enter several variables at once on the referral page, then use {param1} and {param2} together. Let's say that information on your site is grouped by manufacturer and a separate page was created for each item, for example http://site.ru/trudi/giraffe.html, http://site.ru/aurora/elephant.html.

Enter links in the format http://site.ru/{param1}/{param2}. For each ad, enter the manufacturer in the “Parameter 1” column and the item in “Parameter 2”.

Group Ad Phrase (including negative keywords) Title Text Link to website Parameter 1 Parameter 2
1 1 Rhinos Cute #animals# cheer your soul! Plush #animals# bring cheer to adults and children

http://site.ru/{param1}/{param2}

trudi rhino.html
1 1 giraffe Cute #animals# cheer your soul! Plush #animals# bring cheer to adults and children

http://site.ru/{param1}/{param2}

trudi giraffe.html
1 1 elephant Cute #animals# cheer your soul! Plush #animals# bring cheer to adults and children

http://site.ru/{param1}/{param2}

aurora elephant.html

Ads that will display for the keyword Plush giraffe brings cheer to adults and children will lead to the page http://site.ru/trudi/giraffe.html, whereas the phrase Cute elephant cheers your soul will lead to http://site.ru/aurora/elephant.html.

As a result, keywords from an ad group will get enough impressions and your ad group will avoid the “Rarely served” status.