Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add description of with_imported support to Stats API docs #499

Merged
merged 3 commits into from
May 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions docs/stats-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ To include a space character in the query part of the URL, you can use `%20` (a
* `event:goal==Visit%20/register`
* `event:goal==Outbound+Link:+Click`

### Imported stats

Aggregates, timeseries and breakdowns support including imported stats in the results using `with_imported` option, with limitations. Breakdowns for custom properties (`event:props:*`) are only supported for 2 properties: `url` and `path`. Additionally, these breakdowns will only work in combination with a [certain subset](/csv-import#goals-and-custom-properties) of `event:goal` filters.

#### Filtering imported stats

Filtering imported stats is currently not possible, except for very specific cases of filtering by `event:goal` in custom property breakdowns described earlier. When the applied combination of filters and property is not supported for imported stats, the results are still returned based only on native stats, with a warning.

## Endpoints

### GET /api/v1/stats/realtime/visitors
Expand Down Expand Up @@ -208,6 +216,12 @@ Some metrics can only be queried with a certain filter. For example, the `conver

<hr / >

**with_imported** <Optional />

A boolean determining whether to include imported stats in the returned results or not. If not specified, it will default to `false`. See [imported stats](#imported-stats) for more details.

<hr / >

**compare** <Optional />

Off by default. You can specify `compare=previous_period` to calculate the percent difference with the previous period for each metric. The previous period will be of the exact same length as specified in the `period` parameter.
Expand Down Expand Up @@ -287,6 +301,12 @@ Comma-separated list of metrics to show for each time bucket. Valid options are

<hr / >

**with_imported** <Optional />

A boolean determining whether to include imported stats in the returned results or not. If not specified, it will default to `false`. See [imported stats](#imported-stats) for more details.

<hr / >

**interval** <Optional />

Choose your reporting interval. Valid options are `date` (always) and `month` (when specified period is longer than one calendar month). Defaults to
Expand Down Expand Up @@ -370,6 +390,12 @@ Some metrics require a certain filter or breakdown property. For example `conver

<hr / >

**with_imported** <Optional />

A boolean determining whether to include imported stats in the returned results or not. If not specified, it will default to `false`. See [imported stats](#imported-stats) for more details.

<hr / >

**limit** <Optional />

Limit the number of results. Maximum value is 1000. Defaults to 100. If you want to get more than 1000 results, you can make multiple requests and paginate the results by specifying the `page` parameter (e.g. make the same request with `page=1`, then `page=2`, etc)
Expand Down