Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit a8f3bdb

Browse files
authored
Real-time reports (#1137)
* PPNA-6416 Copy paste raw data events docs to RTR * PPNA-6416 Real-time events API * PPNA-6416 Real-time in Columns (scope -> scopes, Real-time, Query API, Raw data API) * PPNA-6416 Real-time in Columns (scope -> scopes, Real-time, Query API, Raw data API) * PPNA-6416 Real-time in Columns (small fixes + lowercase scope names) * PPNA-6416 Real-time query API * PPNA-6416 Real-time query API fix * PPNA-5383 Add notes about units in columns
1 parent 5b28888 commit a8f3bdb

20 files changed

+1427
-800
lines changed

custom_reports/columns.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ Additional columns may become available through
66
:ref:`custom-reports-integrations`.
77

88
.. note::
9-
Each column listed in this document defines a *Scope* attribute.
10-
If you request a query that includes at least one column which requires
11-
*event* scope, the entire query will be calculated using events,
12-
instead of sessions. This might distort some custom metrics such as
13-
averages of a *session* dimension (e.g. average session time).
9+
Each column listed in this document defines a *Scopes* attribute.
10+
To get better performance, report is calculated from *session* scope whenever possible.
11+
When using dimension that doesn't support a *session* scope, then the report is computed from a relevant scope.
12+
Example: if you request *product_name* column, report will be computed in *product* scope.
13+
This might distort some custom metrics such as averages of a *session* dimension (e.g. average session time).
1414

1515
Metrics
1616
-------
1717

18-
The table below lists core metrics that may be used in queries.
18+
The table below lists core metrics that may be used in queries (they are not available in Raw data).
1919
Additional metrics may be created using dimension transformations.
2020

2121
.. include:: columns__metrics.rst

custom_reports/columns__dimension_to_dimension_transformations.rst

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
+------------------------+-------------------+--------------+-----------+
2222
|Date To Month Number |to_month_number |date, datetime|int |
2323
+------------------------+-------------------+--------------+-----------+
24+
|Date To Start Of Minute |to_start_of_minute |datetime |datetime |
25+
+------------------------+-------------------+--------------+-----------+
2426
|Lowercase |lower |str |str |
2527
+------------------------+-------------------+--------------+-----------+
2628
|URL To Path |to_path |str |str |

custom_reports/columns__dimensions.rst

+441-441
Large diffs are not rendered by default.

custom_reports/columns__metrics.rst

+121-121
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
type: object
2+
properties:
3+
website_id:
4+
type: string
5+
format: uuid
6+
description: ID of a website.
7+
example: 70236925-724f-404e-b634-7b5633bc0bcc
8+
columns:
9+
type: array
10+
description: |
11+
Definitions of additional columns that should be returned (timestamp and
12+
identifiers will be returned by default).
13+
items:
14+
type: object
15+
properties:
16+
column_id:
17+
type: string
18+
description: ID of the dimension column.
19+
transformation_id:
20+
type: string
21+
description: |
22+
Optional ID of the transformation. Must be supported by
23+
the column that was specified and must convert the column
24+
into another dimension (and not a metric).
25+
required:
26+
- column_id
27+
example: [{"column_id":"resolution"},{"column_id":"device_type"}]
28+
date_from:
29+
type: string
30+
format: datetime
31+
description: Start date (with time) for the query (inclusive, in website's timezone).
32+
date_to:
33+
type: string
34+
format: datetime
35+
description: End date (with time) for the query (exclusive, in website's timezone).
36+
filters:
37+
type: object
38+
description: |
39+
Dimension filters for the query. The top-level object must specify
40+
AND/OR clause, but any nested objects may either specify another AND/OR
41+
clause or a single filter.
42+
properties:
43+
operator:
44+
type: string
45+
description: Logical operator (AND/OR) for the clause.
46+
enum:
47+
- and
48+
- or
49+
conditions:
50+
type: array
51+
description: List of filters or recursively nested clauses.
52+
items:
53+
type: object
54+
required:
55+
- column_id
56+
- condition
57+
properties:
58+
column_id:
59+
type: string
60+
description: ID of the dimension column.
61+
transformation_id:
62+
type: string
63+
description: |
64+
Optional ID of the transformation. Must be supported by
65+
the column that was specified and must convert the column
66+
into another dimension (and not a metric).
67+
condition:
68+
type: object
69+
description: Definition of a the condition for this column.
70+
properties:
71+
operator:
72+
type: string
73+
description: |
74+
Filtering operator. Available choices depend on
75+
the specified column's type.
76+
77+
String operators: ``eq``, ``neq``,
78+
``starts_with``, ``ends_with``.
79+
``starts_with``, ``ends_with``,
80+
``matches``, ``not_matches``. For regular expressions (operators: ``matches`` and ``not_matches``)
81+
use [re2](https://github.com/google/re2/wiki/Syntax) syntax.
82+
83+
Numeric operators: ``eq``, ``neq``, ``gt``, ``gte``,
84+
``lt``, ``lte``.
85+
86+
Boolean operators: ``eq``, ``neq``.
87+
88+
Enum operators: ``eq``, ``neq``, ``empty``, ``not_empty``.
89+
value:
90+
description: |
91+
Value that should be matched by filter. Value type must
92+
match the type of the specified column. For enumerated
93+
fields, you must use the ID value.
94+
required:
95+
- operator
96+
- value
97+
example: {"column_id":"browser_name","condition":{"operator":"eq","value":"FF"}}
98+
required:
99+
- operator
100+
- conditions
101+
offset:
102+
type: integer
103+
default: 0
104+
minimum: 0
105+
description: Number of rows to skip before beginning to return rows.
106+
limit:
107+
type: integer
108+
default: 100
109+
minimum: 1
110+
maximum: 100000
111+
description: Number of rows to return.
112+
format:
113+
type: string
114+
enum:
115+
- json
116+
- json-kv
117+
- csv
118+
default: json
119+
description: |
120+
Data format of a successful response (error responses are always in json).
121+
column_format:
122+
type: string
123+
enum:
124+
- id
125+
- name
126+
default: id
127+
description: |
128+
Format of the columns header (in CSV responses) and metadata labels
129+
(in JSON responses). By default uses identifiers (``id`` option), set to
130+
``name`` to use human-readable names.
131+
required:
132+
- website_id
133+
- columns
134+
- date_from
135+
- date_to
136+
example:
137+
website_id: 70236925-724f-404e-b634-7b5633bc0bcc
138+
columns:
139+
- column_id: resolution
140+
- column_id: device_type
141+
date_from: '2024-02-10 12:23:00'
142+
date_to: '2024-02-10 12:58:00'
143+
filters:
144+
operator: and
145+
conditions:
146+
- column_id: browser_name
147+
condition:
148+
operator: eq
149+
value: FF
150+
offset: 0
151+
limit: 100
152+
format: json

0 commit comments

Comments
 (0)