This web service responds with the number of visits for each source type with the details of the source.
| Method | Endpoint |
|---|---|
POST |
|
- It is necessary to provide an
Ft-Calling-Appvalue when using Fluid Topics web services. See Fluid Topics calling app. - Users with the
ANALYTICS_USERorADMINrole can use the results of the Pages web service for filtering the results returned by the Source destination endpoint.
Request example
{
"startDate": "2023-10-01",
"endDate": "2023-12-01",
"filters": {
"pageId": [
"45d2564c-c877-4c8b-84cb-a9c3f7f8f97d",
"ft/home",
"ft/search",
"ft/reader",
"ft/viewer"
],
"interfaceLanguage": "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. |
filters |
Object | No | Field to specify which events to retrieve. |
pageId |
Array | No | Filter on page IDs. |
interfaceLanguage |
String | No | Filter on the interface language (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": [
{
"type": "direct",
"source": "unknown",
"targetPageType": "readerPage",
"count": 4752
},
{
"type": "direct",
"source": "unknown",
"targetPageType": "homePage",
"count": 2688
},
{
"type": "organic_google",
"source": "https://www.google.com/",
"targetPageType": "readerPage",
"count": 345
},
{
"type": "organic_yandex",
"source": "https://yandex.ru/",
"targetPageType": "readerPage",
"count": 89
},
{
"type": "referral",
"source": "https://app.qanswer.ai/",
"targetPageType": "readerPage",
"count": 9
},
{
"type": "social_facebook",
"source": "https://www.facebook.com/",
"targetPageType": "readerPage",
"count": 3
}
]
}
| 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. |
type |
String | The source type of the visit (organic, referral, direct or social) concatenated with the possible source category (google, yandex, facebook, etc.) |
source |
String | The source of the visit. |
targetPageType |
String | The target page's type. |
count |
Number | The number of visits. |
| Return code | Description |
|---|---|
200 OK |
Returns data in JSON format. |