Page metrics endpoints

GET /v1/metrics/page-group/{pageGroupId}

Returns all page group metrics between two dates.

Query parameters

  • projectId   integer  

    Required only for an account-level API key. The target project.

  • startDate   ISO 8601 date string   Required

    Beginning of date range for analysis. Must be a date prior to endDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • endDate   ISO 8601 date string   Required

    End of date range for analysis. Must be a date after startDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • device   string  

    Device filter for analysis.

    Possible values: all (default), desktop, mobile, or tablet.

  • period   string  

    Granularity of the results. Can only be used on a date range larger then one day. It allows you to have data for each day instead of having a combine result.

    Possible values: none (default), daily.

  • segmentIds   integer  

    Filter analysis with Contentsquare segments. Default: All visitors.
    You can specify multiple segments separated by commas to retrieve the metrics for the intersection of the specified segments

  • goalId   integer  

    To return conversion metrics for a non-ecommerce goal.

Path parameters

  • pageGroupId   integer   Required

    The ID of the Page Group.

Example of response

{
"payload": {
"values": [
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 4.820247587511826,
"name": "activityRate",
"currency": "USD"
},
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 64.65578424414478,
"name": "bounceRate",
"currency": "USD"
},
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 4.267288693743139,
"name": "conversionRate",
"currency": "USD"
},
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 9.558127422045425,
"name": "elapsedTime",
"currency": "USD"
},
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 63.23623764917233,
"name": "exitRate",
"currency": "USD"
},
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 907.4778647504171,
"name": "foldHeight",
"currency": "USD"
},
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 1009.0064436943848,
"name": "interactionTime",
"currency": "USD"
},
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 13.648339726452013,
"name": "landingRate",
"currency": "USD"
},
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 1.6267757352941177,
"name": "loadingTime",
"currency": "USD"
},
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 3862.80071859361,
"name": "pageHeight",
"currency": "USD"
},
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 53.2996317888923,
"name": "scrollRate",
"currency": "USD"
},
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 4.267288693743139,
"name": "transformationRate",
"currency": "USD"
},
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 7284,
"name": "uniqueVisits",
"currency": "USD"
},
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 7793,
"name": "views",
"currency": "USD"
},
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 1.0692919868276618,
"name": "viewsVisits",
"currency": "USD"
},
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 7288,
"name": "visits",
"currency": "USD"
}
]
},
"success": true
}

GET /v1/metrics/page-group/{pageGroupId}/activity-rate

The ratio of time visitors spend interacting with the page to the time spent on the page. Displayed as percentage. More information regarding the metric and how to interpret it…

Query parameters

  • projectId   integer  

    Required only for an account-level API key. The target project.

  • startDate   ISO 8601 date string   Required

    Beginning of date range for analysis. Must be a date prior to endDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • endDate   ISO 8601 date string   Required

    End of date range for analysis. Must be a date after startDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • device   string  

    Device filter for analysis.

    Possible values: all (default), desktop, mobile, or tablet.

  • period   string  

    Granularity of the results. Can only be used on a date range larger then one day. It allows you to have data for each day instead of having a combine result.

    Possible values: none (default), daily.

  • segmentIds   integer  

    Filter analysis with Contentsquare segments. Default: All visitors.
    You can specify multiple segments separated by commas to retrieve the metrics for the intersection of the specified segments

Path parameters

  • pageGroupId   integer   Required

    The ID of the Page Group.

Example of response

{
"payload": {
"values": [
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 4.820247587511827,
"name": "activityRate",
"currency": "USD"
}
]
},
"success": true
}

GET /v1/metrics/page-group/{pageGroupId}/bounce-rate

The ratio between the visitors who landed on the page and left the site without having seen a second page and all visitors who landed on the page. More information regarding the metric and how to interpret it…

Query parameters

  • projectId   integer  

    Required only for an account-level API key. The target project.

  • startDate   ISO 8601 date string   Required

    Beginning of date range for analysis. Must be a date prior to endDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • endDate   ISO 8601 date string   Required

    End of date range for analysis. Must be a date after startDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • device   string  

    Device filter for analysis.

    Possible values: all (default), desktop, mobile, or tablet.

  • period   string  

    Granularity of the results. Can only be used on a date range larger then one day. It allows you to have data for each day instead of having a combine result.

    Possible values: none (default), daily.

  • segmentIds   integer  

    Filter analysis with Contentsquare segments. Default: All visitors.
    You can specify multiple segments separated by commas to retrieve the metrics for the intersection of the specified segments

Path parameters

  • pageGroupId   integer   Required

    The ID of the Page Group.

Example of response

{
"payload": {
"values": [
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 64.65578424414478,
"name": "bounceRate",
"currency": "USD"
}
]
},
"success": true
}

GET /v1/metrics/page-group/{pageGroupId}/conversion-rate

Ratio between the number of users that viewed the page and reached the goal during their navigation and the number of users that viewed the page.

Query parameters

  • projectId   integer  

    Required only for an account-level API key. The target project.

  • startDate   ISO 8601 date string   Required

    Beginning of date range for analysis. Must be a date prior to endDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • endDate   ISO 8601 date string   Required

    End of date range for analysis. Must be a date after startDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • device   string  

    Device filter for analysis.

    Possible values: all (default), desktop, mobile, or tablet.

  • period   string  

    Granularity of the results. Can only be used on a date range larger then one day. It allows you to have data for each day instead of having a combine result.

    Possible values: none (default), daily.

  • segmentIds   integer  

    Filter analysis with Contentsquare segments. Default: All visitors.
    You can specify multiple segments separated by commas to retrieve the metrics for the intersection of the specified segments

  • goalId   integer  

    To return conversion metrics for a non-ecommerce goal.

Path parameters

  • pageGroupId   integer   Required

    The ID of the Page Group.

Example of response

{
"payload": {
"values": [
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 4.267288693743139,
"name": "conversionRate",
"currency": "USD"
}
]
},
"success": true
}

GET /v1/metrics/page-group/{pageGroupId}/exit-rate

The ratio between the number of views of the page which are the last page view of the session and the total number of views of the page. More information regarding the metric and how to interpret it…

Query parameters

  • projectId   integer  

    Required only for an account-level API key. The target project.

  • startDate   ISO 8601 date string   Required

    Beginning of date range for analysis. Must be a date prior to endDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • endDate   ISO 8601 date string   Required

    End of date range for analysis. Must be a date after startDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • device   string  

    Device filter for analysis.

    Possible values: all (default), desktop, mobile, or tablet.

  • period   string  

    Granularity of the results. Can only be used on a date range larger then one day. It allows you to have data for each day instead of having a combine result.

    Possible values: none (default), daily.

  • segmentIds   integer  

    Filter analysis with Contentsquare segments. Default: All visitors.
    You can specify multiple segments separated by commas to retrieve the metrics for the intersection of the specified segments

Path parameters

  • pageGroupId   integer   Required

    The ID of the Page Group.

Example of response

{
"payload": {
"values": [
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 63.23623764917233,
"name": "exitRate",
"currency": "USD"
}
]
},
"success": true
}

GET /v1/metrics/page-group/{pageGroupId}/fold-height

Average screen height.

Query parameters

  • projectId   integer  

    Required only for an account-level API key. The target project.

  • startDate   ISO 8601 date string   Required

    Beginning of date range for analysis. Must be a date prior to endDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • endDate   ISO 8601 date string   Required

    End of date range for analysis. Must be a date after startDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • device   string  

    Device filter for analysis.

    Possible values: all (default), desktop, mobile, or tablet.

  • period   string  

    Granularity of the results. Can only be used on a date range larger then one day. It allows you to have data for each day instead of having a combine result.

    Possible values: none (default), daily.

  • segmentIds   integer  

    Filter analysis with Contentsquare segments. Default: All visitors.
    You can specify multiple segments separated by commas to retrieve the metrics for the intersection of the specified segments

Path parameters

  • pageGroupId   integer   Required

    The ID of the Page Group.

Example of response

{
"payload": {
"values": [
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 907.4778647504171,
"name": "foldHeight",
"currency": "USD"
}
]
},
"success": true
}

GET /v1/metrics/page-group/{pageGroupId}/interaction-time

The average time spent interacting on the page.

Query parameters

  • projectId   integer  

    Required only for an account-level API key. The target project.

  • startDate   ISO 8601 date string   Required

    Beginning of date range for analysis. Must be a date prior to endDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • endDate   ISO 8601 date string   Required

    End of date range for analysis. Must be a date after startDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • device   string  

    Device filter for analysis.

    Possible values: all (default), desktop, mobile, or tablet.

  • period   string  

    Granularity of the results. Can only be used on a date range larger then one day. It allows you to have data for each day instead of having a combine result.

    Possible values: none (default), daily.

  • segmentIds   integer  

    Filter analysis with Contentsquare segments. Default: All visitors.
    You can specify multiple segments separated by commas to retrieve the metrics for the intersection of the specified segments

Path parameters

  • pageGroupId   integer   Required

    The ID of the Page Group.

Example of response

{
"payload": {
"values": [
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 1009.0064436943848,
"name": "interactionTime",
"currency": "USD"
}
]
},
"success": true
}

GET /v1/metrics/page-group/{pageGroupId}/landing-rate

Ratio between users that landed on this screen and the total number of users. For mobile project only.

Query parameters

  • projectId   integer  

    Required only for an account-level API key. The target project.

  • startDate   ISO 8601 date string   Required

    Beginning of date range for analysis. Must be a date prior to endDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • endDate   ISO 8601 date string   Required

    End of date range for analysis. Must be a date after startDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • device   string  

    Device filter for analysis.

    Possible values: all (default), desktop, mobile, or tablet.

  • period   string  

    Granularity of the results. Can only be used on a date range larger then one day. It allows you to have data for each day instead of having a combine result.

    Possible values: none (default), daily.

  • segmentIds   integer  

    Filter analysis with Contentsquare segments. Default: All visitors.
    You can specify multiple segments separated by commas to retrieve the metrics for the intersection of the specified segments

Path parameters

  • pageGroupId   integer   Required

    The ID of the Page Group.

Example of response

{
"payload": {
"values": [
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 13.648339726452013,
"name": "landingRate",
"currency": "USD"
}
]
},
"success": true
}

GET /v1/metrics/page-group/{pageGroupId}/loading-time

The average time in seconds between the call of the page and when the visitor can start interacting with it. More information regarding the metric and how to interpret it…

Query parameters

  • projectId   integer  

    Required only for an account-level API key. The target project.

  • startDate   ISO 8601 date string   Required

    Beginning of date range for analysis. Must be a date prior to endDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • endDate   ISO 8601 date string   Required

    End of date range for analysis. Must be a date after startDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • device   string  

    Device filter for analysis.

    Possible values: all (default), desktop, mobile, or tablet.

  • period   string  

    Granularity of the results. Can only be used on a date range larger then one day. It allows you to have data for each day instead of having a combine result.

    Possible values: none (default), daily.

  • segmentIds   integer  

    Filter analysis with Contentsquare segments. Default: All visitors.
    You can specify multiple segments separated by commas to retrieve the metrics for the intersection of the specified segments

Path parameters

  • pageGroupId   integer   Required

    The ID of the Page Group.

Example of response

{
"payload": {
"values": [
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 1.6267757352941177,
"name": "loadingTime",
"currency": "USD"
}
]
},
"success": true
}

GET /v1/metrics/page-group/{pageGroupId}/page-height

The average height of the page in pixels at its first load (an average for all the URLs included in the page). More information regarding the metric and how to interpret it…

Query parameters

  • projectId   integer  

    Required only for an account-level API key. The target project.

  • startDate   ISO 8601 date string   Required

    Beginning of date range for analysis. Must be a date prior to endDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • endDate   ISO 8601 date string   Required

    End of date range for analysis. Must be a date after startDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • device   string  

    Device filter for analysis.

    Possible values: all (default), desktop, mobile, or tablet.

  • period   string  

    Granularity of the results. Can only be used on a date range larger then one day. It allows you to have data for each day instead of having a combine result.

    Possible values: none (default), daily.

  • segmentIds   integer  

    Filter analysis with Contentsquare segments. Default: All visitors.
    You can specify multiple segments separated by commas to retrieve the metrics for the intersection of the specified segments

Path parameters

  • pageGroupId   integer   Required

    The ID of the Page Group.

Example of response

{
"payload": {
"values": [
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 3862.80071859361,
"name": "pageHeight",
"currency": "USD"
}
]
},
"success": true
}

GET /v1/metrics/page-group/{pageGroupId}/scroll-rate

The proportion of the page displayed by visitors (the ratio between the last line of pixels displayed on the screen and the height of the page). More information regarding the metric and how to interpret it…

Query parameters

  • projectId   integer  

    Required only for an account-level API key. The target project.

  • startDate   ISO 8601 date string   Required

    Beginning of date range for analysis. Must be a date prior to endDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • endDate   ISO 8601 date string   Required

    End of date range for analysis. Must be a date after startDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • device   string  

    Device filter for analysis.

    Possible values: all (default), desktop, mobile, or tablet.

  • period   string  

    Granularity of the results. Can only be used on a date range larger then one day. It allows you to have data for each day instead of having a combine result.

    Possible values: none (default), daily.

  • segmentIds   integer  

    Filter analysis with Contentsquare segments. Default: All visitors.
    You can specify multiple segments separated by commas to retrieve the metrics for the intersection of the specified segments

Path parameters

  • pageGroupId   integer   Required

    The ID of the Page Group.

Example of response

{
"payload": {
"values": [
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 53.2996317888923,
"name": "scrollRate",
"currency": "USD"
}
]
},
"success": true
}

GET /v1/metrics/page-group/{pageGroupId}/elapsed-time

The average time spent on the page, from the first page view trigger to the last event sent. More information regarding the metric and how to interpret it…

Query parameters

  • projectId   integer  

    Required only for an account-level API key. The target project.

  • startDate   ISO 8601 date string   Required

    Beginning of date range for analysis. Must be a date prior to endDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • endDate   ISO 8601 date string   Required

    End of date range for analysis. Must be a date after startDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • device   string  

    Device filter for analysis.

    Possible values: all (default), desktop, mobile, or tablet.

  • period   string  

    Granularity of the results. Can only be used on a date range larger then one day. It allows you to have data for each day instead of having a combine result.

    Possible values: none (default), daily.

  • segmentIds   integer  

    Filter analysis with Contentsquare segments. Default: All visitors.
    You can specify multiple segments separated by commas to retrieve the metrics for the intersection of the specified segments

  • goalId   integer  

    To return conversion metrics for a non-ecommerce goal.

Path parameters

  • pageGroupId   integer   Required

    The ID of the Page Group.

Example of response

{
"payload": {
"values": [
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 9.558127422045425,
"name": "elapsedTime",
"currency": "USD"
}
]
},
"success": true
}

GET /v1/metrics/page-group/{pageGroupId}/unique-visits

The number of unique users who saw the selected page at least once during their session.

Query parameters

  • projectId   integer  

    Required only for an account-level API key. The target project.

  • startDate   ISO 8601 date string   Required

    Beginning of date range for analysis. Must be a date prior to endDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • endDate   ISO 8601 date string   Required

    End of date range for analysis. Must be a date after startDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • device   string  

    Device filter for analysis.

    Possible values: all (default), desktop, mobile, or tablet.

  • period   string  

    Granularity of the results. Can only be used on a date range larger then one day. It allows you to have data for each day instead of having a combine result.

    Possible values: none (default), daily.

  • segmentIds   integer  

    Filter analysis with Contentsquare segments. Default: All visitors.
    You can specify multiple segments separated by commas to retrieve the metrics for the intersection of the specified segments

Path parameters

  • pageGroupId   integer   Required

    The ID of the Page Group.

Example of response

{
"payload": {
"values": [
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 7284,
"name": "uniqueVisits",
"currency": "USD"
}
]
},
"success": true
}

GET /v1/metrics/page-group/{pageGroupId}/views

The number of times the page was viewed. More information regarding the metric and how to interpret it…

Query parameters

  • projectId   integer  

    Required only for an account-level API key. The target project.

  • startDate   ISO 8601 date string   Required

    Beginning of date range for analysis. Must be a date prior to endDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • endDate   ISO 8601 date string   Required

    End of date range for analysis. Must be a date after startDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • device   string  

    Device filter for analysis.

    Possible values: all (default), desktop, mobile, or tablet.

  • period   string  

    Granularity of the results. Can only be used on a date range larger then one day. It allows you to have data for each day instead of having a combine result.

    Possible values: none (default), daily.

  • segmentIds   integer  

    Filter analysis with Contentsquare segments. Default: All visitors.
    You can specify multiple segments separated by commas to retrieve the metrics for the intersection of the specified segments

Path parameters

  • pageGroupId   integer   Required

    The ID of the Page Group.

Example of response

{
"payload": {
"values": [
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 7793,
"name": "views",
"currency": "USD"
}
]
},
"success": true
}

GET /v1/metrics/page-group/{pageGroupId}/views-visits

The average number of times the page is viewed per visit. More information regarding the metric and how to interpret it…

Query parameters

  • projectId   integer  

    Required only for an account-level API key. The target project.

  • startDate   ISO 8601 date string   Required

    Beginning of date range for analysis. Must be a date prior to endDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • endDate   ISO 8601 date string   Required

    End of date range for analysis. Must be a date after startDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • device   string  

    Device filter for analysis.

    Possible values: all (default), desktop, mobile, or tablet.

  • period   string  

    Granularity of the results. Can only be used on a date range larger then one day. It allows you to have data for each day instead of having a combine result.

    Possible values: none (default), daily.

  • segmentIds   integer  

    Filter analysis with Contentsquare segments. Default: All visitors.
    You can specify multiple segments separated by commas to retrieve the metrics for the intersection of the specified segments

Path parameters

  • pageGroupId   integer   Required

    The ID of the Page Group.

Example of response

{
"payload": {
"values": [
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 1.0692919868276618,
"name": "viewsVisits",
"currency": "USD"
}
]
},
"success": true
}

GET /v1/metrics/page-group/{pageGroupId}/visits

Number of sessions where the page has been seen at least once. More information regarding the metric and how to interpret it…

Query parameters

  • projectId   integer  

    Required only for an account-level API key. The target project.

  • startDate   ISO 8601 date string   Required

    Beginning of date range for analysis. Must be a date prior to endDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • endDate   ISO 8601 date string   Required

    End of date range for analysis. Must be a date after startDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • device   string  

    Device filter for analysis.

    Possible values: all (default), desktop, mobile, or tablet.

  • period   string  

    Granularity of the results. Can only be used on a date range larger then one day. It allows you to have data for each day instead of having a combine result.

    Possible values: none (default), daily.

  • segmentIds   integer  

    Filter analysis with Contentsquare segments. Default: All visitors.
    You can specify multiple segments separated by commas to retrieve the metrics for the intersection of the specified segments

Path parameters

  • pageGroupId   integer   Required

    The ID of the Page Group.

Example of response

{
"payload": {
"values": [
{
"startDate": "2021-07-16T00:00:00.000Z",
"endDate": "2021-07-22T00:00:00.000Z",
"value": 7288,
"name": "visits",
"currency": "USD"
}
]
},
"success": true
}

Access to some metrics / capabilities requires Speed Analysis RUM. Reach out to your point of contact at Contentsquare for more information.

GET /v1/metrics/page-group/{pageGroupId}/web-vitals

Returns a list of Web Vitals metrics (including Core Web Vitals).

Query parameters

  • projectId   integer  

    Required only for an account-level API key. Specifies the target project

  • startDate   ISO 8601 date string   Required

    Beginning of date range for analysis. Must be a date prior to endDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • endDate   ISO 8601 date string   Required

    End of date range for analysis. Must be a date after startDate.

    ISO format in UTC (for example “2021-08-13T12:32:40.000Z”) or with a time zone offset (“2021-08-13T12:32:40+02:00” or “2021-08-13T12:32:40%2B+02:00” when encoded in the URL).

  • device   string  

    Device filter for analysis.

    Possible values: all (default), desktop, mobile, or tablet.

  • period   string  

    Granularity of the results. Can only be used on a date range larger then one day. It allows you to have data for each day instead of having a combine result.

    Possible values: none (default), daily.

  • segmentIds   integer  

    Filter analysis with Contentsquare segments. Default: All visitors.
    You can specify multiple segments separated by commas to retrieve the metrics for the intersection of the specified segments

  • metricType   string  

    Possible values: Quantile (default), Average.

  • quantile   number  

    Default to the 75th percentile of each metric if the metric type is Quantile. It is ignored if the metric type is Average.

Path parameters

  • pageGroupId   integer   Required

    The ID of the Page Group.

Example of response

{
"payload": {
"values": [
{
"value": 0.003103,
"startDate": "2024-06-01T00:00:00.000Z",
"endDate": "2024-06-04T00:00:00.000Z",
"name": "cumulativeLayoutShift",
"metricType": "Quantile",
"quantile": 0.9
},
{
"value": 0.016,
"startDate": "2024-06-01T00:00:00.000Z",
"endDate": "2024-06-04T00:00:00.000Z",
"name": "interactionToNextPaint",
"metricType": "Quantile",
"quantile": 0.9
},
{
"value": 0.002,
"startDate": "2024-06-01T00:00:00.000Z",
"endDate": "2024-06-04T00:00:00.000Z",
"name": "firstInputDelay",
"metricType": "Quantile",
"quantile": 0.9
},
{
"value": 2.468,
"startDate": "2024-06-01T00:00:00.000Z",
"endDate": "2024-06-04T00:00:00.000Z",
"name": "firstContentfulPaint",
"metricType": "Quantile",
"quantile": 0.9
},
{
"value": 2.256,
"startDate": "2024-06-01T00:00:00.000Z",
"endDate": "2024-06-04T00:00:00.000Z",
"name": "timeToFirstByte",
"metricType": "Quantile",
"quantile": 0.9
},
{
"value": 2.444,
"startDate": "2024-06-01T00:00:00.000Z",
"endDate": "2024-06-04T00:00:00.000Z",
"name": "largestContentfulPaint",
"metricType": "Quantile",
"quantile": 0.9
}
]
},
"success": true
}