yandex_metrica_create_logs_request
Create an asynchronous Yandex Metrica Logs API export request for row-level visits or hits, scoped to one counter and date range, after feasibility is checked.
Instructions
Create an asynchronous Yandex Metrica Logs API export of raw visits or hits for one counter and date range. Use when the user wants row-level data and yandex_metrica_evaluate_logs_request has shown the export is possible. Do not use this only to test feasibility, and do not use it for aggregated totals; call yandex_metrica_get_report for those. Poll yandex_metrica_get_logs_request until the status is processed. date2 cannot be today. Fields use the ym:s: prefix for visits and ym:pv: for hits.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date1 | Yes | Start date YYYY-MM-DD | |
| date2 | Yes | End date YYYY-MM-DD (cannot be current day) | |
| fields | Yes | Fields to export. See Yandex Metrica Logs API documentation for full field lists. | |
| source | Yes | 'hits' for pageview-level data, 'visits' for session-level data | |
| counter_id | Yes | Yandex Metrica counter (tag) ID | |
| attribution | No | Attribution model for traffic source fields. Default: lastsign. |