08bf49eaec
ref https://linear.app/tryghost/issue/ANAL-27/setup-tinybird-project-and-cicd ref https://github.com/tinybirdco/web-analytics-starter-kit/blob/main/tinybird/pipes/analytics_sessions.pipe - These datasources and pipes work together to define the main endpoints we need for our stats dashboard - They are based on the web analytics starter kit from tinybird - We've updated them to handle site_uuid - There's more to do to pipe the member-related and post-related data through the system yet
19 lines
570 B
Plaintext
19 lines
570 B
Plaintext
SCHEMA >
|
|
`site_uuid` String,
|
|
`member_uuid` String,
|
|
`member_status` String,
|
|
`post_uuid` String,
|
|
`date` Date,
|
|
`device` String,
|
|
`browser` String,
|
|
`location` String,
|
|
`pathname` String,
|
|
`visits` AggregateFunction(uniq, String),
|
|
`hits` AggregateFunction(count),
|
|
`logged_in_hits` AggregateFunction(count),
|
|
`logged_out_hits` AggregateFunction(count)
|
|
|
|
ENGINE AggregatingMergeTree
|
|
ENGINE_PARTITION_KEY toYYYYMM(date)
|
|
ENGINE_SORTING_KEY date, device, browser, location, pathname, member_uuid, member_status, post_uuid, site_uuid
|