Skip to main content

analytics

Creates, updates, deletes, gets or lists an analytics resource.

Overview

Nameanalytics
TypeResource
Idcloudflare.realtime_kit.analytics

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
dataobject
successboolean

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectaccount_id, app_idstart_date, end_dateReturns day-wise session and recording analytics data of an App for the specified time range start_date to end_date. If start_date and end_date are not provided, the default time range is set from 30 days ago to the current date.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
app_idstringThe Access application ID.
end_datestringend date in YYYY-MM-DD format
start_datestringstart date in YYYY-MM-DD format

SELECT examples

Returns day-wise session and recording analytics data of an App for the specified time range start_date to end_date. If start_date and end_date are not provided, the default time range is set from 30 days ago to the current date.

SELECT
data,
success
FROM cloudflare.realtime_kit.analytics
WHERE account_id = '{{ account_id }}' -- required
AND app_id = '{{ app_id }}' -- required
AND start_date = '{{ start_date }}'
AND end_date = '{{ end_date }}'
;