GET
/
v1
/
analytics
/
blocks
curl --request GET \
  --url https://api.oneofnone.io/v1/analytics/blocks \
  --header 'x-api-key: <api-key>'
{
  "meta": {
    "start_date": "2023-12-25",
    "end_date": "2023-12-25",
    "aggregation": "daily",
    "total_clicks": 123,
    "unique_users": 123,
    "avg_dialog_duration": 123,
    "applied_filters": {}
  },
  "summary": {
    "top_clicked_blocks": [
      {
        "block_id": "<string>",
        "block_name": "<string>",
        "block_type": "<string>",
        "clicks": 123,
        "unique_users": 123
      }
    ],
    "block_type_breakdown": {
      "external_url": 123,
      "reward": 123,
      "dialog": 123
    },
    "dialog_content_breakdown": {
      "video": 123,
      "image": 123,
      "carousel": 123,
      "post": 123,
      "iframe": 123
    },
    "avg_block_index": 123,
    "device_breakdown": {
      "mobile": 123,
      "tablet": 123,
      "desktop": 123
    },
    "geo_breakdown": [
      {
        "country": "<string>",
        "region": "<string>",
        "clicks": 123
      }
    ]
  },
  "data": [
    {
      "date": "2023-12-25",
      "total_clicks": 123,
      "unique_users": 123,
      "top_block": {
        "block_id": "<string>",
        "block_type": "<string>",
        "clicks": 123
      },
      "block_type_breakdown": {
        "external_url": 123,
        "reward": 123,
        "dialog": 123
      },
      "avg_dialog_duration": 123,
      "avg_block_index": 123,
      "device_breakdown": {
        "mobile": 123,
        "tablet": 123,
        "desktop": 123
      }
    }
  ],
  "pagination": {
    "limit": 123,
    "offset": 123,
    "prev": "<string>",
    "next": "<string>"
  }
}

Authorizations

x-api-key
string
header
required

The API key required for accessing protected routes. It should be included in the request headers as x-api-key.

Query Parameters

start_date
string
required

The start date for the analytics in ISO 8601 format (e.g., "2024-09-01").

end_date
string
required

The end date for the analytics in ISO 8601 format (e.g., "2024-09-30").

aggregation
enum<string>
required

The aggregation level for the data.

Available options:
daily,
weekly,
monthly,
quarterly,
yearly
page_path
string

The page path to filter by.

team_id
integer

The team ID to filter by.

team_slug
string

The team slug to filter by.

collection_id
integer

The collection ID to filter by.

collection_slug
string

The collection slug to filter by.

token_id
integer

The token ID to filter by.

block_id
string

The block ID to filter by.

block_type
enum<string>

The block type to filter by.

Available options:
external_url,
reward,
dialog,
all
dialog_content_type
enum<string>

The dialog content type to filter by.

Available options:
video,
image,
carousel,
post,
iframe,
all
country
string

The country to filter by.

region
string

The region to filter by.

device_type
enum<string>

The device type to filter by.

Available options:
mobile,
tablet,
desktop,
all
min_block_index
integer

The minimum block index to filter by.

max_block_index
integer

The maximum block index to filter by.

order_by
enum<string>

The field to order by.

Available options:
date,
total_clicks,
unique_users,
avg_dialog_duration
order
enum<string>

The sort order (ascending or descending).

Available options:
asc,
desc
limit
integer
default:
50

The number of results per page.

offset
integer
default:
0

The offset for pagination.

Response

200
application/json
Successfully fetched block analytics.
meta
object
summary
object
data
object[]
pagination
object