mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-30 22:34:01 -05:00
WIP: Adding post type column
- This is genuinely something we need to do :D
This commit is contained in:
parent
0f9449137f
commit
9f01456246
12 changed files with 23 additions and 15 deletions
|
@ -1,8 +1,9 @@
|
|||
VERSION 0
|
||||
VERSION 1
|
||||
|
||||
SCHEMA >
|
||||
`site_uuid` String,
|
||||
`post_uuid` String,
|
||||
`post_type` String,
|
||||
`date` Date,
|
||||
`device` String,
|
||||
`browser` String,
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
VERSION 0
|
||||
VERSION 1
|
||||
SCHEMA >
|
||||
`site_uuid` String,
|
||||
`date` Date,
|
||||
`session_id` String,
|
||||
`member_status` SimpleAggregateFunction(any, String),
|
||||
`post_uuid` SimpleAggregateFunction(any, String),
|
||||
`post_type` SimpleAggregateFunction(any, String),
|
||||
`device` SimpleAggregateFunction(any, String),
|
||||
`browser` SimpleAggregateFunction(any, String),
|
||||
`location` SimpleAggregateFunction(any, String),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
VERSION 0
|
||||
VERSION 1
|
||||
|
||||
NODE parsed_hits
|
||||
DESCRIPTION >
|
||||
|
@ -19,6 +19,7 @@ SQL >
|
|||
JSONExtractString(payload, 'member_uuid') as member_uuid,
|
||||
JSONExtractString(payload, 'member_status') as member_status,
|
||||
JSONExtractString(payload, 'post_uuid') as post_uuid,
|
||||
JSONExtractString(payload, 'post_type') as post_type,
|
||||
lower(JSONExtractString(payload, 'user-agent')) as user_agent
|
||||
FROM analytics_events
|
||||
where action = 'page_hit'
|
||||
|
@ -34,6 +35,7 @@ SQL >
|
|||
member_uuid,
|
||||
member_status,
|
||||
post_uuid,
|
||||
post_type,
|
||||
location,
|
||||
domainWithoutWWW(referrer) as source,
|
||||
pathname,
|
||||
|
@ -71,6 +73,7 @@ SQL >
|
|||
site_uuid,
|
||||
toDate(timestamp) AS date,
|
||||
post_uuid,
|
||||
post_type,
|
||||
device,
|
||||
browser,
|
||||
location,
|
||||
|
@ -82,8 +85,8 @@ SQL >
|
|||
) AS member_status,
|
||||
uniqState(session_id) AS visits,
|
||||
countState() AS pageviews
|
||||
FROM analytics_hits_data
|
||||
GROUP BY date, device, browser, location, source, pathname, post_uuid,site_uuid
|
||||
FROM analytics_hits
|
||||
GROUP BY date, device, browser, location, source, pathname, post_uuid, post_type, site_uuid
|
||||
|
||||
TYPE MATERIALIZED
|
||||
DATASOURCE analytics_pages_mv__v0
|
||||
DATASOURCE analytics_pages_mv__v1
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
VERSION 0
|
||||
VERSION 1
|
||||
|
||||
NODE parsed_hits
|
||||
DESCRIPTION >
|
||||
|
@ -19,6 +19,7 @@ SQL >
|
|||
JSONExtractString(payload, 'member_uuid') as member_uuid,
|
||||
JSONExtractString(payload, 'member_status') as member_status,
|
||||
JSONExtractString(payload, 'post_uuid') as post_uuid,
|
||||
JSONExtractString(payload, 'post_type') as post_type,
|
||||
lower(JSONExtractString(payload, 'user-agent')) as user_agent
|
||||
FROM analytics_events
|
||||
where action = 'page_hit'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
VERSION 0
|
||||
VERSION 1
|
||||
|
||||
NODE parsed_hits
|
||||
DESCRIPTION >
|
||||
|
@ -19,6 +19,7 @@ SQL >
|
|||
JSONExtractString(payload, 'member_uuid') as member_uuid,
|
||||
JSONExtractString(payload, 'member_status') as member_status,
|
||||
JSONExtractString(payload, 'post_uuid') as post_uuid,
|
||||
JSONExtractString(payload, 'post_type') as post_type,
|
||||
lower(JSONExtractString(payload, 'user-agent')) as user_agent
|
||||
FROM analytics_events
|
||||
where action = 'page_hit'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
VERSION 0
|
||||
VERSION 1
|
||||
|
||||
DESCRIPTION >
|
||||
Summary with general KPIs per date, including visits, page views, bounce rate and average session duration.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
VERSION 0
|
||||
VERSION 1
|
||||
|
||||
DESCRIPTION >
|
||||
Top Browsers ordered by most visits.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
VERSION 0
|
||||
VERSION 1
|
||||
|
||||
DESCRIPTION >
|
||||
Top Device Types ordered by most visits.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
VERSION 0
|
||||
VERSION 1
|
||||
|
||||
DESCRIPTION >
|
||||
Top visiting Countries ordered by most visits.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
VERSION 0
|
||||
VERSION 1
|
||||
|
||||
DESCRIPTION >
|
||||
Most visited pages for a given period.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
VERSION 0
|
||||
VERSION 1
|
||||
DESCRIPTION >
|
||||
Top traffic sources (domains), ordered by most visits.
|
||||
Accepts `date_from` and `date_to` date filter. Defaults to last 7 days.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
VERSION 0
|
||||
VERSION 1
|
||||
DESCRIPTION >
|
||||
Visits trend over time for the last 30 minutes, filling the blanks.
|
||||
Works great for the realtime chart.
|
||||
|
@ -25,6 +25,7 @@ SQL >
|
|||
JSONExtractString(payload, 'member_uuid') as member_uuid,
|
||||
JSONExtractString(payload, 'member_status') as member_status,
|
||||
JSONExtractString(payload, 'post_uuid') as post_uuid,
|
||||
JSONExtractString(payload, 'post_type') as post_type,
|
||||
lower(JSONExtractString(payload, 'user-agent')) as user_agent
|
||||
FROM analytics_events
|
||||
where action = 'page_hit'
|
||||
|
|
Loading…
Reference in a new issue