Yandex Metrika

Интеграция с API Яндекс.Метрики (Management, Reporting, Logs)

Logs → Get Logs Part

AI-generated

Summary

Retrieve a part of logs from Yandex Metrika for a specified counter.

Inputs

  • counterId (required) — The ID of the Yandex Metrika counter.
  • logFields — Comma-separated list of log fields to export (default is 'ym:s:date,ym:s:clientID,ym:s:visitID,ym:s:pageviews').
  • logSource — The source of logs, either 'visits' or 'hits' (default is 'visits').

Output shape

a JSON object containing the requested logs part

Log data will be returned according to the specified fields and source.

Examples

Example 1: Retrieving logs for a counter with ID '12345', fields 'ym:s:date,ym:s:clientID', and source 'visits'.

Set counterId to '12345', logFields to 'ym:s:date,ym:s:clientID', and logSource to 'visits'.

Discussion