Skip to main content

Create tag

Creates a tag with the specified name

Function CreateTag(Val Token, Val Name) Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringAuth token
Name--titleStringTag title

Returns: Map Of KeyAndValue - serialized JSON response from Yandex


tip

Method at API documentation: Creating a tag


1C:Enterprise/OneScript code example
    Token = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
Name = "New tag";

Result = OPI_YandexMetrika.CreateTag(Token, Name);
    oint metrika CreateTag \
--token "***" \
--title "New tag"
Result
{
"label": {
"id": 313496,
"name": "New tag"
}
}