Ghost/ghost/tinybird/datasources/analytics_pages_mv.datasource
Hannah Wolfe 4c5704bfa6 Added audience handling to stats
closes https://linear.app/tryghost/issue/ANAL-23/filtering-by-logged-out-logged-in-traffic

- Updated all of our tinybird datasources and pipes to handle member status
- Added member_status as an array query param to the API endpoints
- Added a really dodgy power select multiple to the stats page to demonstrate it works (needs styling)
- Added all of the wiring so each chart updates
- This was done pretty fast, and may not be 100% right yet
2024-09-02 12:56:37 +01:00

16 lines
451 B
Plaintext

SCHEMA >
`site_uuid` String,
`post_uuid` String,
`date` Date,
`device` String,
`browser` String,
`location` String,
`pathname` String,
`member_status` SimpleAggregateFunction(any, String),
`visits` AggregateFunction(uniq, String),
`hits` AggregateFunction(count)
ENGINE AggregatingMergeTree
ENGINE_PARTITION_KEY toYYYYMM(date)
ENGINE_SORTING_KEY date, device, browser, location, pathname, post_uuid, site_uuid