Changing a tag

Changes data for the specified tag.

Note.

This method updates only those parameters that are explicitly listed in the input data. Values of parameters that are not specified in input data are not changed or deleted.

For example, if the input data includes the site parameter but doesn't include the mirrors parameter, the site domain will be assigned a new value, while the mirror will remain unchanged.

  1. Request syntax
  2. In the request body
  3. Response format

Request syntax

counterId: ID of the tag that you want to get information about.

https://api-metrika.yandex.net/management/v1/counter/{counterId}
 ? [field=<string>]
fieldOne or several additional parameters of a returned object. The names of the additional parameters are specified in any order, separated by commas, without spaces. Example: field=goals,mirrors,grants,filters,operation.
fieldOne or several additional parameters of a returned object. The names of the additional parameters are specified in any order, separated by commas, without spaces. Example: field=goals,mirrors,grants,filters,operation.

In the request body


{
    "counter" : {
        "name" :  < string > ,
        "site2" : {
            "site" :  < string > 
        },
        "gdpr_agreement_accepted" :  < boolean > ,
        "mirrors2" : [ {
            "site" :  < string > 
        }, ... ],
        "goals" : [  < goal > , ... ],
        "filters" : [ {
            "attr" :  < filter_attribute > ,
            "type" :  < filter_type > ,
            "value" :  < string > ,
            "action" :  < filter_action > ,
            "status" :  < filter_status > ,
            "with_subdomains" :  < boolean > 
        }, ... ],
        "operations" : [ {
            "action" :  < operation_type > ,
            "attr" :  < operation_attribute > ,
            "value" :  < string > ,
            "status" :  < operation_status > 
        }, ... ],
        "grants" : [ {
            "user_login" :  < string > ,
            "user_uid" :  < long > ,
            "perm" :  < grant_type > ,
            "comment" :  < string > ,
            "partner_data_access" :  < boolean > 
        }, ... ],
        "labels" : [ {
            "id" :  < int > ,
            "name" :  < string > 
        }, ... ],
        "webvisor" : {
            "urls" :  < string > ,
            "arch_enabled" :  < boolean > ,
            "arch_type" :  < webvisor_arch_type > ,
            "load_player_type" :  < webvisor_load_player_type > ,
            "wv_version" :  < integer > ,
            "wv_forms" :  < boolean > 
        },
        "code_options" : {
            "async" :  < boolean > ,
            "informer" : {
                "enabled" :  < boolean > ,
                "type" :  < informer_type > ,
                "size" :  < integer > ,
                "indicator" :  < informer_metric > ,
                "color_start" :  < string > ,
                "color_end" :  < string > ,
                "color_text" :  < integer > ,
                "color_arrow" :  < integer > 
            },
            "visor" :  < boolean > ,
            "track_hash" :  < boolean > ,
            "xml_site" :  < boolean > ,
            "clickmap" :  < boolean > ,
            "in_one_line" :  < boolean > ,
            "ecommerce" :  < boolean > ,
            "alternative_cdn" :  < boolean > 
        },
        "create_time" :  < date > ,
        "time_zone_name" :  < string > ,
        "time_zone_offset" :  < int > ,
        "source" :  < counter_source > ,
        "monitoring" : {
            "enable_monitoring" :  < int > ,
            "emails" : [  < string > , ... ],
            "enable_sms" :  < int > ,
            "sms_time" :  < string > ,
            "phones" : [  < string > , ... ],
            "phone_ids" : [  < long > , ... ],
            "possible_phones" : [  < string > , ... ],
            "possible_phone_ids" : [  < string > , ... ]
        },
        "filter_robots" :  < integer > ,
        "visit_threshold" :  < integer > ,
        "offline_options" : {
            "offline_conversion_extended_threshold" :  < boolean > ,
            "offline_calls_extended_threshold" :  < boolean > ,
            "offline_visits_extended_threshold" :  < boolean > 
        },
        "publisher_options" : {
            "enabled" :  < boolean > ,
            "schema" :  < publisher_schema > ,
            "schema_options" : [  < publisher_schema > , ... ]
        },
        "autogoals_enabled" :  < boolean > ,
        "counter_flags" : {
            "use_in_benchmarks" :  < boolean > ,
            "direct_allow_use_goals_without_access" :  < boolean > ,
            "collect_first_party_data" :  < boolean > 
        },
        "mirrors_remove" :  < int > ,
        "goals_remove" :  < int > ,
        "filters_remove" :  < int > ,
        "operations_remove" :  < int > ,
        "grants_remove" :  < int > 
    }
}
Parameters Description
counter Tag.
counter
name Tag name.
site2 Full site domain.
gdpr_agreement_accepted Acceptance of the “Yandex Metrica” Data Processing Agreement.

Possible values:

  • 0: Agreement not accepted (default).
  • 1: Agreement accepted.
mirrors2 List of site mirrors (domains).
goals List of structures with information on tag goals.
filters List of structures with information on tag filters.
operations List of structures with information on tag actions.
grants List of structures with information on access rights to the tag.
labels List of structures with information on tags.
session replay Structure with information on Session Replay settings.
code_options Code snippet settings.
create_time Date and time when the tag was created.
time_zone_name Time zone for calculating statistics.
time_zone_offset Current time zone offset from Greenwich, minutes.
source Tag type.
monitoring

Settings for monitoring site availability.

filter_robots Filtering of robots.

Possible values:

  • 1: Filter robots by strict rules only (default).
  • 2: Filter robots by strict rules and by behavior.
visit_threshold Session timeout in seconds.

Defaullt value is "1800"

offline_options Offline event settings.
publisher_options Structure with information on content analytics settings.
autogoals_enabled Enabling automatic goals.

Possible values:

  • true: The option is enabled.
  • false: The option is disabled.
counter_flags Data security and usage.
mirrors_remove Whether to remove mirrors

Possible values:

  • 0: Don't remove mirrors (default).
  • 1: Ignore the input mirrors parameter (if specified), and also remove any previously set site mirrors for the tag.
goals_remove Whether to remove goals

Possible values:

  • 0: Do not remove goals (default).
  • 1: Ignore the input goals parameter (if specified), and also remove any previously set goals for the tag.
filters_remove Whether to remove filters

Possible values:

  • 0: Do not remove filters (default).
  • 1: Ignore the input filters parameter (if specified), and also remove any previously set filters for the tag.
operations_remove Whether to remove actions

Possible values:

  • 0: Do not remove actions (default).
  • 1: Ignore the input operations parameter (if specified) and also remove any previously set actions for the tag.
grants_remove Whether to remove access settings

Possible values:

  • 0: Do not remove access settings (default).
  • 1: Ignore the input grants parameter (if specified), and also remove any previously set access settings for the tag.
site2
site Full site domain.
mirrors2
site Full site domain.
filters
attr Type of data to apply the filter to.

Possible values:

  • title: Page title.
  • client_ip: IP address.
  • url: Page URL.
  • referer: Referrer.
  • uniq_id: Special filter attribute “Don't count my sessions”.
type Filter type or action for filter.

Possible values:

  • equal: Equal to.
  • start: Starts with.
  • contain: Contains.
  • interval: In the interval, used only with the data type “Ipad dress” (attr = client_ip).
  • me: My visits, used only with the data type attr = uniq_id.
  • only_mirrors: Only site and mirrors, used only for the data type “page URL” (attr = url) and the filter type “only record traffic” (action = include), as well as when mirrors are specified for the tag.
  • regexp: Regular expression.
value Filter value.
action Filter type.

Possible values:

  • exclude: Exclude traffic.
  • include: Keep traffic only.
status Filter status.

Possible values:

  • active: Filter is used.
  • disabled: Filter disabled (without deletion).
with_subdomains Filter by subdomains.
operations
action Action type.

Possible values:

  • cut_fragment: Remove anchor from URL.
  • cut_parameter: Remove specific parameter from URL.
  • cut_all_parameters: Cut all parameters from URL.
  • merge_https_and_http: Replace https:// with http://.
  • to_lower: Convert to lower case.
  • replace_domain: Replace domain.
attr Field for filtering.

Possible values:

  • referer: Referrer.
  • url: Page URL.
value Value for replacement.
status Action status.

Possible values:

  • active: Action is used.
  • disabled: Action is disabled (without deletion).
grants
user_login

Login of a user with tag management rights.

This parameter contains an empty string if tag statistics are in public access (perm = public_stat)

user_uid

uid of a user with tag management rights.

Parameter is 0 if tag statistics are in public access (perm = public_stat)

perm Permission level.

Possible values:

  • public_stat: Public access to statistics.
  • view: Read only.
  • edit: Full access.
comment

Arbitrary comment. The maximum number of characters is 255.

partner_data_access

Access to the Monetization report group. The user can view reports and add dimensions and metrics from the Monetization group to other reports.

If the user has edit rights, reports from the Monetization group are already available to them.

Possible values:

  • true: Access granted.
  • false: Access denied.
labels
id Tag ID.
name Tag name.
webvisor
urls List of pages for saving.
arch_enabled Saving site pages.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
arch_type Recording page content.

Possible values:

  • none: Disabled.
  • load: Download from site.
  • html: From browser.
load_player_type Loading pages in the player.

Possible values:

  • proxy: As an anonymous user.
  • on_your_behalf: As you.
wv_version Session Replay version.
wv_forms Records the content of fields and forms.

Possible values:

  • 0: Don't record the content of fields and forms, except the ones marked with the -metrika-recordkeys CSS class.
  • 1: Record the content of fields and forms, except the ones marked with the -metrika-nokeys CSS class (default).
code_options
async Asynchronous code snippet.

Possible values:

  • 0: Disabled.
  • 1: Enabled (default).
informer Informer settings.
visor Record and analysis of site user behavior.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
track_hash Hash tracking in the browser address bar. The option applies to AJAX sites.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
xml_site For XML sites. The "noscript" element cannot be used in XML documents.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
clickmap Gathering statistics for the Click Map report.

Possible values:

  • 0: Disabled.
  • 1: Enabled (default).
in_one_line Print code snippet as a single string.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
ecommerce Collecting E-commerce data.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
alternative_cdn Allows you to correctly register sessions from regions in which access to Yandex resources is restricted. It might take longer to load the tag code when using this option.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
informer
enabled Permission to display the informer.

Possible values:

  • 0: Informer is not displayed (default).
  • 1: Informer is displayed.
type Informer type.

Possible values:

  • simple: Simple.
  • ext: Extended (default).
size Informer size.

Possible values:

  • 1: 80×15
  • 2: 80х31
  • 3: 88×31 (default) The value in the "indicator" field doesn't affect the layout of this type of informer.
indicator Parameter to be displayed on the informer.

Possible values:

  • pageviews: Pageviews (default).
  • visits: Sessions.
  • uniques: Users.
color_start Beginning (top) color of the informer in RRGGBBAA format. RR, GG, BB are saturated red, green, and blue colors. The level of saturation for every color is set with a value ranging from 00 to FF. AA is transparency from 00 (transparent) to FF (opaque).

Default value: "FFFFFFFF."

color_end Ending (bottom) color of the informer in RRGGBBAA format. The parameter is intended for creating background gradient. Color saturation and transparency are set the same way as with the "color_start" parameter.

Default value: "EFEFEFFF"

color_text Color of the text in the informer.

Possible values:

  • 0: Black (default).
  • 1: White.
color_arrow Color of the arrow in the informer.

Possible values:

  • 0: Black.
  • 1: Purple (default).
monitoring
enable_monitoring

Notifications for monitoring site availability. Possible values:

  • 0: User doesn't receive notifications (default).
  • 1: Monitoring notifications enabled.
emails

List of email addresses for getting site monitoring notifications. Can contain one or several addresses, separated by commas

enable_sms

SMS notifications for monitoring site availability. Possible values:

  • 0: User doesn't receive SMS-notifications (default).
  • 1: Monitoring SMS notifications enabled.
sms_time

Permitted time ranges for sending SMS notifications. The ranges are specified by days of the week from Monday to Sunday. If the range is not specified for a particular day, SMS notifications will not be sent on that day.

Days of the week are separated by semicolons as shown in the following example:

8-9;8-9;;20-22;;;

This value permits sending SMS from 8:00 to 9:59 on Monday and Tuesday and from 20:00 to 22:59 on Thursday.

Each specified hour corresponds to an interval of time from the beginning until the end of that hour. The number 9 thus indicates the interval from 9 hours 00 minutes through 9 hours 59 minutes.

Ranges can consist of "from-to" intervals and individual hours, for example 7-12,16,18,22-23. The components of such ranges are separated by commas.

phones

A list of phone numbers for receiving site monitoring notifications. Can contain one or more numbers separated by commas.

To subscribe to notifications, get possible phone numbers and their IDs (possible_phones and possible_phones_ids) using the query /management/v1/counter/{counterId}. Pass this data in the phones and phone_ids parameters when editing a tag.

phone_ids

IDs of phone numbers for receiving monitoring notifications. The order of IDs matches the order of phone numbers in the phones parameter.

possible_phones

Possible phone numbers for receiving site monitoring notifications. Can contain one or more numbers separated by commas.

possible_phone_ids IDs of possible phone numbers for receiving site monitoring notifications. The order of the IDs matches the order of phone numbers in the possible_phones parameter.
offline_options
offline_conversion_extended_threshold Extended period for tracking offline conversions.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
offline_calls_extended_threshold Extended call tracking period.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
offline_visits_extended_threshold Extended tracking period for offline visits.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
publisher_options
enabled Collection of content analytics data. To start collecting statistics, add the markup to your site.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
schema The type of schema markup used on the site. When creating or editing a tag, pass the value from the schema_options field in this field.
schema_options Available site markup options.
counter_flags
use_in_benchmarks

Get access to market reports.

The option allows Yandex Metrica to use aggregated anonymized tag data to build market analytics reports.

The collected data helps you understand the state of your business relative to the market.

If the tag was created recently, the option is enabled by default.

Possible values:

  • false
  • true
direct_allow_use_goals_without_access

Allow optimizing campaigns for goals without access to the tag.

If your ad campaigns are managed in Yandex Direct by someone other than you, such as an agency or a setup expert, you can grant permissions for using existing goals in Yandex Metrica. If the tag was created recently, the option is enabled by default. For more information, see Help.

Possible values:

  • false
  • true
collect_first_party_data

Use additional tracking settings.

This option allows Yandex Metrica to use the contact information entered by the user on the site to enhance advertising algorithms and more accurately analyze user behavior. This helps you increase the effectiveness of ad campaigns and learn more about users' behavior, even if they use browsers that limit cross-site cookies (third-party cookies), such as Safari and Mozilla Firefox.

Possible values:

  • false
  • true
Parameters Description
counter Tag.
counter
name Tag name.
site2 Full site domain.
gdpr_agreement_accepted Acceptance of the “Yandex Metrica” Data Processing Agreement.

Possible values:

  • 0: Agreement not accepted (default).
  • 1: Agreement accepted.
mirrors2 List of site mirrors (domains).
goals List of structures with information on tag goals.
filters List of structures with information on tag filters.
operations List of structures with information on tag actions.
grants List of structures with information on access rights to the tag.
labels List of structures with information on tags.
session replay Structure with information on Session Replay settings.
code_options Code snippet settings.
create_time Date and time when the tag was created.
time_zone_name Time zone for calculating statistics.
time_zone_offset Current time zone offset from Greenwich, minutes.
source Tag type.
monitoring

Settings for monitoring site availability.

filter_robots Filtering of robots.

Possible values:

  • 1: Filter robots by strict rules only (default).
  • 2: Filter robots by strict rules and by behavior.
visit_threshold Session timeout in seconds.

Defaullt value is "1800"

offline_options Offline event settings.
publisher_options Structure with information on content analytics settings.
autogoals_enabled Enabling automatic goals.

Possible values:

  • true: The option is enabled.
  • false: The option is disabled.
counter_flags Data security and usage.
mirrors_remove Whether to remove mirrors

Possible values:

  • 0: Don't remove mirrors (default).
  • 1: Ignore the input mirrors parameter (if specified), and also remove any previously set site mirrors for the tag.
goals_remove Whether to remove goals

Possible values:

  • 0: Do not remove goals (default).
  • 1: Ignore the input goals parameter (if specified), and also remove any previously set goals for the tag.
filters_remove Whether to remove filters

Possible values:

  • 0: Do not remove filters (default).
  • 1: Ignore the input filters parameter (if specified), and also remove any previously set filters for the tag.
operations_remove Whether to remove actions

Possible values:

  • 0: Do not remove actions (default).
  • 1: Ignore the input operations parameter (if specified) and also remove any previously set actions for the tag.
grants_remove Whether to remove access settings

Possible values:

  • 0: Do not remove access settings (default).
  • 1: Ignore the input grants parameter (if specified), and also remove any previously set access settings for the tag.
site2
site Full site domain.
mirrors2
site Full site domain.
filters
attr Type of data to apply the filter to.

Possible values:

  • title: Page title.
  • client_ip: IP address.
  • url: Page URL.
  • referer: Referrer.
  • uniq_id: Special filter attribute “Don't count my sessions”.
type Filter type or action for filter.

Possible values:

  • equal: Equal to.
  • start: Starts with.
  • contain: Contains.
  • interval: In the interval, used only with the data type “Ipad dress” (attr = client_ip).
  • me: My visits, used only with the data type attr = uniq_id.
  • only_mirrors: Only site and mirrors, used only for the data type “page URL” (attr = url) and the filter type “only record traffic” (action = include), as well as when mirrors are specified for the tag.
  • regexp: Regular expression.
value Filter value.
action Filter type.

Possible values:

  • exclude: Exclude traffic.
  • include: Keep traffic only.
status Filter status.

Possible values:

  • active: Filter is used.
  • disabled: Filter disabled (without deletion).
with_subdomains Filter by subdomains.
operations
action Action type.

Possible values:

  • cut_fragment: Remove anchor from URL.
  • cut_parameter: Remove specific parameter from URL.
  • cut_all_parameters: Cut all parameters from URL.
  • merge_https_and_http: Replace https:// with http://.
  • to_lower: Convert to lower case.
  • replace_domain: Replace domain.
attr Field for filtering.

Possible values:

  • referer: Referrer.
  • url: Page URL.
value Value for replacement.
status Action status.

Possible values:

  • active: Action is used.
  • disabled: Action is disabled (without deletion).
grants
user_login

Login of a user with tag management rights.

This parameter contains an empty string if tag statistics are in public access (perm = public_stat)

user_uid

uid of a user with tag management rights.

Parameter is 0 if tag statistics are in public access (perm = public_stat)

perm Permission level.

Possible values:

  • public_stat: Public access to statistics.
  • view: Read only.
  • edit: Full access.
comment

Arbitrary comment. The maximum number of characters is 255.

partner_data_access

Access to the Monetization report group. The user can view reports and add dimensions and metrics from the Monetization group to other reports.

If the user has edit rights, reports from the Monetization group are already available to them.

Possible values:

  • true: Access granted.
  • false: Access denied.
labels
id Tag ID.
name Tag name.
webvisor
urls List of pages for saving.
arch_enabled Saving site pages.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
arch_type Recording page content.

Possible values:

  • none: Disabled.
  • load: Download from site.
  • html: From browser.
load_player_type Loading pages in the player.

Possible values:

  • proxy: As an anonymous user.
  • on_your_behalf: As you.
wv_version Session Replay version.
wv_forms Records the content of fields and forms.

Possible values:

  • 0: Don't record the content of fields and forms, except the ones marked with the -metrika-recordkeys CSS class.
  • 1: Record the content of fields and forms, except the ones marked with the -metrika-nokeys CSS class (default).
code_options
async Asynchronous code snippet.

Possible values:

  • 0: Disabled.
  • 1: Enabled (default).
informer Informer settings.
visor Record and analysis of site user behavior.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
track_hash Hash tracking in the browser address bar. The option applies to AJAX sites.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
xml_site For XML sites. The "noscript" element cannot be used in XML documents.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
clickmap Gathering statistics for the Click Map report.

Possible values:

  • 0: Disabled.
  • 1: Enabled (default).
in_one_line Print code snippet as a single string.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
ecommerce Collecting E-commerce data.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
alternative_cdn Allows you to correctly register sessions from regions in which access to Yandex resources is restricted. It might take longer to load the tag code when using this option.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
informer
enabled Permission to display the informer.

Possible values:

  • 0: Informer is not displayed (default).
  • 1: Informer is displayed.
type Informer type.

Possible values:

  • simple: Simple.
  • ext: Extended (default).
size Informer size.

Possible values:

  • 1: 80×15
  • 2: 80х31
  • 3: 88×31 (default) The value in the "indicator" field doesn't affect the layout of this type of informer.
indicator Parameter to be displayed on the informer.

Possible values:

  • pageviews: Pageviews (default).
  • visits: Sessions.
  • uniques: Users.
color_start Beginning (top) color of the informer in RRGGBBAA format. RR, GG, BB are saturated red, green, and blue colors. The level of saturation for every color is set with a value ranging from 00 to FF. AA is transparency from 00 (transparent) to FF (opaque).

Default value: "FFFFFFFF."

color_end Ending (bottom) color of the informer in RRGGBBAA format. The parameter is intended for creating background gradient. Color saturation and transparency are set the same way as with the "color_start" parameter.

Default value: "EFEFEFFF"

color_text Color of the text in the informer.

Possible values:

  • 0: Black (default).
  • 1: White.
color_arrow Color of the arrow in the informer.

Possible values:

  • 0: Black.
  • 1: Purple (default).
monitoring
enable_monitoring

Notifications for monitoring site availability. Possible values:

  • 0: User doesn't receive notifications (default).
  • 1: Monitoring notifications enabled.
emails

List of email addresses for getting site monitoring notifications. Can contain one or several addresses, separated by commas

enable_sms

SMS notifications for monitoring site availability. Possible values:

  • 0: User doesn't receive SMS-notifications (default).
  • 1: Monitoring SMS notifications enabled.
sms_time

Permitted time ranges for sending SMS notifications. The ranges are specified by days of the week from Monday to Sunday. If the range is not specified for a particular day, SMS notifications will not be sent on that day.

Days of the week are separated by semicolons as shown in the following example:

8-9;8-9;;20-22;;;

This value permits sending SMS from 8:00 to 9:59 on Monday and Tuesday and from 20:00 to 22:59 on Thursday.

Each specified hour corresponds to an interval of time from the beginning until the end of that hour. The number 9 thus indicates the interval from 9 hours 00 minutes through 9 hours 59 minutes.

Ranges can consist of "from-to" intervals and individual hours, for example 7-12,16,18,22-23. The components of such ranges are separated by commas.

phones

A list of phone numbers for receiving site monitoring notifications. Can contain one or more numbers separated by commas.

To subscribe to notifications, get possible phone numbers and their IDs (possible_phones and possible_phones_ids) using the query /management/v1/counter/{counterId}. Pass this data in the phones and phone_ids parameters when editing a tag.

phone_ids

IDs of phone numbers for receiving monitoring notifications. The order of IDs matches the order of phone numbers in the phones parameter.

possible_phones

Possible phone numbers for receiving site monitoring notifications. Can contain one or more numbers separated by commas.

possible_phone_ids IDs of possible phone numbers for receiving site monitoring notifications. The order of the IDs matches the order of phone numbers in the possible_phones parameter.
offline_options
offline_conversion_extended_threshold Extended period for tracking offline conversions.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
offline_calls_extended_threshold Extended call tracking period.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
offline_visits_extended_threshold Extended tracking period for offline visits.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
publisher_options
enabled Collection of content analytics data. To start collecting statistics, add the markup to your site.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
schema The type of schema markup used on the site. When creating or editing a tag, pass the value from the schema_options field in this field.
schema_options Available site markup options.
counter_flags
use_in_benchmarks

Get access to market reports.

The option allows Yandex Metrica to use aggregated anonymized tag data to build market analytics reports.

The collected data helps you understand the state of your business relative to the market.

If the tag was created recently, the option is enabled by default.

Possible values:

  • false
  • true
direct_allow_use_goals_without_access

Allow optimizing campaigns for goals without access to the tag.

If your ad campaigns are managed in Yandex Direct by someone other than you, such as an agency or a setup expert, you can grant permissions for using existing goals in Yandex Metrica. If the tag was created recently, the option is enabled by default. For more information, see Help.

Possible values:

  • false
  • true
collect_first_party_data

Use additional tracking settings.

This option allows Yandex Metrica to use the contact information entered by the user on the site to enhance advertising algorithms and more accurately analyze user behavior. This helps you increase the effectiveness of ad campaigns and learn more about users' behavior, even if they use browsers that limit cross-site cookies (third-party cookies), such as Safari and Mozilla Firefox.

Possible values:

  • false
  • true

Sample request

PUT https://api-metrika.yandex.net/management/v1/counter/{counterId}?

Response format


{
    "counter" : {
        "id" :  < int > ,
        "status" :  < counter_status > ,
        "owner_login" :  < string > ,
        "code_status" :  < string > ,
        "activity_status" :  < counter_activity_status > ,
        "name" :  < string > ,
        "site2" : {
            "site" :  < string > 
        },
        "type" :  < counter_type > ,
        "favorite" :  < boolean > ,
        "gdpr_agreement_accepted" :  < boolean > ,
        "permission" :  < counter_permission > ,
        "mirrors2" : [ {
            "site" :  < string > 
        }, ... ],
        "goals" : [  < goal > , ... ],
        "filters" : [ {
            "id" :  < int > ,
            "attr" :  < filter_attribute > ,
            "type" :  < filter_type > ,
            "value" :  < string > ,
            "action" :  < filter_action > ,
            "status" :  < filter_status > ,
            "start_ip" :  < string > ,
            "end_ip" :  < string > ,
            "with_subdomains" :  < boolean > 
        }, ... ],
        "operations" : [ {
            "id" :  < int > ,
            "action" :  < operation_type > ,
            "attr" :  < operation_attribute > ,
            "value" :  < string > ,
            "status" :  < operation_status > 
        }, ... ],
        "grants" : [ {
            "user_login" :  < string > ,
            "user_uid" :  < long > ,
            "perm" :  < grant_type > ,
            "created_at" :  < date > ,
            "comment" :  < string > ,
            "partner_data_access" :  < boolean > 
        }, ... ],
        "labels" : [ {
            "id" :  < int > ,
            "name" :  < string > 
        }, ... ],
        "webvisor" : {
            "urls" :  < string > ,
            "arch_enabled" :  < boolean > ,
            "arch_type" :  < webvisor_arch_type > ,
            "load_player_type" :  < webvisor_load_player_type > ,
            "wv_version" :  < integer > ,
            "wv_forms" :  < boolean > 
        },
        "code_options" : {
            "async" :  < boolean > ,
            "informer" : {
                "enabled" :  < boolean > ,
                "type" :  < informer_type > ,
                "size" :  < integer > ,
                "indicator" :  < informer_metric > ,
                "color_start" :  < string > ,
                "color_end" :  < string > ,
                "color_text" :  < integer > ,
                "color_arrow" :  < integer > 
            },
            "visor" :  < boolean > ,
            "track_hash" :  < boolean > ,
            "xml_site" :  < boolean > ,
            "clickmap" :  < boolean > ,
            "in_one_line" :  < boolean > ,
            "ecommerce" :  < boolean > ,
            "alternative_cdn" :  < boolean > 
        },
        "create_time" :  < date > ,
        "time_zone_name" :  < string > ,
        "time_zone_offset" :  < int > ,
        "source" :  < counter_source > ,
        "update_time" :  < string > ,
        "delete_time" :  < string > ,
        "code" :  < string > ,
        "monitoring" : {
            "enable_monitoring" :  < int > ,
            "emails" : [  < string > , ... ],
            "sms_allowed" :  < int > ,
            "enable_sms" :  < int > ,
            "sms_time" :  < string > ,
            "phones" : [  < string > , ... ],
            "phone_ids" : [  < long > , ... ],
            "possible_phones" : [  < string > , ... ],
            "possible_phone_ids" : [  < string > , ... ]
        },
        "filter_robots" :  < integer > ,
        "visit_threshold" :  < integer > ,
        "offline_options" : {
            "offline_conversion_extended_threshold" :  < boolean > ,
            "offline_calls_extended_threshold" :  < boolean > ,
            "offline_visits_extended_threshold" :  < boolean > 
        },
        "publisher_options" : {
            "enabled" :  < boolean > ,
            "schema" :  < publisher_schema > ,
            "schema_options" : [  < publisher_schema > , ... ]
        },
        "autogoals_enabled" :  < boolean > ,
        "counter_flags" : {
            "use_in_benchmarks" :  < boolean > ,
            "direct_allow_use_goals_without_access" :  < boolean > ,
            "collect_first_party_data" :  < boolean > 
        }
    }
}
Parameters Description
counter Tag.
counter
id Tag ID.
status Tag status.

Possible values:

  • Active: Tag active.
  • Deleted: Tag deleted.
owner_login Login of the tag owner.
code_status Code snippet installation status.
Attention. The parameter is deprecated, don't use it when working with data. The value returned is always CS_ERR_UNKNOWN (unknown error). In the future, code_status will be deleted.
activity_status Tag traffic.
name Tag name.
site2 Full site domain.
type Counter type.

Possible values:

  • simple: Tag created by the user in Yandex Metrica.
  • partner: Tag imported from YAN.
favorite Whether the tag is added to favorites.

Possible values:

  • 0: Not added (default).
  • 1: Added.
gdpr_agreement_accepted Acceptance of the “Yandex Metrica” Data Processing Agreement.

Possible values:

  • 0: Agreement not accepted (default).
  • 1: Agreement accepted.
permission Level of access to the tag.

Possible values:

  • own: Tag that belongs to the user.
  • view: Tag with guest access level (“view only”).
  • edit: Guest tag with “full access”.
mirrors2 List of site mirrors (domains).
goals List of structures with information on tag goals.
filters List of structures with information on tag filters.
operations List of structures with information on tag actions.
grants List of structures with information on access rights to the tag.
labels List of structures with information on tags.
session replay Structure with information on Session Replay settings.
code_options Code snippet settings.
create_time Date and time when the tag was created.
time_zone_name Time zone for calculating statistics.
time_zone_offset Current time zone offset from Greenwich, minutes.
source Tag type.
update_time Time of the last tag update.
delete_time Time of tag deletion.
code

HTML code of the tag.

monitoring

Settings for monitoring site availability.

filter_robots Filtering of robots.

Possible values:

  • 1: Filter robots by strict rules only (default).
  • 2: Filter robots by strict rules and by behavior.
visit_threshold Session timeout in seconds.
offline_options Offline event settings.
publisher_options Structure with information on content analytics settings.
autogoals_enabled Enabling automatic goals.

Possible values:

  • true: The option is enabled.
  • false: The option is disabled.
counter_flags Data security and usage.
site2
site Full site domain.
mirrors2
site Full site domain.
filters
id

Filter ID. Specify this parameter when changing a tag filter

attr Type of data to apply the filter to.

Possible values:

  • title: Page title.
  • client_ip: IP address.
  • url: Page URL.
  • referer: Referrer.
  • uniq_id: Special filter attribute “Don't count my sessions”.
type Filter type or action for filter.

Possible values:

  • equal: Equal to.
  • start: Starts with.
  • contain: Contains.
  • interval: In the interval, used only with the data type “Ipad dress” (attr = client_ip).
  • me: My visits, used only with the data type attr = uniq_id.
  • only_mirrors: Only site and mirrors, used only for the data type “page URL” (attr = url) and the filter type “only record traffic” (action = include), as well as when mirrors are specified for the tag.
  • regexp: Regular expression.
value Filter value.
action Filter type.

Possible values:

  • exclude: Exclude traffic.
  • include: Keep traffic only.
status Filter status.

Possible values:

  • active: Filter is used.
  • disabled: Filter disabled (without deletion).
start_ip First IP address in the range.
end_ip Last IP address in the range.
with_subdomains Filter by subdomains.
operations
id

Action ID (needs to be specified while changing a tag action).

action Action type.

Possible values:

  • cut_fragment: Remove anchor from URL.
  • cut_parameter: Remove specific parameter from URL.
  • cut_all_parameters: Cut all parameters from URL.
  • merge_https_and_http: Replace https:// with http://.
  • to_lower: Convert to lower case.
  • replace_domain: Replace domain.
attr Field for filtering.

Possible values:

  • referer: Referrer.
  • url: Page URL.
value Value for replacement.
status Action status.

Possible values:

  • active: Action is used.
  • disabled: Action is disabled (without deletion).
grants
user_login

Login of a user with tag management rights.

This parameter contains an empty string if tag statistics are in public access (perm = public_stat)

user_uid

uid of a user with tag management rights.

Parameter is 0 if tag statistics are in public access (perm = public_stat)

perm Permission level.

Possible values:

  • public_stat: Public access to statistics.
  • view: Read only.
  • edit: Full access.
created_at

Date when the permission was granted in YYYY-MM-DD'T'hh:mm:ssZ format.

comment

Arbitrary comment. The maximum number of characters is 255.

partner_data_access

Access to the Monetization report group. The user can view reports and add dimensions and metrics from the Monetization group to other reports.

If the user has edit rights, reports from the Monetization group are already available to them.

Possible values:

  • true: Access granted.
  • false: Access denied.
labels
id Tag ID.
name Tag name.
webvisor
urls List of pages for saving.
arch_enabled Saving site pages.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
arch_type Recording page content.

Possible values:

  • none: Disabled.
  • load: Download from site.
  • html: From browser.
load_player_type Loading pages in the player.

Possible values:

  • proxy: As an anonymous user.
  • on_your_behalf: As you.
wv_version Session Replay version.
wv_forms Records the content of fields and forms.

Possible values:

  • 0: Don't record the content of fields and forms, except the ones marked with the -metrika-recordkeys CSS class.
  • 1: Record the content of fields and forms, except the ones marked with the -metrika-nokeys CSS class (default).
code_options
async Asynchronous code snippet.

Possible values:

  • 0: Disabled.
  • 1: Enabled (default).
informer Informer settings.
visor Record and analysis of site user behavior.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
track_hash Hash tracking in the browser address bar. The option applies to AJAX sites.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
xml_site For XML sites. The "noscript" element cannot be used in XML documents.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
clickmap Gathering statistics for the Click Map report.

Possible values:

  • 0: Disabled.
  • 1: Enabled (default).
in_one_line Print code snippet as a single string.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
ecommerce Collecting E-commerce data.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
alternative_cdn Allows you to correctly register sessions from regions in which access to Yandex resources is restricted. It might take longer to load the tag code when using this option.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
informer
enabled Permission to display the informer.

Possible values:

  • 0: Informer is not displayed (default).
  • 1: Informer is displayed.
type Informer type.

Possible values:

  • simple: Simple.
  • ext: Extended (default).
size Informer size.

Possible values:

  • 1: 80×15
  • 2: 80х31
  • 3: 88×31 (default) The value in the "indicator" field doesn't affect the layout of this type of informer.
indicator Parameter to be displayed on the informer.

Possible values:

  • pageviews: Pageviews (default).
  • visits: Sessions.
  • uniques: Users.
color_start Beginning (top) color of the informer in RRGGBBAA format. RR, GG, BB are saturated red, green, and blue colors. The level of saturation for every color is set with a value ranging from 00 to FF. AA is transparency from 00 (transparent) to FF (opaque).
color_end Ending (bottom) color of the informer in RRGGBBAA format. The parameter is intended for creating background gradient. Color saturation and transparency are set the same way as with the "color_start" parameter.
color_text Color of the text in the informer.

Possible values:

  • 0: Black (default).
  • 1: White.
color_arrow Color of the arrow in the informer.

Possible values:

  • 0: Black.
  • 1: Purple (default).
monitoring
enable_monitoring

Notifications for monitoring site availability. Possible values:

  • 0: User doesn't receive notifications (default).
  • 1: Monitoring notifications enabled.
emails

List of email addresses for getting site monitoring notifications. Can contain one or several addresses, separated by commas

sms_allowed

SMS notifications. To receive notifications, you need to subscribe to them and confirm the subscription. The phone number is stored in the user's personal data for all Yandex services.

Possible values:

  • 0: User hasn't provided a mobile phone number.
  • 1: User has provided a phone number and confirmed their subscription.
enable_sms

SMS notifications for monitoring site availability. Possible values:

  • 0: User doesn't receive SMS-notifications (default).
  • 1: Monitoring SMS notifications enabled.
sms_time

Permitted time ranges for sending SMS notifications. The ranges are specified by days of the week from Monday to Sunday. If the range is not specified for a particular day, SMS notifications will not be sent on that day.

Days of the week are separated by semicolons as shown in the following example:

8-9;8-9;;20-22;;;

This value permits sending SMS from 8:00 to 9:59 on Monday and Tuesday and from 20:00 to 22:59 on Thursday.

Each specified hour corresponds to an interval of time from the beginning until the end of that hour. The number 9 thus indicates the interval from 9 hours 00 minutes through 9 hours 59 minutes.

Ranges can consist of "from-to" intervals and individual hours, for example 7-12,16,18,22-23. The components of such ranges are separated by commas.

phones

A list of phone numbers for receiving site monitoring notifications. Can contain one or more numbers separated by commas.

To subscribe to notifications, get possible phone numbers and their IDs (possible_phones and possible_phones_ids) using the query /management/v1/counter/{counterId}. Pass this data in the phones and phone_ids parameters when editing a tag.

phone_ids

IDs of phone numbers for receiving monitoring notifications. The order of IDs matches the order of phone numbers in the phones parameter.

possible_phones

Possible phone numbers for receiving site monitoring notifications. Can contain one or more numbers separated by commas.

possible_phone_ids IDs of possible phone numbers for receiving site monitoring notifications. The order of the IDs matches the order of phone numbers in the possible_phones parameter.
offline_options
offline_conversion_extended_threshold Extended period for tracking offline conversions.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
offline_calls_extended_threshold Extended call tracking period.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
offline_visits_extended_threshold Extended tracking period for offline visits.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
publisher_options
enabled Collection of content analytics data. To start collecting statistics, add the markup to your site.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
schema The type of schema markup used on the site. When creating or editing a tag, pass the value from the schema_options field in this field.
schema_options Available site markup options.
counter_flags
use_in_benchmarks

Get access to market reports.

The option allows Yandex Metrica to use aggregated anonymized tag data to build market analytics reports.

The collected data helps you understand the state of your business relative to the market.

If the tag was created recently, the option is enabled by default.

Possible values:

  • false
  • true
direct_allow_use_goals_without_access

Allow optimizing campaigns for goals without access to the tag.

If your ad campaigns are managed in Yandex Direct by someone other than you, such as an agency or a setup expert, you can grant permissions for using existing goals in Yandex Metrica. If the tag was created recently, the option is enabled by default. For more information, see Help.

Possible values:

  • false
  • true
collect_first_party_data

Use additional tracking settings.

This option allows Yandex Metrica to use the contact information entered by the user on the site to enhance advertising algorithms and more accurately analyze user behavior. This helps you increase the effectiveness of ad campaigns and learn more about users' behavior, even if they use browsers that limit cross-site cookies (third-party cookies), such as Safari and Mozilla Firefox.

Possible values:

  • false
  • true
Parameters Description
counter Tag.
counter
id Tag ID.
status Tag status.

Possible values:

  • Active: Tag active.
  • Deleted: Tag deleted.
owner_login Login of the tag owner.
code_status Code snippet installation status.
Attention. The parameter is deprecated, don't use it when working with data. The value returned is always CS_ERR_UNKNOWN (unknown error). In the future, code_status will be deleted.
activity_status Tag traffic.
name Tag name.
site2 Full site domain.
type Counter type.

Possible values:

  • simple: Tag created by the user in Yandex Metrica.
  • partner: Tag imported from YAN.
favorite Whether the tag is added to favorites.

Possible values:

  • 0: Not added (default).
  • 1: Added.
gdpr_agreement_accepted Acceptance of the “Yandex Metrica” Data Processing Agreement.

Possible values:

  • 0: Agreement not accepted (default).
  • 1: Agreement accepted.
permission Level of access to the tag.

Possible values:

  • own: Tag that belongs to the user.
  • view: Tag with guest access level (“view only”).
  • edit: Guest tag with “full access”.
mirrors2 List of site mirrors (domains).
goals List of structures with information on tag goals.
filters List of structures with information on tag filters.
operations List of structures with information on tag actions.
grants List of structures with information on access rights to the tag.
labels List of structures with information on tags.
session replay Structure with information on Session Replay settings.
code_options Code snippet settings.
create_time Date and time when the tag was created.
time_zone_name Time zone for calculating statistics.
time_zone_offset Current time zone offset from Greenwich, minutes.
source Tag type.
update_time Time of the last tag update.
delete_time Time of tag deletion.
code

HTML code of the tag.

monitoring

Settings for monitoring site availability.

filter_robots Filtering of robots.

Possible values:

  • 1: Filter robots by strict rules only (default).
  • 2: Filter robots by strict rules and by behavior.
visit_threshold Session timeout in seconds.
offline_options Offline event settings.
publisher_options Structure with information on content analytics settings.
autogoals_enabled Enabling automatic goals.

Possible values:

  • true: The option is enabled.
  • false: The option is disabled.
counter_flags Data security and usage.
site2
site Full site domain.
mirrors2
site Full site domain.
filters
id

Filter ID. Specify this parameter when changing a tag filter

attr Type of data to apply the filter to.

Possible values:

  • title: Page title.
  • client_ip: IP address.
  • url: Page URL.
  • referer: Referrer.
  • uniq_id: Special filter attribute “Don't count my sessions”.
type Filter type or action for filter.

Possible values:

  • equal: Equal to.
  • start: Starts with.
  • contain: Contains.
  • interval: In the interval, used only with the data type “Ipad dress” (attr = client_ip).
  • me: My visits, used only with the data type attr = uniq_id.
  • only_mirrors: Only site and mirrors, used only for the data type “page URL” (attr = url) and the filter type “only record traffic” (action = include), as well as when mirrors are specified for the tag.
  • regexp: Regular expression.
value Filter value.
action Filter type.

Possible values:

  • exclude: Exclude traffic.
  • include: Keep traffic only.
status Filter status.

Possible values:

  • active: Filter is used.
  • disabled: Filter disabled (without deletion).
start_ip First IP address in the range.
end_ip Last IP address in the range.
with_subdomains Filter by subdomains.
operations
id

Action ID (needs to be specified while changing a tag action).

action Action type.

Possible values:

  • cut_fragment: Remove anchor from URL.
  • cut_parameter: Remove specific parameter from URL.
  • cut_all_parameters: Cut all parameters from URL.
  • merge_https_and_http: Replace https:// with http://.
  • to_lower: Convert to lower case.
  • replace_domain: Replace domain.
attr Field for filtering.

Possible values:

  • referer: Referrer.
  • url: Page URL.
value Value for replacement.
status Action status.

Possible values:

  • active: Action is used.
  • disabled: Action is disabled (without deletion).
grants
user_login

Login of a user with tag management rights.

This parameter contains an empty string if tag statistics are in public access (perm = public_stat)

user_uid

uid of a user with tag management rights.

Parameter is 0 if tag statistics are in public access (perm = public_stat)

perm Permission level.

Possible values:

  • public_stat: Public access to statistics.
  • view: Read only.
  • edit: Full access.
created_at

Date when the permission was granted in YYYY-MM-DD'T'hh:mm:ssZ format.

comment

Arbitrary comment. The maximum number of characters is 255.

partner_data_access

Access to the Monetization report group. The user can view reports and add dimensions and metrics from the Monetization group to other reports.

If the user has edit rights, reports from the Monetization group are already available to them.

Possible values:

  • true: Access granted.
  • false: Access denied.
labels
id Tag ID.
name Tag name.
webvisor
urls List of pages for saving.
arch_enabled Saving site pages.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
arch_type Recording page content.

Possible values:

  • none: Disabled.
  • load: Download from site.
  • html: From browser.
load_player_type Loading pages in the player.

Possible values:

  • proxy: As an anonymous user.
  • on_your_behalf: As you.
wv_version Session Replay version.
wv_forms Records the content of fields and forms.

Possible values:

  • 0: Don't record the content of fields and forms, except the ones marked with the -metrika-recordkeys CSS class.
  • 1: Record the content of fields and forms, except the ones marked with the -metrika-nokeys CSS class (default).
code_options
async Asynchronous code snippet.

Possible values:

  • 0: Disabled.
  • 1: Enabled (default).
informer Informer settings.
visor Record and analysis of site user behavior.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
track_hash Hash tracking in the browser address bar. The option applies to AJAX sites.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
xml_site For XML sites. The "noscript" element cannot be used in XML documents.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
clickmap Gathering statistics for the Click Map report.

Possible values:

  • 0: Disabled.
  • 1: Enabled (default).
in_one_line Print code snippet as a single string.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
ecommerce Collecting E-commerce data.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
alternative_cdn Allows you to correctly register sessions from regions in which access to Yandex resources is restricted. It might take longer to load the tag code when using this option.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
informer
enabled Permission to display the informer.

Possible values:

  • 0: Informer is not displayed (default).
  • 1: Informer is displayed.
type Informer type.

Possible values:

  • simple: Simple.
  • ext: Extended (default).
size Informer size.

Possible values:

  • 1: 80×15
  • 2: 80х31
  • 3: 88×31 (default) The value in the "indicator" field doesn't affect the layout of this type of informer.
indicator Parameter to be displayed on the informer.

Possible values:

  • pageviews: Pageviews (default).
  • visits: Sessions.
  • uniques: Users.
color_start Beginning (top) color of the informer in RRGGBBAA format. RR, GG, BB are saturated red, green, and blue colors. The level of saturation for every color is set with a value ranging from 00 to FF. AA is transparency from 00 (transparent) to FF (opaque).
color_end Ending (bottom) color of the informer in RRGGBBAA format. The parameter is intended for creating background gradient. Color saturation and transparency are set the same way as with the "color_start" parameter.
color_text Color of the text in the informer.

Possible values:

  • 0: Black (default).
  • 1: White.
color_arrow Color of the arrow in the informer.

Possible values:

  • 0: Black.
  • 1: Purple (default).
monitoring
enable_monitoring

Notifications for monitoring site availability. Possible values:

  • 0: User doesn't receive notifications (default).
  • 1: Monitoring notifications enabled.
emails

List of email addresses for getting site monitoring notifications. Can contain one or several addresses, separated by commas

sms_allowed

SMS notifications. To receive notifications, you need to subscribe to them and confirm the subscription. The phone number is stored in the user's personal data for all Yandex services.

Possible values:

  • 0: User hasn't provided a mobile phone number.
  • 1: User has provided a phone number and confirmed their subscription.
enable_sms

SMS notifications for monitoring site availability. Possible values:

  • 0: User doesn't receive SMS-notifications (default).
  • 1: Monitoring SMS notifications enabled.
sms_time

Permitted time ranges for sending SMS notifications. The ranges are specified by days of the week from Monday to Sunday. If the range is not specified for a particular day, SMS notifications will not be sent on that day.

Days of the week are separated by semicolons as shown in the following example:

8-9;8-9;;20-22;;;

This value permits sending SMS from 8:00 to 9:59 on Monday and Tuesday and from 20:00 to 22:59 on Thursday.

Each specified hour corresponds to an interval of time from the beginning until the end of that hour. The number 9 thus indicates the interval from 9 hours 00 minutes through 9 hours 59 minutes.

Ranges can consist of "from-to" intervals and individual hours, for example 7-12,16,18,22-23. The components of such ranges are separated by commas.

phones

A list of phone numbers for receiving site monitoring notifications. Can contain one or more numbers separated by commas.

To subscribe to notifications, get possible phone numbers and their IDs (possible_phones and possible_phones_ids) using the query /management/v1/counter/{counterId}. Pass this data in the phones and phone_ids parameters when editing a tag.

phone_ids

IDs of phone numbers for receiving monitoring notifications. The order of IDs matches the order of phone numbers in the phones parameter.

possible_phones

Possible phone numbers for receiving site monitoring notifications. Can contain one or more numbers separated by commas.

possible_phone_ids IDs of possible phone numbers for receiving site monitoring notifications. The order of the IDs matches the order of phone numbers in the possible_phones parameter.
offline_options
offline_conversion_extended_threshold Extended period for tracking offline conversions.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
offline_calls_extended_threshold Extended call tracking period.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
offline_visits_extended_threshold Extended tracking period for offline visits.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
publisher_options
enabled Collection of content analytics data. To start collecting statistics, add the markup to your site.

Possible values:

  • 0: Disabled (default).
  • 1: Enabled.
schema The type of schema markup used on the site. When creating or editing a tag, pass the value from the schema_options field in this field.
schema_options Available site markup options.
counter_flags
use_in_benchmarks

Get access to market reports.

The option allows Yandex Metrica to use aggregated anonymized tag data to build market analytics reports.

The collected data helps you understand the state of your business relative to the market.

If the tag was created recently, the option is enabled by default.

Possible values:

  • false
  • true
direct_allow_use_goals_without_access

Allow optimizing campaigns for goals without access to the tag.

If your ad campaigns are managed in Yandex Direct by someone other than you, such as an agency or a setup expert, you can grant permissions for using existing goals in Yandex Metrica. If the tag was created recently, the option is enabled by default. For more information, see Help.

Possible values:

  • false
  • true
collect_first_party_data

Use additional tracking settings.

This option allows Yandex Metrica to use the contact information entered by the user on the site to enhance advertising algorithms and more accurately analyze user behavior. This helps you increase the effectiveness of ad campaigns and learn more about users' behavior, even if they use browsers that limit cross-site cookies (third-party cookies), such as Safari and Mozilla Firefox.

Possible values:

  • false
  • true