- Replaced direct usage of STRIPE_PRICES with a new getStripePrices function for improved flexibility in pricing retrieval.
- Updated pricing details in the STRIPE_PRICES constant to reflect new price IDs.
- Enhanced subscription handling in various components to utilize the updated pricing structure.
- Changed subscription cancellation message from "Ends on" to "Cancels on" for clarity.
- Updated subscription data structure to require `cancelAtPeriodEnd` field.
- Adjusted Stripe pricing for various plans, increasing monthly and annual prices.
- Modified pricing display logic in the PricingSection component to reflect new prices.
- Increased default event limit for users without an active subscription from 10,000 to 100,000.
- Enhanced subscription retrieval to include `cancelAtPeriodEnd` status.
- Updated CORS origin validation to use a new `normalizeOrigin` function, ensuring consistent handling of incoming requests.
- Introduced `normalizeOrigin` utility to standardize URLs by removing the 'www.' prefix.
- Adjusted allowed domains loading to directly use domain names without adding 'https://' prefix, improving flexibility.
- Removed the .env.example file as it is no longer needed.
- Added DISABLE_SIGNUP environment variable to docker-compose files for cloud and development environments.
- Updated setup script to include DISABLE_SIGNUP with a default value of false.
- Modified auth.ts to utilize DISABLE_SIGNUP for controlling signup functionality.
- Introduced DISABLE_SIGNUP constant in const.ts to manage its value from environment variables.
- Added domain property to site configuration in addSite and changeSiteDomain functions.
- Implemented domain retrieval and update methods in SiteConfig class.
- Introduced origin validation in trackEvent to ensure requests come from registered domains, improving security.
- Added a constant to disable origin checking for development environments.
- Added GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET to both docker-compose files for cloud support.
- Included GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET in the environment variables.
- Updated the auth.ts file to enable social login providers for cloud deployments.
- Renamed handleManageSubscription to createPortalSession for clarity and added flowType parameter to support different subscription actions.
- Introduced new handlers for changing, viewing, and canceling subscriptions, improving user interaction with the subscription management process.
- Updated UI to include separate buttons for changing plans, viewing subscription details, and canceling subscriptions, enhancing user experience and accessibility.
- Modified createPortalSession API to handle different flow types for subscription updates and cancellations, ensuring proper session management with Stripe.
- Changed button text from "Get Started for Free" to "Start 14 day free trial" for clarity.
- Removed the "No credit card required. Free plan available for small projects." text to simplify messaging.
- Improved the pricing page layout with background gradients for a more visually appealing design.
- Adjusted slider component styles for better user interaction and aesthetics.
- Cleaned up code formatting for consistency across components.
- Added @radix-ui/react-slider dependency to package.json and package-lock.json for improved UI components.
- Introduced a new pricing page metadata in _meta.js to enhance site navigation.
- Adjusted trial event limit in monthly-usage-checker.ts to better reflect user subscription tiers.
* events
* wip
* Remove standardsection
* Enhance EventList and EventProperties components with loading skeletons and size prop
- Added a loading skeleton to EventList and EventProperties components for improved user experience during data fetching.
- Introduced a size prop to both components to allow for flexible rendering of elements based on size (small or large).
- Updated EventsPage to pass the size prop to EventList for consistent styling.
* Implement pagination and filtering for event retrieval
- Enhanced the analytics API to support pagination and filtering for event data retrieval.
- Introduced a new endpoint for fetching events with pagination and filtering capabilities.
- Updated the `useGetEvents` hook to support infinite scrolling and real-time updates.
- Added a new `EventLog` component to the EventsPage for better event tracking.
- Refactored existing event fetching logic to accommodate new query parameters and maintain backward compatibility.
- Added 'city' field to UserInfo type and updated related API to include city data.
- Introduced getLanguageName utility function for improved language display in user and session details.
- Updated UserPage and SessionDetails components to display city and formatted language information.
- Refactored Countries component to remove redundant language name logic, utilizing the new utility function instead.
- Updated the analytics API to extract UTM parameters from a new structured `url_parameters` map instead of individual fields.
- Refactored SQL query generation to use a unified `getSqlParam` function for improved consistency and maintainability.
- Enhanced the `PageviewQueue` to capture all URL parameters, streamlining data collection for analytics.
- Introduced a new utility function, `getAllUrlParams`, to parse and manage URL parameters effectively.
- Updated the analytics API and data models to include UTM parameters: utm_source, utm_medium, utm_campaign, utm_term, and utm_content.
- Refactored the useGetGoals and useGetSessions functions to utilize filtered UTM parameters for improved data retrieval.
- Enhanced the Filters component to support UTM parameters, adding new filter options and updating the UI accordingly.
- Updated the Referrers section to include tabs for UTM parameters, allowing users to filter and analyze data based on UTM attributes.
- Improved documentation and type definitions to reflect the addition of UTM parameters across the application.
- Updated the getSession function to derive session data from the events table, enhancing data accuracy and detail.
- Modified the getUserSessionCount function to count distinct session IDs from events instead of sessions, improving session tracking.
- Removed obsolete session table creation and materialized view definitions from Clickhouse initialization, streamlining the database setup.
- Replaced the deleteReport functionality with deleteFunnel, allowing for the deletion of funnels instead of reports.
- Updated the createFunnel API to reference the new funnels table and adjusted error handling for funnel existence and ownership checks.
- Modified the getFunnels API to fetch data from the funnels table, ensuring consistency in data retrieval.
- Removed the obsolete deleteReport file and updated schema to reflect the new funnels structure.
- Added support for event property key and value in FunnelStep type to allow filtering based on event properties.
- Updated FunnelForm component to manage property filtering state and toggle functionality for event steps.
- Enhanced FunnelRow component to display event property information when applicable.
- Modified getFunnel API to include property matching in event queries, improving analytics capabilities.
- Adjusted grid layout for better spacing in the FunnelForm.
- Updated card padding for Funnel Steps and Filters sections to improve visual consistency.
- Enhanced input fields with additional styling and placeholder text for clarity.
- Implemented wildcard path matching support in the analytics API for funnel steps, improving flexibility in path definitions.
* 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.
- Modified the response of the deleteSite function to return a success message in the response body, enhancing clarity for the client regarding the operation's outcome.
- Updated the getSite function to utilize getUserHasAccessToSitePublic for improved access control based on user permissions.
- Introduced a godMode boolean in the user schema to allow users with elevated privileges to access all sites.
- Enhanced the getSitesUserHasAccessTo function to check for godMode status, enabling users with this privilege to retrieve all sites directly.
* Refactor subscription management to introduce trial plan functionality
- Removed the FreePlan component and integrated trial plan logic into the SubscriptionPage.
- Added TrialPlan and ExpiredTrialPlan components to handle trial subscription states.
- Updated the useStripeSubscription hook to manage trial status and expiration messages.
- Adjusted constants and plan utilities to support trial duration and event limits.
- Enhanced the Subscribe page to reflect changes in plan selection and pricing structure.
* Add FreeTrialBanner component to Home and Header, and update plan utilities
- Integrated FreeTrialBanner into the Home and Header components to enhance user visibility of trial status.
- Introduced DEFAULT_EVENT_LIMIT constant to standardize event limits across subscription plans.
- Refactored plan utilities to include a free plan template with event limits and features for better clarity in subscription options.
* Refactor monthly usage checker to improve date handling and logging
- Updated getStartOfMonth function to use Luxon for date management, enhancing accuracy and readability.
- Adjusted user subscription info retrieval to use account creation date for trial users, ensuring correct event counting.
- Enhanced logging to provide clearer information about user subscriptions and event limits, improving traceability during usage checks.
- Added a new utility function `authedFetchWithError` to handle fetch requests with error checking.
- Updated existing API calls in `organizations.ts`, `sites.ts`, and other files to utilize the new error handling function.
- Refactored the `getUserOrganizations`, `addSite`, `deleteSite`, and other functions to enhance error management and response handling.
- Adjusted the `getUserHasAccessToSite` function to support admin-only checks, improving authorization logic.
- Modified the `AddMemberDialog` to set the default role to "admin" for new members, enhancing user management capabilities.
- Introduced `AddMemberDialog` to facilitate adding members to organizations in the settings page.
- Updated the organization component layout for improved user experience and accessibility.
- Refactored member handling logic to ensure proper refresh and state management.
- Added a new API endpoint for adding users to organizations, enhancing backend functionality.
- Modified account creation to include organization association, improving user onboarding process.
- Integrated `SqlString.escape` for parameterized inputs in `getLiveSessionLocations`, `getOverviewBucketed`, and `getSingleCol` to prevent SQL injection vulnerabilities.
- Refactored SQL query construction to ensure consistent escaping of parameters, enhancing overall code clarity and reliability.
- Improved limit handling in `getSingleCol` by validating and sanitizing the limit parameter, ensuring robust input validation.
- Simplified SQL limit handling in `getSingleCol` by consolidating limit logic into a single statement.
- Updated `getUserSessionCount` to ensure consistent SQL string escaping for timezone parameters.
- Enhanced overall readability and maintainability of SQL query construction across analytics endpoints.
- Added `sqlstring` package for safer SQL query construction across various analytics endpoints.
- Updated `getFunnel`, `getUserSessionCount`, and other functions to utilize `SqlString.escape` for parameterized inputs, enhancing security against SQL injection.
- Refactored input validation by replacing the `sql-sanitization` module with a new `query-validation` module, improving clarity and maintainability of parameter handling.
- Removed the deprecated `sql-sanitization.ts` file to streamline the codebase.
- Introduced detailed Zod schemas for date parameters, including validation for date format and timezone.
- Added new schemas for simplified date parameters and filter objects to improve input validation.
- Enhanced sanitization functions for `getTimeStatement` and `getFilterStatement` to ensure robust data handling and clarity in parameter validation.
- Updated SQL queries in `getFunnel`, `getLiveUsercount`, and `getOverviewBucketed` to utilize parameterized inputs for enhanced security and maintainability.
- Introduced a new `sql-sanitization.ts` module to validate and sanitize input parameters using Zod schemas, ensuring robust data handling.
- Refactored the `getTimeStatement` and `getFilterStatement` functions to incorporate input sanitization, improving code clarity and reliability.
- Updated various analytics API endpoints to utilize parameterized queries for better security and performance.
- Refactored the `getJourneys`, `getOverview`, and `getSessions` functions to improve query structure and readability.
- Enhanced the documentation in the `IndexPage` to provide clearer comparisons with other analytics tools and added new FAQs for user guidance.
- Introduced a refetch interval in the `useSiteHasData` hook to improve data freshness.
- Improved the `MapComponent` by integrating lodash for better number formatting.
- Added a new `dataviz` color configuration in `tailwind.config.ts` for improved data visualization styling.
- Introduced a new CSS variable `--dataviz` in `globals.css` to define the color used for data visualization elements.
- Updated various components to utilize the new `dataviz` color, replacing previous `accent` colors for consistency in charts and UI elements.
- Adjusted background and hover styles in the `Weekdays` component to reflect the new color scheme.
- Enhanced the `addSite` function to accept optional settings for `isPublic` and `saltUserIds`.
- Updated the `AddSite` component to include toggles for public analytics visibility and user ID salting.
- Refactored the `SiteSettings` component to manage these new settings with appropriate UI elements and state management.
- Improved form reset functionality to ensure a clean state when opening the dialog.
- Included the `saltUserIds` field in the response of the `getSite` function to enhance user ID salting management.
- This change supports the recent updates to site settings related to user ID security.
- Introduced a new boolean field `saltUserIds` in the `SiteResponse` and `GetSitesResponse` types to manage user ID salting.
- Implemented `changeSiteSalt` function to update the salting configuration for a site.
- Updated `SiteSettingsInner` component to include a toggle for enabling/disabling user ID salting, with appropriate UI feedback.
- Refactored server-side logic to replace `publicSites` with `siteConfig` for managing site configurations, including salting settings.
- Introduced a new boolean field `saltUserIds` in the `sites` schema to manage user ID salting.
- Implemented `getDailySalt` function in `trackingUtils.ts` to generate a deterministic daily salt based on an environment variable, enhancing user ID security.
- Updated `getUserId` function to incorporate the daily salt in the hashing process for improved uniqueness and security.
- Removed unused functions and constants from utils.ts, including various OS sets and the getUserId function.
- Introduced new session update logic in trackEvent.ts to handle both pageviews and events, ensuring accurate session tracking.
- Consolidated session management logic into a single updateSession function for clarity and efficiency.
- Added device type detection directly within the session creation process.
- Implemented IP address retrieval logic in trackingUtils.ts to enhance session tracking capabilities.
* Add D3.js library and update Sidebar component
* Enhance JourneysPage visualization and data handling
- Increased SVG dimensions for better visibility and layout.
- Expanded journey data processing to include more entries and track incoming/outgoing links for each node.
- Improved node representation by switching from circles to bars, with dynamic heights based on link values.
- Added tooltips to links for displaying counts and enhanced step labels with card backgrounds for better clarity.
- Updated API to adjust journey retrieval criteria and ensure accurate data types for counts and percentages.
* Add hover effects and unique identifiers to links in JourneysPage
- Implemented hover effects for links to enhance user interaction, making connected nodes and links more prominent.
- Added unique identifiers to each link for better tracking during interactions.
- Updated node bars, cards, and text to adjust opacity based on hover state for improved visual feedback.
* Refactor JourneysPage for improved data handling and visualization
- Introduced a constant for maximum link height to enhance visual consistency.
- Updated data handling to directly reference journey data, improving reliability.
- Adjusted SVG margins and dimensions for better layout.
- Enhanced node representation with additional percentage metrics displayed alongside counts.
- Modified text positioning and styling for improved readability and clarity in node cards.
- Expanded step selection options for user flexibility.
* Enhance JourneysPage functionality and data handling
- Introduced a maximum journeys selection feature to allow users to customize the number of journeys displayed.
- Updated timezone handling to dynamically reflect the user's local timezone.
- Adjusted the data processing logic to utilize the new maximum journeys setting for improved flexibility.
- Enhanced node card dimensions for better visual representation and readability.
- Modified text display in node cards to show counts in a localized format for improved clarity.
- Updated BaseStandardSectionDialog to display session and pageviews percentages with improved formatting.
- Enhanced getSingleCol API to calculate and return unique sessions and pageviews metrics, including their respective percentages for better analytics insights.
- Refined data handling in the dialog to ensure accurate representation of new metrics.
- Updated SingleColResponse type to include new metrics: pageviews, pageviews_percentage, and time_on_page_seconds.
- Adjusted useSingleCol hook to change the default limit from 1000 to 100 for better performance.
- Refactored BaseStandardSectionDialog to utilize React Table for improved data presentation and filtering capabilities.
- Implemented debounced search functionality in BaseStandardSectionDialog for more efficient filtering.
- Enhanced getSingleCol API to return additional metrics related to pageviews and time spent on pages, improving analytics insights.
- Upgraded Next.js from version 15.1.6 to 15.3.1 in both package.json and package-lock.json for improved performance and features.
- Updated various dependencies, including `sharp` and `semver`, to their latest versions for better functionality and security.
- Enhanced layout styling by importing additional fonts (Manrope, Outfit, Urbanist) in the TopBar component for improved typography.
- Removed obsolete Mermaid and page documentation files to streamline the project structure.