mirror of
https://github.com/rybbit-io/rybbit.git
synced 2025-05-11 12:25:36 +02:00
Refactor analytics data structure to replace 'iso_3166_2' with 'region' (#92)
* Refactor analytics data structure to replace 'iso_3166_2' with 'region' - Updated multiple files across the client and server to change references from 'iso_3166_2' to 'region' for consistency in data handling. - Adjusted type definitions, API responses, and SQL queries to reflect the new naming convention. - Enhanced filter parameters and UI components to ensure seamless integration of the updated region data. * Refactor Clickhouse session table and materialized view creation - Updated the Clickhouse integration to create a streamlined sessions table with essential fields for session tracking. - Introduced a materialized view for aggregating session data from events, ensuring accurate session start and end times, along with user and pageview information. - Removed commented-out code for clarity and improved maintainability.
This commit is contained in:
parent
da1903910f
commit
a915489fda
20 changed files with 105 additions and 168 deletions
|
@ -96,8 +96,7 @@ class PageviewQueue {
|
|||
screen_height: pv.screenHeight || 0,
|
||||
device_type: getDeviceType(pv.screenWidth, pv.screenHeight, pv.ua),
|
||||
country: countryCode,
|
||||
iso_3166_2:
|
||||
countryCode && regionCode ? countryCode + "-" + regionCode : "",
|
||||
region: countryCode && regionCode ? countryCode + "-" + regionCode : "",
|
||||
city: city || "",
|
||||
lat: latitude || 0,
|
||||
lon: longitude || 0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue