* Add goal management functionality in analytics
- Introduced goal creation, deletion, and updating capabilities in the analytics API, allowing users to define conversion goals based on path or event types.
- Implemented corresponding React hooks for managing goals, including fetching, creating, updating, and deleting goals.
- Enhanced the UI with a dedicated Goals page and components for listing and managing goals, improving user experience in tracking conversions.
- Updated package dependencies to include necessary libraries for form handling and validation.
* Enhance goals management with pagination and sorting
- Added pagination and sorting capabilities to the goals fetching logic in the analytics API, allowing users to navigate through goals more efficiently.
- Updated the GoalsPage component to manage current page state and handle page changes, improving user experience.
- Modified the GoalsList component to display pagination metadata and navigation controls, facilitating better goal management.
- Adjusted the server-side getGoals function to support pagination and sorting parameters, ensuring accurate data retrieval.
* Refactor GoalsPage and GoalCard components for improved UI and functionality
- Updated GoalsPage to include a SubHeader component and adjusted layout for better responsiveness.
- Enhanced loading and empty state handling in GoalsPage for a smoother user experience.
- Modified GoalCard to use icons for goal types, improving visual clarity and consistency in the UI.
* Refactor CreateGoalButton and GoalCard components for improved modal handling
- Updated CreateGoalButton to utilize a trigger prop for the GoalFormModal, simplifying modal state management.
- Refactored GoalCard to integrate GoalFormModal for editing goals, enhancing user interaction and reducing state complexity.
- Removed unnecessary state management and modal handling from both components, streamlining the codebase.
* Refactor GoalCard and Clickhouse initialization for improved code clarity
- Removed unnecessary imports in GoalCard component, streamlining the code.
- Updated Clickhouse initialization to include a new 'props' JSON field alongside 'properties', enhancing data structure for analytics.
- Added a utility function in PageviewQueue to parse properties, improving error handling and data integrity.
* enable clickhouse
* fix ch build
* fix ch build
* fix ch build
* wip
* wip
* wip
* Enable json
* add network
* add network
* Refactor Clickhouse configuration and remove unused properties from data models
* Refactor property value handling in analytics queries to utilize native JSON types in ClickHouse, improving type safety and performance.
* 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.
- Updated multiple analytics functions to replace references from 'pageviews' to 'events' for consistency in data tracking.
- Adjusted SQL queries across various files including getEvents, getFunnel, getLiveSessionLocations, and others to ensure accurate event data retrieval.
- Enhanced the deleteSite function to remove events associated with a site, improving data management.
- Replaced text link with an image link in the TopBar component for improved branding.
- Added UTM parameters to the Clickhouse database schema for better tracking of marketing campaigns.
- Implemented UTM parameter extraction utility and integrated it into the pageview tracking process.
- Introduced a new function to check for self-referrals, allowing for better categorization of internal traffic.
- Updated the getChannel function to treat self-referrals without UTM parameters as "Internal" traffic.
- Modified pageviewQueue to clear self-referrer data when applicable, improving data accuracy.
- Added a utility function to clear self-referrer if it matches the current hostname, enhancing tracking precision.
- Adjusted the margin of the RetentionChart component for improved layout.
- Added a new 'channel' field to the Clickhouse schema to enhance data tracking capabilities.
- Integrated the 'channel' field into the pageviewQueue to capture additional context from page views.
- Added a new RealtimePage component to display live session locations on a map.
- Integrated zoom handling to adjust circle sizes based on session counts.
- Utilized GeoJSON for rendering country boundaries and added tooltips for session count visibility.
- Updated server routes to fetch live session locations data.
* Mostly working map
* Fix tooltip
* Merge position and viewOptions state
* Merge Position and ViewOptions into MapView
* Rework tooltip state and display country flag
* Minor map back button text change
* Rebase to resolve merge conflicts
* Fix tooltip
* Merge position and viewOptions state
* Merge Position and ViewOptions into MapView
* Rework tooltip state and display country flag
* Minor map back button text change
* Delete map from before stuff got moved around
* Use Leaflet map
* Remove outline on click and highlight region on hover
* Remove Antarctica from countries.geojson
* Remove countries with no ISO_A2 (Dhekelia Sovereign Base Area, Somaliland, US Naval Base Guantanamo Bay, Brazilian Island, Northern Cyprus, Cyprus No Mans Area, Siachen Glacier, Baykonur Cosmodrome, Akrotiri Sovereign Base Area, Southern Patagonian Ice Field, Bir Tawil, Indian Ocean Territories, Coral Sea Islands, Spratly Islands, Clipperton Island, Ashmore and Cartier Islands, Bajo Nuevo Bank (Petrel Is.), Serranilla Bank, Scarborough Reef)
* Remove Antarctica from subdivisions.geojson
* Remove subdivisions for countries with no ISO_A2 (Dhekelia Sovereign Base Area, Somaliland, US Naval Base Guantanamo Bay, Northern Cyprus, Siachen Glacier, Baykonur Cosmodrome, Akrotiri Sovereign Base Area, Indian Ocean Territories, Coral Sea Islands, Spratly Islands, Clipperton Island, Ashmore and Cartier Islands)
* Remove react-simple-maps
* package-lock.json change after npm install
* Center tooltip and modify hover opacity
* Center map on load
* Fix tooltips not reflecting updated data
* Remove old countries and subdivisions geojson
* Add new countries and subdivisions json