Tag information
Returns information about the specified tag.
Request syntax
counterId
: ID of the tag that you want to get information about.
https://api-metrika.yandex.net/management/v1/counter/{counterId}
? [callback=<string>]
& [field=<string>]
callback | Callback function that processes the API response. |
field | One 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 . |
callback | Callback function that processes the API response. |
field | One 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 . |
Sample request
https://api-metrika.yandex.net/management/v1/counter/2215573
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:
|
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:
|
favorite | Whether the tag is added to favorites. Possible values:
|
gdpr_agreement_accepted | Acceptance of the “Yandex Metrica” Data Processing Agreement. Possible values:
|
permission | Level of access to the tag. Possible values:
|
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:
|
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:
|
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:
|
type | Filter type or action for filter. Possible values:
|
value | Filter value. |
action | Filter type. Possible values:
|
status | Filter status. Possible values:
|
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:
|
attr | Field for filtering. Possible values:
|
value | Value for replacement. |
status | Action status. Possible values:
|
grants | |
user_login | Login of a user with tag management rights. This parameter contains an empty string if tag statistics are in public access ( |
user_uid | uid of a user with tag management rights. Parameter is 0 if tag statistics are in public access ( |
perm | Permission level. Possible values:
|
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:
|
labels | |
id | Tag ID. |
name | Tag name. |
webvisor | |
urls | List of pages for saving. |
arch_enabled | Saving site pages. Possible values:
|
arch_type | Recording page content. Possible values:
|
load_player_type | Loading pages in the player. Possible values:
|
wv_version | Session Replay version. |
wv_forms | Records the content of fields and forms. Possible values:
|
code_options | |
async | Asynchronous code snippet. Possible values:
|
informer | Informer settings. |
visor | Record and analysis of site user behavior. Possible values:
|
track_hash | Hash tracking in the browser address bar. The option applies to AJAX sites. Possible values:
|
xml_site | For XML sites. The "noscript" element cannot be used in XML documents. Possible values:
|
clickmap | Gathering statistics for the Click Map report. Possible values:
|
in_one_line | Print code snippet as a single string. Possible values:
|
ecommerce | Collecting E-commerce data. Possible values:
|
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:
|
informer | |
enabled | Permission to display the informer. Possible values:
|
type | Informer type. Possible values:
|
size | Informer size. Possible values:
|
indicator | Parameter to be displayed on the informer. Possible values:
|
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:
|
color_arrow | Color of the arrow in the informer. Possible values:
|
monitoring | |
enable_monitoring | Notifications for monitoring site availability. Possible values:
|
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:
|
enable_sms | SMS notifications for monitoring site availability. Possible values:
|
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:
|
offline_calls_extended_threshold | Extended call tracking period. Possible values:
|
offline_visits_extended_threshold | Extended tracking period for offline visits. Possible values:
|
publisher_options | |
enabled | Collection of content analytics data. To start collecting statistics, add the markup to your site. Possible values:
|
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:
|
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:
|
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:
|
Parameters | Description |
---|---|
counter | Tag. |
counter | |
id | Tag ID. |
status | Tag status. Possible values:
|
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:
|
favorite | Whether the tag is added to favorites. Possible values:
|
gdpr_agreement_accepted | Acceptance of the “Yandex Metrica” Data Processing Agreement. Possible values:
|
permission | Level of access to the tag. Possible values:
|
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:
|
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:
|
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:
|
type | Filter type or action for filter. Possible values:
|
value | Filter value. |
action | Filter type. Possible values:
|
status | Filter status. Possible values:
|
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:
|
attr | Field for filtering. Possible values:
|
value | Value for replacement. |
status | Action status. Possible values:
|
grants | |
user_login | Login of a user with tag management rights. This parameter contains an empty string if tag statistics are in public access ( |
user_uid | uid of a user with tag management rights. Parameter is 0 if tag statistics are in public access ( |
perm | Permission level. Possible values:
|
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:
|
labels | |
id | Tag ID. |
name | Tag name. |
webvisor | |
urls | List of pages for saving. |
arch_enabled | Saving site pages. Possible values:
|
arch_type | Recording page content. Possible values:
|
load_player_type | Loading pages in the player. Possible values:
|
wv_version | Session Replay version. |
wv_forms | Records the content of fields and forms. Possible values:
|
code_options | |
async | Asynchronous code snippet. Possible values:
|
informer | Informer settings. |
visor | Record and analysis of site user behavior. Possible values:
|
track_hash | Hash tracking in the browser address bar. The option applies to AJAX sites. Possible values:
|
xml_site | For XML sites. The "noscript" element cannot be used in XML documents. Possible values:
|
clickmap | Gathering statistics for the Click Map report. Possible values:
|
in_one_line | Print code snippet as a single string. Possible values:
|
ecommerce | Collecting E-commerce data. Possible values:
|
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:
|
informer | |
enabled | Permission to display the informer. Possible values:
|
type | Informer type. Possible values:
|
size | Informer size. Possible values:
|
indicator | Parameter to be displayed on the informer. Possible values:
|
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:
|
color_arrow | Color of the arrow in the informer. Possible values:
|
monitoring | |
enable_monitoring | Notifications for monitoring site availability. Possible values:
|
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:
|
enable_sms | SMS notifications for monitoring site availability. Possible values:
|
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:
|
offline_calls_extended_threshold | Extended call tracking period. Possible values:
|
offline_visits_extended_threshold | Extended tracking period for offline visits. Possible values:
|
publisher_options | |
enabled | Collection of content analytics data. To start collecting statistics, add the markup to your site. Possible values:
|
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:
|
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:
|
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:
|