Page views - Fluid Topics - Latest

Fluid Topics API Reference Guide

Category
Reference Guides
Audience
public
Version
Latest

This web service responds with the number of Page views.

Method Endpoint
POST /analytics/api/v1/traffic/page-views

Request example

{
    "startDate": "2024-01-01",
    "endDate": "2024-05-01",
    "groupByPeriod": "month",
    "filters": {
        "pageId": ["ft/home", "ft/search", "ft/reader", "default", "ft/viewer"],
        "language": "en-US",
        "authenticated": true
    }
}
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 ID of the page(s) to retrieve.
language String No Filter on the UI Locale (e.g., 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 set to true, the web service returns only page views for authenticated users.

Response body

The following lines show an example of the JSON response body:

{
    "startDate": "2024-01-01",
    "endDate": "2024-05-01",
    "results": [
        {
            "page": {
                "id": "ft/home",
                "type": "homePage"
            },
            "periods": [
                {
                    "periodStartDate": "2024-01-01",
                    "periodEndDate": "2024-02-01",
                    "count": 4
                },
                {
                    "periodStartDate": "2024-02-01",
                    "periodEndDate": "2024-03-01",
                    "count": 0
                },
                {
                    "periodStartDate": "2024-03-01",
                    "periodEndDate": "2024-04-01",
                    "count": 0
                },
                {
                    "periodStartDate": "2024-04-01",
                    "periodEndDate": "2024-05-01",
                    "count": 0
                }
            ]
        },
        {
            "page": {
                "id": "ft/search",
                "type": "searchPage"
            },
            "periods": [
                {
                    "periodStartDate": "2024-01-01",
                    "periodEndDate": "2024-02-01",
                    "count": 813
                },
                {
                    "periodStartDate": "2024-02-01",
                    "periodEndDate": "2024-03-01",
                    "count": 654
                },
                {
                    "periodStartDate": "2024-03-01",
                    "periodEndDate": "2024-04-01",
                    "count": 64
                },
                {
                    "periodStartDate": "2024-04-01",
                    "periodEndDate": "2024-05-01",
                    "count": 0
                }
            ]
        },
        {
            "page": {
                "id": "ft/reader",
                "type": "readerPage"
            },
            "periods": [
                {
                    "periodStartDate": "2024-01-01",
                    "periodEndDate": "2024-02-01",
                    "count": 2869
                },
                {
                    "periodStartDate": "2024-02-01",
                    "periodEndDate": "2024-03-01",
                    "count": 1974
                },
                {
                    "periodStartDate": "2024-03-01",
                    "periodEndDate": "2024-04-01",
                    "count": 234
                },
                {
                    "periodStartDate": "2024-04-01",
                    "periodEndDate": "2024-05-01",
                    "count": 88
                }
            ]
        },
        {
            "page": {
                "id": "default",
                "type": "designedSearchPage",
                "name": "Default search"
            },
            "periods": [
                {
                    "periodStartDate": "2024-01-01",
                    "periodEndDate": "2024-02-01",
                    "count": 49
                },
                {
                    "periodStartDate": "2024-02-01",
                    "periodEndDate": "2024-03-01",
                    "count": 379
                },
                {
                    "periodStartDate": "2024-03-01",
                    "periodEndDate": "2024-04-01",
                    "count": 1650
                },
                {
                    "periodStartDate": "2024-04-01",
                    "periodEndDate": "2024-05-01",
                    "count": 1984
                }
            ]
        },
        {
            "page": {
                "id": "ft/viewer",
                "type": "viewerPage"
            },
            "periods": [
                {
                    "periodStartDate": "2024-01-01",
                    "periodEndDate": "2024-02-01",
                    "count": 20
                },
                {
                    "periodStartDate": "2024-02-01",
                    "periodEndDate": "2024-03-01",
                    "count": 12
                },
                {
                    "periodStartDate": "2024-03-01",
                    "periodEndDate": "2024-04-01",
                    "count": 5
                },
                {
                    "periodStartDate": "2024-04-01",
                    "periodEndDate": "2024-05-01",
                    "count": 37
                }
            ]
        }
    ]
}
Field Name 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.
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.
Return code Description
200 OK Returns data in JSON format.