-
Notifications
You must be signed in to change notification settings - Fork 0
Period
p1 object is mandatory, it is the main period of analysis.
p2 object is optional, it describes the comparison period.
| PARAMETER | DESCRIPTION | POSSIBLE VALUES |
|---|---|---|
| type | – | Absolute (Day format) or R(elative): D(ay), M(onth), H(our) |
Date format: yyyy-mm-dd
// Querying absolute periods:
"period": {
"p1": [
{
"type": "D",
"start": "2019-10-20",
"end": "2019-10-24"
}
],
"p2": [
{
"type": "D",
"start": "2019-10-15",
"end": "2019-10-19"
}
]
}# Querying absolute periods:
"period": {
"p1": [
{
"type": "D",
"start": "2019-10-20",
"end": "2019-10-24"
}
],
"p2": [
{
"type": "D",
"start": "2019-10-15",
"end": "2019-10-19"
}
]
}# Querying absolute periods:
"period": {
"p1": [
{
"type": "D",
"start": "2019-10-20",
"end": "2019-10-24"
}
],
"p2": [
{
"type": "D",
"start": "2019-10-15",
"end": "2019-10-19"
}
]
}# Querying absolute periods:
"period": {
"p1": [
{
"type": "D",
"start": "2019-10-20",
"end": "2019-10-24"
}
],
"p2": [
{
"type": "D",
"start": "2019-10-15",
"end": "2019-10-19"
}
]
}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 | POSSIBLE VALUES |
|---|---|---|
| type | – | R (relative period), AP (Relative to the analysis period) |
| granularity | – | Y(ear), Q(uarter), M(onth), W(eek), D(ay), MN(minute) |
| startOffset | – | Number |
| endOffset | – | Number |
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.
// Querying relative periods:
"period": {
"p1": [
{
"type": "R",
"granularity": "M",
"startOffset": -1,
"endOffset": -1
}
]
},
"space": {
"s": [
608209
]
},
"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"
}
}
}
}
}
}# Querying relativeperiods:
"period": {
"p1": [
{
"type": "R",
"granularity": "M",
"startOffset": -1,
"endOffset": -1
}
]
},
"space": {
"s": [
608209
]
},
"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"
}
}
}
}
}
}# Querying relativeperiods:
"period": {
"p1": [
{
"type": "R",
"granularity": "M",
"startOffset": -1,
"endOffset": -1
}
]
},
"space": {
"s": [
608209
]
},
"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"
}
}
}
}
}
}# Querying relativeperiods:
"period": {
"p1": [
{
"type": "R",
"granularity": "M",
"startOffset": -1,
"endOffset": -1
}
]
},
"space": {
"s": [
608209
]
},
"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"
}
}
}
}
}
}-
Data API
- Data flow
- Advice optimizations data flow
- Error codes data flow
- Faq data flow
- General information data flow
- Technical information data flow
- Reporting API v3
- Getting started
- Methods
- Parameters
- Technical information
- REST API
- Campaigns
- Custom variables
- Getting started rest
- Methods rest
- Response structure parameters rest
- Fixed periods
- Parameters compatibility
- Relative periods
- Structure of the response
- “code” parameter
- “columns” parameter
- “evo” parameter
- “filter” parameter
- “include” parameter
- “lng” parameter
- “max-results” parameter
- “page-num” parameter
- “period” parameter
- “period” parameter: “H” v. “He” & “MN” v. “MNe”
- “retention” parameter
- “segmentdesc” parameter
- “segment” parameter
- “sep” parameter
- “sort” parameter
- “space” parameter
- Technical specifications rest
- Data flow
-
Data collection
- Android
- Advanced features
- Campaigns
- Changelog
- Content
- Ecommerce
- Getting started
- Users
- Apple
- Advanced features
- Campaigns
- Changelog
- Content
- Ecommerce
- Getting started
- Users
- General
- Cddc renew staging process
- Changelog
- Craft your hit
- Encoded parameters
- Server side cookie management
- Supported taggings
- Tagging deletion
- Utilisation of dispatch sdks
- JavaScript
- Advanced features
- Campaigns
- Changelog
- Content
- Ecommerce
- Getting started
- Partners javascript
- Users
- Piano Analytics
- Event tagging piano analytics
- Getting started piano analytics
- Piano analytics tagging
- Feeding piano analytics with as2 tagging
- Tagging custom properties sdk
- Android