Overview
beta.Analytics endpointsAvailable Operations
- GetAnalyticsMeta - Get available analytics metrics and dimensions
- QueryAnalytics - Query analytics data
GetAnalyticsMeta
Returns the available metrics, dimensions, filter operators, and granularities for the analytics query endpoint. Management key required.Example Usage
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx | context.Context | :heavy_check_mark: | The context to use for the request. |
opts | []operations.Option | :heavy_minus_sign: | The options for this request. |
Response
*operations.GetAnalyticsMetaResponse, errorErrors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.UnauthorizedResponseError | 401 | application/json |
| sdkerrors.ForbiddenResponseError | 403 | application/json |
| sdkerrors.InternalServerResponseError | 500 | application/json |
| sdkerrors.APIError | 4XX, 5XX | */* |
QueryAnalytics
Execute an analytics query with specified metrics, dimensions, filters, and time range. Management key required.Example Usage
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx | context.Context | :heavy_check_mark: | The context to use for the request. |
request | operations.QueryAnalyticsRequest | :heavy_check_mark: | The request object to use for the request. |
opts | []operations.Option | :heavy_minus_sign: | The options for this request. |
Response
*operations.QueryAnalyticsResponse, errorErrors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.BadRequestResponseError | 400 | application/json |
| sdkerrors.UnauthorizedResponseError | 401 | application/json |
| sdkerrors.ForbiddenResponseError | 403 | application/json |
| sdkerrors.RequestTimeoutResponseError | 408 | application/json |
| sdkerrors.InternalServerResponseError | 500 | application/json |
| sdkerrors.APIError | 4XX, 5XX | */* |