mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-27 10:42:45 +03:00
7e27b1cb36
closes https://linear.app/tryghost/issue/ANAL-58/click-through-filtering-for-content closes https://linear.app/tryghost/issue/ANAL-60/click-through-filtering-for-sources closes https://linear.app/tryghost/issue/ANAL-61/click-through-filtering-for-locations - This implements filtering and click-throughs for device, browser, source, location and pathname. - It requires significant updates to our tinybird setup, to pass through all the right data and have them as parameters on the API endpoints - We update the UI to add query parameters when clicking around and then pass those through to every chart/request. - We've added a interface to display the filters and remove them --------- Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
27 lines
723 B
Plaintext
27 lines
723 B
Plaintext
NODE analytics_sources_1
|
|
DESCRIPTION >
|
|
Aggregate by referral and calculate session and hits
|
|
|
|
SQL >
|
|
WITH (SELECT domainWithoutWWW(href) FROM analytics_hits LIMIT 1) AS current_domain
|
|
SELECT
|
|
site_uuid,
|
|
toDate(timestamp) AS date,
|
|
device,
|
|
browser,
|
|
location,
|
|
source,
|
|
pathname,
|
|
maxIf(
|
|
member_status,
|
|
member_status IN ('paid', 'free', 'undefined')
|
|
) AS member_status,
|
|
uniqState(session_id) AS visits,
|
|
countState() AS hits
|
|
FROM analytics_hits
|
|
WHERE source != current_domain
|
|
GROUP BY date, device, browser, location, source, pathname, site_uuid
|
|
|
|
TYPE MATERIALIZED
|
|
DATASOURCE analytics_sources_mv
|