Period
Foreword
The parameter evo
describes the context of the evolution of the analysis. It is composed of different mandatory parameters:
Parameter | Description | Values |
---|---|---|
type | - | Absolute (Day format) or R (Relative): D (Day), M (Month), H (Hour) |
Absolute periods
Date format: yyyy-mm-dd
{
// ...
"period": {
"p1": [
{
"type": "D",
"start": "2019-10-20",
"end": "2019-10-24"
}
],
"p2": [
{
"type": "D",
"start": "2019-10-15",
"end": "2019-10-19"
}
]
}
// ...
}
Relative periods
In the case of a single site call, the relative period will be in relation to the time zone of the site. In the case of a multi-site call, the relative period will be in relation to the most easterly time zone of the requested sites.
If you call a site A (UTC-1) and a site B (UTC+2), then the relative period will be relative to the site B.
Parameter | Description | Values |
---|---|---|
type | - | Absolute (Day format) or R (Relative): D (Day), M (Month), H (Hour) |
The periods relative to the analysis date are only applied to the visitor/user segments. The periods of type AP will adapt to the analysis date, we take as example the following call which has :
- An analysis period of type R which will give us a date in relation to the current date which will be for the following example 01-04-2021 so we will have as a result for the first period the date of the previous month which is from 01-03-2021 until 31-03-2021.
- Another date of type AP for the segment which will adapt to the date of analysis which represents for our example the month of March thus for the period of the segment we will have as result the date of 01-02-2021 until 28-02-2021.
{
"period": {
"p1": [
{
"type": "R",
"granularity": "M",
"startOffset": -1,
"endOffset": -1
}
]
},
"space": {
"s": [
123456789
]
},
"columns": [
"visit_src",
"m_visits"
],
"page-num": 1,
"max-results": 10,
"sort": [
"-m_visits"
],
"segment": {
"section": {
"mode": "include",
"scope": "visitor_id",
"period": {
"p1": [
{
"type": "AP",
"granularity": "M",
"startOffset": -1,
"endOffset": -1
}
]
},
"content": {
"condition": {
"filter": {
"visit_geo_country": {
"$eq": "France"
}
}
}
}
}
}
}