Предметные инструменты · statistic

Настройка веб-статистики · изменения

statistic_site_statistic_configuration_m188_writeИзменение

Создать рекламную кампанию · Настроить страницы кампании · Связать кампанию с поисковыми системами.

Действия

В tools/call передайте имя инструмента, значение action и параметры действия во вложенном объекте arguments.

Создать рекламную кампанию

stat_campaign_create

Хотя бы одна метка должна быть заполнена. Суммы округляются до двух знаков в основной валюте статистики.

fields
объект · обязательный параметр
confirm
логическое значение · обязательный параметр
Схема параметров JSON
{
  "type": "object",
  "properties": {
    "fields": {
      "type": "object",
      "properties": {
        "referer1": {
          "type": "string",
          "maxLength": 255
        },
        "referer2": {
          "type": "string",
          "maxLength": 255
        },
        "description": {
          "type": "string",
          "maxLength": 2000
        },
        "priority": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000
        },
        "events_view": {
          "type": "string",
          "enum": [
            "",
            "link",
            "list",
            "event1",
            "event2"
          ]
        },
        "cost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000000
        },
        "revenue": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000000
        }
      },
      "required": [],
      "additionalProperties": false,
      "minProperties": 1
    },
    "confirm": {
      "type": "boolean"
    }
  },
  "required": [
    "fields",
    "confirm"
  ],
  "additionalProperties": false
}

Настроить страницы кампании

stat_campaign_pages_set

Заменяет только заданный набор: страницы входа или источники перехода. Пустой массив очищает этот набор; до 100 страниц в каждом.

campaign_id
целое число · обязательный параметр
entry_pages
массив
source_pages
массив
confirm
логическое значение · обязательный параметр
Схема параметров JSON
{
  "type": "object",
  "properties": {
    "campaign_id": {
      "type": "integer",
      "minimum": 1
    },
    "entry_pages": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 255
      },
      "maxItems": 100,
      "uniqueItems": true
    },
    "source_pages": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 255
      },
      "maxItems": 100,
      "uniqueItems": true
    },
    "confirm": {
      "type": "boolean"
    }
  },
  "required": [
    "campaign_id",
    "confirm"
  ],
  "additionalProperties": false
}

Связать кампанию с поисковыми системами

stat_campaign_searchers_set

Полностью заменяет связи одной кампании. Пустой массив очищает связи; до 100 существующих поисковых систем.

campaign_id
целое число · обязательный параметр
searcher_ids
массив · обязательный параметр
confirm
логическое значение · обязательный параметр
Схема параметров JSON
{
  "type": "object",
  "properties": {
    "campaign_id": {
      "type": "integer",
      "minimum": 1
    },
    "searcher_ids": {
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 1
      },
      "maxItems": 100,
      "uniqueItems": true
    },
    "confirm": {
      "type": "boolean"
    }
  },
  "required": [
    "campaign_id",
    "searcher_ids",
    "confirm"
  ],
  "additionalProperties": false
}

Изменить настройки кампании

stat_campaign_update

Меняет только указанные поля; страницы, поисковые системы и накопленные счётчики сохраняются.

campaign_id
целое число · обязательный параметр
fields
объект · обязательный параметр
confirm
логическое значение · обязательный параметр
Схема параметров JSON
{
  "type": "object",
  "properties": {
    "campaign_id": {
      "type": "integer",
      "minimum": 1
    },
    "fields": {
      "type": "object",
      "properties": {
        "referer1": {
          "type": "string",
          "maxLength": 255
        },
        "referer2": {
          "type": "string",
          "maxLength": 255
        },
        "description": {
          "type": "string",
          "maxLength": 2000
        },
        "priority": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000
        },
        "events_view": {
          "type": "string",
          "enum": [
            "",
            "link",
            "list",
            "event1",
            "event2"
          ]
        },
        "cost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000000
        },
        "revenue": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000000
        }
      },
      "required": [],
      "additionalProperties": false,
      "minProperties": 1
    },
    "confirm": {
      "type": "boolean"
    }
  },
  "required": [
    "campaign_id",
    "fields",
    "confirm"
  ],
  "additionalProperties": false
}

Создать настроенный тип события

stat_event_type_create

Создаёт тип с названием, сроками хранения и настройками отчётов. Нужны права изменения статистики.

fields
объект · обязательный параметр
confirm
логическое значение · обязательный параметр
Схема параметров JSON
{
  "type": "object",
  "properties": {
    "fields": {
      "type": "object",
      "properties": {
        "event1": {
          "type": "string",
          "minLength": 1,
          "maxLength": 166
        },
        "event2": {
          "type": "string",
          "minLength": 1,
          "maxLength": 166
        },
        "name": {
          "type": "string",
          "maxLength": 50
        },
        "description": {
          "type": "string",
          "maxLength": 2000
        },
        "campaign_visible": {
          "type": "boolean"
        },
        "chart_default": {
          "type": "boolean"
        },
        "sort": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000
        },
        "keep_days": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0,
          "maximum": 36500
        },
        "daily_keep_days": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0,
          "maximum": 36500
        }
      },
      "required": [
        "event1",
        "event2"
      ],
      "additionalProperties": false,
      "minProperties": 1
    },
    "confirm": {
      "type": "boolean"
    }
  },
  "required": [
    "fields",
    "confirm"
  ],
  "additionalProperties": false
}

Изменить настройки типа события

stat_event_type_update

Меняет только указанные поля. Новый срок хранения применяется также к уже записанным событиям этого типа; сами события здесь не удаляются.

event_type_id
целое число · обязательный параметр
fields
объект · обязательный параметр
confirm
логическое значение · обязательный параметр
Схема параметров JSON
{
  "type": "object",
  "properties": {
    "event_type_id": {
      "type": "integer",
      "minimum": 1
    },
    "fields": {
      "type": "object",
      "properties": {
        "event1": {
          "type": "string",
          "minLength": 1,
          "maxLength": 166
        },
        "event2": {
          "type": "string",
          "minLength": 1,
          "maxLength": 166
        },
        "name": {
          "type": "string",
          "maxLength": 50
        },
        "description": {
          "type": "string",
          "maxLength": 2000
        },
        "campaign_visible": {
          "type": "boolean"
        },
        "chart_default": {
          "type": "boolean"
        },
        "sort": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000
        },
        "keep_days": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0,
          "maximum": 36500
        },
        "daily_keep_days": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0,
          "maximum": 36500
        }
      },
      "required": [],
      "additionalProperties": false,
      "minProperties": 1
    },
    "confirm": {
      "type": "boolean"
    }
  },
  "required": [
    "event_type_id",
    "fields",
    "confirm"
  ],
  "additionalProperties": false
}