This web service responds with the number of visits grouped by source type.
Method | Endpoint |
---|---|
POST |
|
Request example
{
"startDate": "2023-10-01",
"endDate": "2023-12-01",
"groupByPeriod": "month",
"filters": {
"pageId": [
"45d2564c-c877-4c8b-84cb-a9c3f7f8f97d",
"ft/home",
"ft/search",
"ft/reader",
"ft/viewer"
],
"language": "en-US",
"authenticated": true,
"sourceTypes": [
"direct",
"organic",
"referral",
"social"
]
}
}
Field | Type | Required? | Description |
---|---|---|---|
startDate |
String | Yes | Inclusive start date of the period. The start date must be in the past year. |
endDate |
String | Yes | Exclusive end date of the period. The end date must be later than the start date. |
groupByPeriod |
String | Yes | Period by which to group the page views. Valid values are month and day . |
filters |
Object | No | Field to specify which events to retrieve. |
pageId |
Array | No | Filter on page IDs. ft/home corresponds to the classic Homepage, ft/reader corresponds to the classic Reader page, etc. Designed pages have a random ID which can be found in the URL of the page in the Fluid Topics Designer. The ID is also accessible by using the Page views web service. |
language |
String | No | Filter on the UI Locale (for example, en-US or fr-FR ). |
authenticated |
Boolean | No | Field to define users' status. If undefined, the web service returns page views for both authenticated and unauthenticated users. If true , the web service returns only navigation information for authenticated users. if false , the web service returns only navigation information for unauthenticated users. |
sourceTypes |
Array | No | Filter on the source type: direct , organic , referral , social . |
Response body
The following lines show an example of a JSON response body:
{
"startDate": "2023-10-01",
"endDate": "2023-12-01",
"results": [
{
"name": "direct",
"periods": [
{
"periodStartDate": "2023-10-01",
"periodEndDate": "2023-11-01",
"count": 456
},
{
"periodStartDate": "2023-11-01",
"periodEndDate": "2023-12-01",
"count": 415
}
]
},
{
"name": "organic",
"periods": [
{
"periodStartDate": "2023-10-01",
"periodEndDate": "2023-11-01",
"count": 5
},
{
"periodStartDate": "2023-11-01",
"periodEndDate": "2023-12-01",
"count": 1
}
]
},
{
"name": "referral",
"periods": [
{
"periodStartDate": "2023-10-01",
"periodEndDate": "2023-11-01",
"count": 28
},
{
"periodStartDate": "2023-11-01",
"periodEndDate": "2023-12-01",
"count": 8
}
]
}
]
}
Field | Type | Description |
---|---|---|
startDate |
String | Inclusive start date of the total period as defined in the request. |
endDate |
String | Exclusive end date of the total period as defined in the request. |
results |
Array | An array containing the results. |
name |
String | A source name, as set in the request. |
periods |
Array | An array containing the various periods. |
periodStartDate |
String | Inclusive start date of the period by which results are grouped. |
periodEndDate |
String | Exclusive end date of the period by which results are grouped. |
count |
String | The number of visits for the source type during the period by which results are grouped. |
Return code | Description |
---|---|
200 OK |
Returns data in JSON format. |