Site metrics endpoints
All site metrics
Section titled All site metrics/v1/metrics/site
Section titled /v1/metrics/siteReturns all site metrics between two dates.
Parameters
Section titled ParametersprojectId | Only required for an account-level API key. The target project. |
---|---|
startDate | Required. Beginning of date range for analysis.
|
endDate | Required. End of date range for analysis.
|
device | Device filter for analysis.
|
period | 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.
|
segmentIds | Filter analysis with Contentsquare segments.
|
goalId | To return conversion metrics for a non-ecommerce goal |
Example of response
Section titled Example of response{ "payload": { "values": [ { "startDate": "2021-07-16T00:00:00.000Z", "endDate": "2021-07-22T00:00:00.000Z", "value": 93.00790024010534, "name": "bounceRate", "currency": "USD" }, { "startDate": "2021-07-16T00:00:00.000Z", "endDate": "2021-07-22T00:00:00.000Z", "value": 186.890756302521, "name": "cartAverage", "currency": "USD" }, { "startDate": "2021-07-16T00:00:00.000Z", "endDate": "2021-07-22T00:00:00.000Z", "value": 3649, "name": "conversionCount", "currency": "USD" }, { "startDate": "2021-07-16T00:00:00.000Z", "endDate": "2021-07-22T00:00:00.000Z", "value": 7.068828577516902, "name": "conversionRate", "currency": "USD" }, { "startDate": "2021-07-16T00:00:00.000Z", "endDate": "2021-07-22T00:00:00.000Z", "value": 1.1468321586244288, "name": "pageviewAverage", "currency": "USD" }, { "startDate": "2021-07-16T00:00:00.000Z", "endDate": "2021-07-22T00:00:00.000Z", "value": 22240, "name": "revenueSum", "currency": "USD" }, { "startDate": "2021-07-16T00:00:00.000Z", "endDate": "2021-07-22T00:00:00.000Z", "value": 3.1195242041669893, "name": "sessionTimeAverage", "currency": "USD" }, { "startDate": "2021-07-16T00:00:00.000Z", "endDate": "2021-07-22T00:00:00.000Z", "value": 51644, "name": "visits", "currency": "USD" } ] }, "success": true}
Bounce rate
Section titled Bounce rate/v1/metrics/site/bounce-rate
Section titled /v1/metrics/site/bounce-rateThe ratio between the visitors who entered the site and left it without having seen a second page and all visitors.
More information regarding the metric and how to interpret it…
Parameters
Section titled ParametersprojectId | Only required for an account-level API key. The target project. |
---|---|
startDate | Required. Beginning of date range for analysis.
|
endDate | Required. End of date range for analysis.
|
device | Device filter for analysis.
|
period | 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.
|
segmentIds | Filter analysis with Contentsquare segments.
|
Example of response
Section titled Example of response{ "payload": { "values": [ { "startDate": "2021-07-16T00:00:00.000Z", "endDate": "2021-07-22T00:00:00.000Z", "value": 93.00790024010534, "name": "bounceRate", "currency": "USD" } ] }, "success": true}
Cart average
Section titled Cart average/v1/metrics/site/cart-average
Section titled /v1/metrics/site/cart-averageThe average cart amount is calculated by dividing the total revenue by the number of transactions. This metric is only accessible for “e-commerce” projects.
More information regarding the metric and how to interpret it…
Parameters
Section titled ParametersprojectId | Only required for an account-level API key. The target project. |
---|---|
startDate | Required. Beginning of date range for analysis.
|
endDate | Required. End of date range for analysis.
|
device | Device filter for analysis.
|
period | 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.
|
segmentIds | Filter analysis with Contentsquare segments.
|
Example of response
Section titled Example of response{ "payload": { "values": [ { "startDate": "2021-07-16T00:00:00.000Z", "endDate": "2021-07-22T00:00:00.000Z", "value": 186.890756302521, "name": "cartAverage", "currency": "USD" } ] }, "success": true}
Conversions
Section titled Conversions/v1/metrics/site/conversions
Section titled /v1/metrics/site/conversionsThe number of sessions where a specified goal was reached. More information regarding the metric and how to interpret it…
Parameters
Section titled ParametersprojectId | Only required for an account-level API key. The target project. |
---|---|
startDate | Required. Beginning of date range for analysis.
|
endDate | Required. End of date range for analysis.
|
device | Device filter for analysis.
|
goalId | Only required for non “e-commerce” projects. Goal filter for analysis. If not specified for an “e-commerce” project, the API will return data for the “e-commerce” goal. |
period | 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.
|
segmentIds | Filter analysis with Contentsquare segments.
|
Example of response
Section titled Example of response{ "payload": { "values": [ { "startDate": "2021-07-16T00:00:00.000Z", "endDate": "2021-07-22T00:00:00.000Z", "value": 3649, "name": "conversionCount", "currency": "USD" } ] }, "success": true}
Conversion rate
Section titled Conversion rate/v1/metrics/site/conversion-rate
Section titled /v1/metrics/site/conversion-rateRatio between the number of sessions where a specified goal was reached and the total number of sessions. More information regarding the metric and how to interpret it…
Parameters
Section titled ParametersprojectId | Only required for an account-level API key. The target project. |
---|---|
startDate | Required. Beginning of date range for analysis.
|
endDate | Required. End of date range for analysis.
|
device | Device filter for analysis.
|
period | 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.
|
goalId | Only required for non “e-commerce” projects. Goal filter for analysis. If not specified for an “e-commerce” project, the API will return data for the “e-commerce” goal. |
segmentIds | Filter analysis with Contentsquare segments.
|
Example of response
Section titled Example of response{ "payload": { "values": [ { "startDate": "2021-07-16T00:00:00.000Z", "endDate": "2021-07-22T00:00:00.000Z", "value": 7.068828577516902, "name": "conversionRate", "currency": "USD" } ] }, "success": true}
Pageview average
Section titled Pageview average/v1/metrics/site/pageview-average
Section titled /v1/metrics/site/pageview-averageAverage number page views during a session (a page that has been refreshed counts as one view).
Parameters
Section titled ParametersprojectId | Only required for an account-level API key. The target project. |
---|---|
startDate | Required. Beginning of date range for analysis.
|
endDate | Required. End of date range for analysis.
|
device | Device filter for analysis.
|
period | 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.
|
segmentIds | Filter analysis with Contentsquare segments.
|
Example of response
Section titled Example of response{ "payload": { "values": [ { "startDate": "2021-07-16T00:00:00.000Z", "endDate": "2021-07-22T00:00:00.000Z", "value": 1.1468321586244288, "name": "pageviewAverage", "currency": "USD" } ] }, "success": true}
Revenue
Section titled Revenue/v1/metrics/site/revenue
Section titled /v1/metrics/site/revenueSum of all the transaction amounts. This metric is only accessible for “e-commerce” projects.
Parameters
Section titled ParametersprojectId | Only required for an account-level API key. The target project. |
---|---|
startDate | Required. Beginning of date range for analysis.
|
endDate | Required. End of date range for analysis.
|
device | Device filter for analysis.
|
period | 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.
|
segmentIds | Filter analysis with Contentsquare segments.
|
Example of response
Section titled Example of response{ "payload": { "values": [ { "startDate": "2021-07-16T00:00:00.000Z", "endDate": "2021-07-22T00:00:00.000Z", "value": 22240, "name": "revenueSum", "currency": "USD" } ] }, "success": true}
Session time average
Section titled Session time average/v1/metrics/site/session-time-average
Section titled /v1/metrics/site/session-time-averageAverage time spent from entry on the site to site exit for each visit.
Parameters
Section titled ParametersprojectId | Only required for an account-level API key. The target project. |
---|---|
startDate | Required. Beginning of date range for analysis.
|
endDate | Required. End of date range for analysis.
|
device | Device filter for analysis.
|
period | 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.
|
segmentIds | Filter analysis with Contentsquare segments.
|
Example of response
Section titled Example of response{ "payload": { "values": [ { "startDate": "2021-07-16T00:00:00.000Z", "endDate": "2021-07-22T00:00:00.000Z", "value": 3.1195242041669893, "name": "sessionTimeAverage", "currency": "USD" } ] }, "success": true}
Visits
Section titled Visits/v1/metrics/site/visits
Section titled /v1/metrics/site/visitsNumber of sessions. More information regarding the metric and how to interpret it…
Parameters
Section titled ParametersprojectId | Only required for an account-level API key. The target project. |
---|---|
startDate | Required. Beginning of date range for analysis.
|
endDate | Required. End of date range for analysis.
|
device | Device filter for analysis.
|
period | 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.
|
segmentIds | Filter analysis with Contentsquare segments.
|
Example of response
Section titled Example of response{ "payload": { "values": [ { "startDate": "2021-07-16T00:00:00.000Z", "endDate": "2021-07-22T00:00:00.000Z", "value": 51644, "name": "visits", "currency": "USD" } ] }, "success": true}