1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2026-05-22 10:05:29 +02:00
Files
OpenIntegrations/docs/en/md/Yandex_Metrika/Counters-management/Get-counters-list.mdx
T
Vitaly the Alpaca (bot) 7191dc3ae7 Main build (Jenkins)
2024-11-13 11:41:54 +03:00

205 lines
4.4 KiB
Plaintext

---
sidebar_position: 6
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get counters list
Gets a list of available counters with or without filtering
`Function GetCountersList(Val Token, Val Filter = Undefined) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Auth token |
| Filter | --filter | Structure of KeyAndValue | ✖ | List filter. See GetCounterFilterStructure |
Returns: Map Of KeyAndValue - serialized JSON response from Yandex
<br/>
:::tip
Method at API documentation: [List of available counters](https://yandex.ru/dev/metrika/en/management/openapi/counter/counters)
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Token = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
CounterID = "98889888";
Result = OPI_YandexMetrika.GetCountersList(Token);
// filter by IDs list
Filter = New Structure;
CountersArray = New Array;
CountersArray.Add(CounterID);
Filter.Insert("counter_ids", CountersArray);
Result = OPI_YandexMetrika.GetCountersList(Token, Filter);
```
```json title="Result"
{
"rows": 4,
"counters": [
{
"id": 98905589,
"status": "Active",
"owner_login": "bayselonarrend",
"code_status": "CS_ERR_UNKNOWN",
"activity_status": "low",
"type": "simple",
"favorite": 0,
"hide_address": 0,
"pro": 0,
"permission": "own",
"webvisor": {
"arch_enabled": 0,
"arch_type": "none",
"load_player_type": "proxy",
"wv_version": 2,
"allow_wv2": true,
"wv_forms": 1
},
"code_options": {
"async": 0,
"informer": {
"enabled": 1,
"type": "ext",
"size": 2,
"indicator": "uniques",
"color_start": "EEEEEEEE",
"color_end": "EFEFEFFE",
"color_text": 0,
"color_arrow": 1
},
"visor": 1,
"track_hash": 1,
"xml_site": 0,
"clickmap": 1,
"in_one_line": 0,
"ecommerce": 1,
"alternative_cdn": 1,
"ecommerce_object": "dataLayer",
"ytm": false
},
"create_time": "2024-11-13T10:44:59+03:00",
"time_zone_name": "Europe/Moscow",
"time_zone_offset": 180,
"partner_id": 0,
"site": "openintegrations.dev",
"site2": {
"site": "openintegrations.dev",
"domain": "openintegrations.dev"
},
"gdpr_agreement_accepted": 1
},
{
"id": 97292922,
"status": "Active",
"owner_login": "bayselonarrend",
"code_status": "CS_ERR_UNKNOWN",
"activity_status": "low",
"name": "OpenIntegrations",
"type": "simple",
"favorite": 0,
"hide_address": 0,
"pro": 0,
"permission": "own",
"webvisor": {
"arch_enabled": 0,
"arch_type": "none",
"load_player_type": "proxy",
"wv_version": 2,
"allow_wv2": true,
"wv_forms": 1
},
"code_options": {
"async": 1,
"informer": {
"enabled": 0,
"type": "ext",
"size": 3,
"indicator": "pageviews",
"color_start": "FFFFFFFF",
"color_end": "EFEFEFFF",
"color_text": 0,
"color_arrow": 1
},
"visor": 0,
"track_hash": 0,
"xml_site": 0,
"clickmap": 1,
"in_one_line": 0,
"ecommerce": 0,
"alternative_cdn": 0,
"ecommerce_object": "dataLayer",
"ytm": false
},
"create_time": "2024-05-15T16:55:09+03:00",
"time_zone_name": "Europe/Minsk",
"time_zone_offset": 180,
"partner_id": 0,
"site": "openintegrations.dev",
"site2": {
"site": "openintegrations.dev",
"domain": "openintegrations.dev"
},
"gdpr_agreement_accepted": 0
},
{
"id": 98234044,
"status": "Active",
"owner_login": "bayselonarrend",
"code_status": "CS_ERR_UNKNOWN",
"activity_status": "low",
"name": "OpenYellow",
"type": "simple",
"favorite": 0,
"hide_address": 0,
"pro": 0,
"permission": "own",
"webvisor": {
"arch_enabled": 0,
"arch_type": "none",
"load_player_type": "proxy",
"wv_version": 2,
"allow_wv2": true,
"wv_forms": 1
},
"code_options": {
"async": 1,
"informer": {
"enabled": 0,
"type": "ext",
"size": 3,
"indicator": "pageviews",
"color_start": "FFFFFFFF",
"color_end": "EFEFEFFF",
"color_text": 0,
"color_arrow": 1
},
"visor": 0,
"track_hash": 0,
"xml_site": 0,
"clickmap": 1,
"in_one_line": 0,
"ecommerce": 0,
"alternative_cdn": 0,
"ecommerce_object": "dataLayer",
"ytm": false
},
...
```