Commit Graph

172 Commits

Author SHA1 Message Date
Adrian Gruntkowski 16f1eb3075
Add necessary scaffolding for enabling LV on dashboard (#5930)
* Use forked version of

* Add necessary scaffolding for enabling LV on dashboard

* Implement basics for LV pages breakdown

* Make tile and tabs latency friendly

* Bring back eslint-disable pragma in live_socket.js

* Document the code somewhat

* Fix live navigation callback in React

* Make dashboard components inside portals testable

* Add very rudimentary basic tests

* Fix typo

* Fix eslint pragma in `live_socket.js`
2025-12-08 11:46:56 +00:00
Artur Pata 007155ba60
Validate password cookie for password-protected shared links on internal stats API requests (#5932)
* Works

* Move shared link password check to AuthorizeSiteAccess plug

* Write changelog, cleanup

* Handle cookies already fetched in AuthorizeSiteAccess

* Unify shared link kind with plugins API entity
2025-12-08 07:05:31 +00:00
Adam Rutkowski 08c7d2e948
Consolidated View life cycle + billing integration (#5866)
* Migration: add consolidated views feature to enterprise plans

* Migration: Add user preferences per team table

* Update static plan definitions

* Add feature module definition

* Display consolidated view availability in crm

* Extend ConsolidatedView interface:
 - add functions to manipulate user/team options (for CTA)
 - require at least two sites in order to create a consolidated view
 - require billing/plan compliance when computing eligibility

* Team/User preferences schema

* Implement consolidated view life cycle on /sites

Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
Co-authored-by: Uku Taht <uku.taht@gmail.com>

* Enroll `consolidated_view` feature flag

* Consolidated view access hardening (+feature flag)

- require team-wise feature flag instead of super admin role
- redirect to /sites if the team isn't eligible any more
- enforce regular site in shared links controller

* Remove no longer needed `ConsolidatedView.enabled?/1`

* Alias PrimaDropdown

* No consolidates views for shared links

* Remove user argument from `ok_to_display?`

* Adjust a temporary test

* More elaborate alert

* Fix responsive design issues on sites page

- Fix z-index issue with button dropdown
- Fix truncation issue with team name
- Improve responsiveness of site cards
- Fix focus state of site cards
- Improve responsiveness of consolidated view CTA
- Improve design of prima_dropdown component
- Replace `+` with plus icons in dropdown items

* Use the plus icon for standalone "Add website" too

cc @sanne-san

* Format

* Fix z-index issue with dropdowns on sites page

* Remove TODOs

* Make consolidated view cards disappear when searching

* Clean up test

* Use per-team membership user preferences

* Use conditional instead of `with` statement

* Inline `ensure_eligible`

* Use `Map.fetch!` getting preference from default struct

* fixup

* Revert "Migration: add consolidated views feature to enterprise plans"

Will be included via main branch sync

This reverts commit 05bec55276.

* Fix and test feature-flag effect on both view and CTA cards

---------

Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
Co-authored-by: Uku Taht <uku.taht@gmail.com>
2025-11-12 13:41:24 +00:00
Sanne de Vries ce424bf436
Update site switcher UI to accommodate for consolidated view (#5838)
* Update site switcher UI to accommodate for consolidated view

* Implement logic to display consolidated view in site picker

* Fix "All sites" selected state in site switcher

* Fixup tests

* Include consolidated view assigns in shared links

* Format

* Extract `ConsolidatedView.ok_to_display?/2`

* Format

* I'll pretend no one saw this

* Skip unnecessary `on_ee`

* oops

---------

Co-authored-by: Adam Rutkowski <hq@mtod.org>
2025-10-29 10:58:45 +00:00
RobertJoonas cc06a351bd
Remove virtual rollups in favour of persisted consolidated sites (#5749)
* virtual rollups -> consolidated sites

* fix queryparser and test

* fix legacy_query_builder and test

* fix typespec

* simple consolidated view query test (Stats API)

* add test util

* skip verification on consolidated sites

* add test for internal (dashboard) stats query

* fix CE

* Fix showing consilidated stats on the dashboard

...by making sure site.native_stats_start_at and stats_start_date are
set.

* fix CE again

* add typespecs and tests for native_stats_start_at

* skip else clause

* use ConsolidatedView.enable in test util

* defensive where builder

* remove redundant cache

* get query.consolidated_site_ids from cache

* fix test

* fix CE

* fix CE again

* eligibility check when enabling cvs

* create cvs with native_stats_start_at assigned already

* fix dialyzer warning
2025-09-25 13:58:32 +00:00
Adam Rutkowski e3bef74cde
Preserve query params for authenticated shared links (#5640) 2025-08-18 13:44:34 +00:00
RobertJoonas 6369d0efad
Dogfood script v2 (#5504)
* dogfood with script v2 + disable tracking in tests

* remove endpoint override

* disable dogfood tracking on localhost

* track pageviews from details views and filter modals
2025-06-25 10:56:02 +00:00
RobertJoonas 4e5093f86c
Starter Tier: Shared Link Feature Gates (#5474)
* feature gate creating shared links

* feature gate GET shared_link

* stop granting shared links access in code + organize tests

* allow GET shared_link for WP

* prevent shared link creation with special name

unless created by the Plugins API, the name WordPress - Shared Dashboard
will be considered reserved.

* do not render special shared links in site settings > visibility

* remove hardcoded special name from test

* add function doc for special names

* prevent updates to special name as well

* warn about losing access to shared links

* make features_usage return empty list on ce

* Update lib/plausible/sites.ex

Co-authored-by: hq1 <hq@mtod.org>

* move special name check to changeset

* fix tests

---------

Co-authored-by: hq1 <hq@mtod.org>
2025-06-10 06:43:40 +00:00
Adrian Gruntkowski eb838174a5
Change redirects from external to internal where possible (#5331) 2025-04-16 08:06:07 +00:00
Adrian Gruntkowski ec4c6c453a
Switch from `Site.locked` to `Team.locked` (#5304)
* Switch to `Team.locked` for checking lock state

* Rename `update_for_sites` => `update_for`
2025-04-15 06:59:34 +00:00
Artur Pata 2a18ba8f40
Hide footer when viewing stats (#5254)
* Stop showing footer with stats, except when user is not logged in / viewing shared dashboard

* Add testsfor Site Settings menu CE and EE

* Fix test titles, test org and tags
2025-04-11 05:06:27 +00:00
Karl-Aksel Puulmann 6127ebccc1
time-on-page: Remove flag, CHANGELOG.md, time_on_page in APIv2, update old tests (#5277)
* Remove new_time_on_page feature flag

* Update tests to use new time on page

* Mark time-on-page as a public metric in APIv2

* CHANGELOG.md

* Validate time_on_page in APIv2

* Update typing

* Remove redudant arguments

* Update GA4 test

* Update stats_controller_test

* Remove assertion from csv_importer

* Add nil case to new time on page tests
2025-04-08 07:28:03 +00:00
Karl-Aksel Puulmann 0fcbcc3a8c
time-on-page: csv import/export support, preparation for release (#5274)
* CSV import/export support for time-on-page

Note only the new time-on-page metric is exported this way

* visibility check for graphing of time_on_page

* FE no longer receives/sends legacy_time_on_page_cutoff

* Remove current_user from exports

* Remove legacy_time_on_page_cutoff from query.include, make behavior work off of site.legacy_time_on_page_cutoff explicitly

* Remove dead function

* More current_user_id removals
2025-04-08 06:25:11 +00:00
Karl-Aksel Puulmann 42cea1d889
time-on-page: `site.legacy_time_on_page` cronjob (#5215)
* site.legacy_time_on_page_cutoff migration

* Update migration logic

* Cronjob for setting legacy_time_on_page_cutoff

* Test site creation default legacy_time_on_page_cutoff

* Use site.legacy_time_on_page_cutoff

Leaving the query param logic for now for testing purposes

* tweak cron

* Work around defaults in tests

* Fixes

* Make cutoff date in job configurable - useful for backfilling
2025-03-31 08:54:49 +00:00
Artur Pata f698bbbf57
Clean up Saved Segments feature flags (#5228)
* Clean up Saved Segments feature flags

* Update feature name in Growth tier
2025-03-25 08:06:24 +00:00
RobertJoonas c8ba6d918c
Scroll depth flag cleanup (#5195)
* Backend: get rid of scroll_depth.ex

This commit starts treating the scroll depth feature as *always visible*,
removing the ClickHouse queries on dashboard loads and starting to always
include scroll_depth in dashboard reports and export queries.

* Frontend: remove site.scrollDepthVisible

* adjust csv_importer_test

* remove site.scroll_depth_visible_at
2025-03-13 13:39:38 +00:00
Artur Pata f7b535df4b
Fix dashboard report behavior when goals are in segments - variant C (#5175)
* Replace GET /segments and GET /segments/:segment_id with server-rendered list, fix issue with dashboard report columns

* Remove WIP comments and throw earlier for invalid dashboard state

* Fix Segments details issue on public / shared link sites, add tests
2025-03-13 13:02:14 +00:00
Karl-Aksel Puulmann 0514a6db18
time-on-page: dashboard + timeseries support (#5174)
* Support passing `include` as a query parameter for dashboard APIs

* Mark time-on-page metric sortable

It now is thanks to the changed query

* new-time-on-page flag with cutoff being sent to the frontend

* Add correct tooltip title

* Implement metric warning for when legacy and new time_on_page metrics are mixed

* Send legacy_time_on_page_cutoff to backend

* Make time-on-page graphable with the new metric

* Only show metric warnings for time_on_page if flag is enabled

* Changelog

* Solve an clickhouse error when querying timeseries with only legacy time-on-page

* Add tests for timeseries of new time-on-page

Along the way fix an issue with comparisons not working properly

* Solve a typing issue

* Allow toggling legacy_time_on_page_cutoff off in dashboard

* Slightly better workaround

* Solve typing issue

* Prettier

* Guard against no warning

* Solve warning
2025-03-12 09:51:53 +00:00
hq1 eaeec7ae5f
Exports revert (#5152)
* Revert "Ensure no export button is rendered for public roles"

This reverts commit 213fafe041.

* Revert "Restrict public CSV export access (#5089)"

This reverts commit d3d0547484.

* Keep the Role.public enum needed elsewhere
2025-03-06 09:58:03 +00:00
Artur Pata 75e46bf54b
Prepare FE feature flag for launching smoothly (#5146)
* Prepare FE feature flag for launching smoothly

* Enable choose_plan visuals on saved_segments_fe as well
2025-03-05 12:24:54 +00:00
Artur Pata 5ae2fd89f0
Resolve segment owner names and dates in site timezone in the BE (#5119)
* Resolve segment owner names and dates in site timezone in the BE

* Fix SegmentAuthorship

* Fix issue with updating dangling segment

* Refactor flaky PATCH segment test

* Unify segment type label logic

* Refactor SegmentOwnership type definitions for clarity
2025-02-28 07:06:20 +00:00
Artur Pata 421e7d2766
Add Saved Segments UI (variant D) (#4891)
* WIP

* Load members

* Assert that we know has_not_done will not work without changes

* Add tests

* Assert that dates are in the expected format

* Add tests, better authorship dates, api.js -> api.ts

* Add error panels

* Flatten errors on the API side

* Stop name copy from getting too long

* Make comparison mode and edit segment modes exclusive

* Fix flicker calculating space

* Fix issue with definite state not persisting

* Unhitch modals from query-context

* Separate API format and dashboard format of segment_data

* Clarify purpose of useDefiniteLocationState

* Tweak UI: site switcher, save as segment

* Fix issues with modals

* Remove commented and unnecessary code, better query context

* Fix too permissive site members dataset

* Make sure Segment doesn't show up as an option to customer without the FF

* Fix issue with 'See more' menu being present when it should not be

* Permit :has_not_done filter in segments

* Refactor to matching on filter list structure

* Flatten :and stemming from segment filters on first level

* Update test
2025-02-26 12:32:25 +00:00
Adrian Gruntkowski bf010a1537
Implement support for multiple team owners and multiple teams per user (#5008)
* Add tests for `Teams.get_or_create/1` and `Teams.get_by_owner/1`

* Start populating `current_team` in assigns fetching value from session

* Clean up team passing in invitation services

* Make site transfer service handle multi-team scenario

* Handle multi-team and permission transfer errors on controller level

* Handle multi-teams in site creation on service and controller level

* Drop validation limiting full membership to a single team

* Make user deletion account for public team ownership

* Adjust feature availability checks for Stats API key

* Use current_team when determining limits on site transfer invitation

* Adjust trial upgrade email submission to account for multiple owners

* Remove unnecessary `Teams.load_for_site/1`

* Spike renaming `owner` and `ownership` relationships to plural versions

* Make HelpScout integration handle owner of multiple teams gracefully

* Add FIXME note

* Resolve paddle callback issue by always provisioning a new team when none passed

* Set `current_team` as `my_team` only when user is an owner

* Implement basics of Teams CRM

* Extend Teams CRM

* Further adjust User and Site CRM and refine Team CRM

* Convert Enterprise Plan CRM to refer to team directly and not via user

* Remove unused virtual fields from User schema

* Add note to HelpScout integration

* Allow listing multiple owners under Site Settings / People

* Remove unused User schema relations

* Fix current team fetch in auth plug and context

* Implement basic team switcher

* Ensure (site) editor role is properly handled in site actions auth

* Don't set `site_limit_exceeded` error marker on `permission_denied` error

* Link from HS integration to Team CRM instead of User CRM when available

* Ensure consistent ordering of preloaded owners

* Add `with_subscription` preload for optimisitation

* Add ability to search sites by team identifier

* Add ability to pick team when transferring ownership directly

* Fix failing HelpScout tests

* Scope by team when listing sites in dashboard and via API (optional)

* Add ability to search by team identifier in plans CRM lookup widget

* Add subscription plan, status and grace period to team status info

* Expose teams list in user CRM edit form and fix team details CRM view

* Fix Team Switcher styling

* Reorganise header nav menu

* Avoid additional queries when authenticating user

* Hide the pay/site transfer message on lock screen when teams FF is on

---------

Co-authored-by: Adam Rutkowski <hq@mtod.org>
2025-02-19 09:33:25 +00:00
Adrian Gruntkowski d3d0547484
Restrict public CSV export access (#5089)
* Restrict public CSV export access

* restrict export

* Restrict public CSV export access

* Revert "restrict export"

This reverts commit f756486420.

* Don't show CSV export option for viewers who are not logged in

---------

Co-authored-by: Adam Rutkowski <hq@mtod.org>
2025-02-18 17:07:58 +00:00
Uku Taht c44151f040
Remove channels feature flag (#4972)
* Remove channels feature flag

* Add changelog
2025-02-13 11:48:24 +00:00
Cenk Kücük b4ec09c6cb
Revert "Scroll depth: update `site.scroll_depth_visible_at` in ingestion (#5035)" (#5042)
This reverts commit 84aea97b95.
2025-02-03 15:07:15 +00:00
Karl-Aksel Puulmann 84aea97b95
Scroll depth: update `site.scroll_depth_visible_at` in ingestion (#5035)
* WIP: Update scroll_depth_visible_at in ingestion

* Simplify code and test genserver directly

* No more check_scroll_depth_visible!

* Update a test

* Update a test

* GenServer -> ets

* Additional where

* Fix a test
2025-02-03 09:37:58 +00:00
Karl-Aksel Puulmann 7c6ba04a3c
Handle missing scroll depth #2 (#5017)
* add migration

* move scroll_depth_enabled? fn

* maybe set engagement_metrics_enabled_at when requesting dashboard

* maybe set engagement_metrics_enabled_at in shared_link action

* maybe set engagement_metrics_enabled_at on full export

* fix tests

* feature gate scroll depth on the dashboard with site.engagement_metrics_enabled_at

* feature gate scroll depth in full export too

* fix npm ci

* Rename things into FE, remove unneccessary flag checks

* Continue with renaming

* Rename site flag to be more descriptive

* Move business logic, calculate based on scroll depth, make more precalculatable

* Some docs

* Rename to site.scrollDepthVisible in frontend

* Update migration

* Fix template

* Remove boilerplate from tests

* Update tests

* More straight-forward test

* Update condition

---------

Co-authored-by: Robert Joonas <robertjoonas16@gmail.com>
2025-01-29 09:47:49 +00:00
Karl-Aksel Puulmann 9a4969e105
APIv2: Behavioral filtering (#4980)
* Expose site_id and site_native_stats_start_at via query

This allows to do more query-building without exposing and passing `site` directly.

* Very basic has_done/has_done_not operator support

No event:goal support yet, no validations

* Add validations that only event: dimensions can be used within has_done/has_done_not

* Allow event:goal filters nested within has_done/has_done_not behavioral filters

* Minor fix for do_decide_custom_prop_table

* has_done support for goals

Minor changes along the way:
- preloaded_goals structure changes
- event:goal restrictions were loosened within has_done
- we don't allow nesting has_done anymore

* Dont query imports when behavioral filters are present

* Update callsites of filtering_on_dimension? to work with new behavioral filters

* has_done_not -> has_not_done

* Changelog entry

* Typegen

* credo cleanup

* Fix changelog

* Remove changelog

* Mark has_done as internal-only

* combine two validations into a single loop

* has_done is now session-based not user-based

* Update a test

* Update transform_tree
2025-01-21 12:03:26 +00:00
RobertJoonas 7f3e91e1cc
[FF] Average Scroll Depth Metric: dashboard CSV export (#4898)
* extract test util function

* add scroll depth to pages.csv

* add scroll_depth to (page-filtered) visitors.csv

* silence credo
2024-12-16 16:07:43 +00:00
Adrian Gruntkowski 76cf87427d
Split `current_team` into `site_team` and `my_team` (#4881)
* Change TODO into NOTE

* Split `current_team` into `site_team` and `my_team`
2024-12-05 11:14:38 +00:00
RobertJoonas 6822b29016
Average Scroll Depth Metric: put scroll depth on the dashboard under a feature flag (#4832)
* migration: add scroll_depth to events_v2

* (cherry-pick) ingest scroll depth

* replace convoluted test with more concise ones

* QueryParser: parse internal scroll_depth metric + validation

* turn QueryComparisonsTest into QueryInternalTest

* rename file

* (cherry pick) query scroll depth 15b14d3

...and move the tests into `internal_query_test.exs`

* review feedback

* Get rid of unnecessary separation between aggregate and group scroll depth
* Drop irrelevant other metrics in tests

* add test ensuring scroll depth unavailable in Stats API v1

* Put scroll depth on the dashboard

* Top Stats
* Main Graph
* Top Pages > Details

* feature flag for dashboard scroll depth access

* ignore credo warning

* enable scroll_depth flag in tests

* remove duplication

* write timestamps explicitly in a test

* revert moving tests around

* Add query_comparisons_test back
* Move scroll_depth tests into query_test
* Delete query_internal_test

* rename setup util (got updated on master)

* use pageleave_factory where applicable

* Use the correct generated query-api.d.ts

* npm format
2024-11-20 13:13:04 +00:00
Uku Taht 98bc3e7554
Channels in dashboard CSV export (#4787)
* Add channels.csv to dashboard CSV export

* Feature flag channels in CSV

* Disable credo
2024-11-11 09:31:57 +00:00
Karl-Aksel Puulmann af5eb720db
Release breakdown_comparisons_ui flag (#4774) 2024-11-05 09:13:22 +00:00
Artur Pata 13ad279820
Add second line for Filters (if saved_segments enabled) (#4729) 2024-11-04 08:22:48 +00:00
Karl-Aksel Puulmann aec0318c3b
Dashboard: show comparison for breakdowns (#4692)
* Comparisons: Move code to LegacyQueryBuilder

* WIP: Return comparison results to frontend

* refactor: remove useless param

* Different result format

* Pass object to metric.renderValue

* remove dead code

* Fixup response format

* Comparison in a tooltip

Not perfect at all, but a good start. Problems arise with money etc.

* Simple change arrow

* Extract metric entry to ts

* popper attempt WIP

* Slightly nicer content

* Solve warning

* Unified changeArrow in app

* Remove needless spanning

* Always set `graph_metric` in top stats.

FE already has business logic around whether a given metric is graphable

* Remove dead code

* Move Money module under dashboard utils, keep in build

* change <Metric /> definition to take in a `formatter` and store default formatters in another (typed) const

* Use standard system for formatting numbers

* Arrows only in table

* remove dead import

* Inline renderValue

* Render metric name in tooltip

* numberFormatter -> numberShortFormatter

* numberShortFormatter update

* Separate long/short formatters

* Use long vs short formatters

* Put column name into tooltip

* Slightly improved label handling for percentages, conversion rate

* Improved boundary handling in tooltip.js

* Iterate tooltips, no tooltip for - revenue

* Update top stats tests after graph_metric change

* Change revenue metrics stats API return structure

Conversion now happens earlier in query pipeline, we return float for comparison purposes

* useQueryContext in a component

* graph_metric for current visitors to fix realtime view

* No tooltips if fully - row

* renderValue as a proper function

* Simplify MetricEntry

* Use common const

* tooltip to typescript

* More explicit return structure

* metric-entry -> metric-value

* Restore some files

* ChangeArrow

* Restore MoreLink

* Fix typing in MoreLink

* <MetricValue />

* Tests for MetricValue and ChangeArrow

* details modal fixups

* re-add space between arrow and percentage

* Solve stylelint issues

* Update test

* Format

* Add flag `breakdown_comparisons_ui`

* reformat

* Remove no change icon, better alignment

* Revert "Remove no change icon, better alignment"

This reverts commit a8d62b6383.

* number-formatter.ts

* numberLongFormatter refactor

* useMemo dependency

* Handle nulls/undefined in top stats

---------

Co-authored-by: Uku Taht <uku.taht@gmail.com>
2024-10-22 09:02:13 +00:00
Uku Taht 7a77ebf9bf
Add feature-flagged channels UI (#4585)
* Add feature-flagged channels UI

* Implement channels modal

* Channel -> Channels tab
2024-09-18 08:34:12 +00:00
Adrian Gruntkowski 6769ebdc24
Refactor `AuthorizeSiteAccess` (#4583)
* Refactor and fix `AuthorizeSiteAccess` plug shared link case handling

* Make plug module name more consistent

* Add moduledoc

* Add regression test for shared link auth case

* Adjust failing case test to account for different response

* Further restrict accepted input and configuration

* Extend plug-specific tests

* Tag EE-only test properly

* Remove one DB roundtrip from AuthorizeSiteAccess

* Improve naming slightly

* Filter shared link by site ID on query level already

---------

Co-authored-by: Uku Taht <uku.taht@gmail.com>
2024-09-17 12:52:20 +00:00
Karl-Aksel Puulmann bd11b4cf67
APIv2: Standard iso8601 timestamps, operate on UTC (#4563)
* query.date_range is now in UTC instead of user timezone

This simplifies things down the line and fixes several bugs where
query.date_range is cast to naivedatetime for ecto purposes

Many places still remain broken:
- comparison queries
- `to_date_range` calls

* Make default_for_date_range not care about time zones

* Make timezone parameter mandatory for to_date_range

* Simplify utc_date_range, update legacy query builder

* Fix more cases where query date range is needed

* query.date_range -> query.utc_time_range

* Query.date_range/1 function

* ensure_include_imported update

* Clean up send_email_report
2024-09-11 09:21:59 +03:00
Karl-Aksel Puulmann 8fa3a83129
APIv2: and/or/not support (#4480)
* First approximation of AND/OR/NOT support

Broken by this:
- Goal filtering
- Table deciding
- Imports

* TableDecider handle nesting

* Query.remove_top_level_filters

* Plausible.Stats.Imported.SQL.Expression

* Handle AND/OR/NOT with imported data, create Plausible.Stats.Imported.SQL.WhereBuilder

* Add parser validations for event:goal, event:hostname and event:props:x filters top level constraints

* Move module around

* Query.get_filter -> Filters.filtering_on_dimension? in some callsites

* Filters.get_toplevel_filter

* TableDecider.sessions_join_events?, remove old method

* Transforming filters in query_optimizer

* Query API tests for and/or/not

* Reorder parser steps

* Post-merge test fixups

* Solve merge issue

* Simplify filtering_on_dimension?

* Update transformer code

* dimensions_used_in_filters min_depth option, simplify parser validations

* rename_dimensions_used_in_filter

* fix rename_dimensions_used_in_filter

* Rename a test
2024-09-04 15:44:03 +03:00
Karl-Aksel Puulmann 059b5e0cdd
Dont include imports for time:hour and time:minute dimensions (#4504)
* Dont include imports for time:hour and time:minute dimensions

Also include more information about import warnings in query results

* Update lib/plausible/stats/query_result.ex

Co-authored-by: RobertJoonas <56999674+RobertJoonas@users.noreply.github.com>

* Revert patch

* Imported disabled graph notice (#4522)

* add explicit skip_imported_reason for unsupported interval

* stop returning information about imports from main_graph

* return warning about interval in Stats API Timeseries

* display warning bubble about interval too short for imported data

* update changelog

* improve styling of the exclamation circle icon

* return tuple from timeseries instead of map

* rename variable

* Update CHANGELOG.md

---------

Co-authored-by: RobertJoonas <56999674+RobertJoonas@users.noreply.github.com>
2024-09-04 10:53:00 +03:00
hq1 e3af1a317d
Onboarding improvements (#4459)
* Migration: add installation meta

* Update site schema with installation meta

* Remove VERIFICATION_ENABLED env var

* Add context API to create/remove special goals

* Add context api to update installation meta

* Remove verification enabled check

* Update new progress flow definitions

* Update generic components

* Remove internal /status API

* Implement installation live view

* Update traffic change notifier link

* Update verification, no more modal

* Update routes

* Remove focus.html - will unify everything under app layout

* Fix broken link

* Update templates with focus_box mostly

* Update controller tests

* Update controllers and stop using the focus layout

* copy changes

* Update verification.ex

* Remove dead template

* Update settings_general.html.heex

* Update copy in tests

* Update installation.ex

* Remove dangling dot

* Fix link

* Update installation.ex

* Update installation.ex

* Better tooltips?

* Simpler labels

* Revert "Simpler labels"

This reverts commit 797560ef82f2067458b03b884be5aecc8fdc72bc.

* Add copy to clipboard link and fix snippet's dark mode

* Offer installation detection skip only if ws connected

* Put COPY link at the bottom with background

* Make tooltips link to docs

* Fix cherry-pick gone wrong

* Hide tooltips on mobile screens

* WIP: 404 tracking wizard

* Revert "WIP: 404 tracking wizard"

This reverts commit a9c9c79bbd.

* Update lib/plausible_web/live/components/verification.ex

Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>

* Update lib/plausible_web/live/installation.ex

Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>

* Use current_user from socket.assigns

* Update lib/plausible_web/live/installation.ex

Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>

* Use current_user from socket.assigns

* Use conn.private to steer verification tests

* Drop non-sticky tooltip in favour of component parametrization

Co-authored-by: Artur Pata <artur.pata@gmail.com>

* Reapply "WIP: 404 tracking wizard"

This reverts commit 3ba81671d7.

* Fix installation tests including 404 tracking

* Fixup the tooltip component

* Format

* Update installation.ex

* Put flash whenever installation option changes

* Use last known installation type on domain change

* Extract user flow definition to provide compile-time checks

* See if this helps running CE migrations successfully

* Use `styled_link` on registration/login views

* Don't crash when there's no conn.private carried over

* Format

* Push "Determining installation type" message a bit lower

* Use links and footer lists uniformly

This commit introduces a `<.focus_list/>` component
for rendering focus box footer links with colored
discs. It also equips generic link components
with the ability of sending non-GET requests
along with CSRF token, so we can apply uniform
styling and stop using legacy Phoenix link tags.

cc @zoldar @apata

* ws 👾

* Render more descriptive flashes on script config change

---------

Co-authored-by: Marko Saric <34340819+metmarkosaric@users.noreply.github.com>
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
Co-authored-by: Artur Pata <artur.pata@gmail.com>
2024-09-02 12:49:54 +02:00
hq1 0440d36577
Implement new onboarding/provisioning flow progress layout (#4441)
* Implement new onboarding/provisioning flow progress layout

* Delete dead template

* Fixup & test FlowProgress component
2024-08-16 10:07:48 +02:00
Karl-Aksel Puulmann 4967960278
Populate log_comment with debug information, /debug/clickhouse route (#4435)
* Set log_comment with request information

* CRMAuthPlug -> SuperAdminOnlyPlug

* Super basic debug view

* Handle clustered setups

* Changelog entry

* Cleanup

* fragment trick to use ecto querying, filtering

* Move clustered_table? function to IngestRepo module

* Format

* More resilient user_id getting in helper
2024-08-14 12:33:36 +03:00
ruslandoga 5e2a9563f7
Remove `Timex.format` (#4402) 2024-08-12 10:01:13 +02:00
ruslandoga ba77f0513e
use nimble_csv everywhere (#4183) 2024-07-16 12:12:29 +03:00
Karl-Aksel Puulmann 284b4ebbf6
`does_not_contain`, new filters wildcard matching (#4228)
* Make goals accept wildcards in :is queries

* Add support for contains/does_not_contains in the backend

* Support all operations for event custom properties

* Support does_not_contain on the frontend

* Changelog entry

* Render filter operations nicely for does not contain

Found 3 extra pixels for operation dropdown

* Remove multiple_filters feature flag
2024-06-21 11:32:05 +03:00
Karl-Aksel Puulmann ed8abf426b
Revert "Revert "Re-apply multiple filters in FE (#4219)" (#4223)" (#4227)
This reverts commit 2c05676d8e.
2024-06-21 11:31:02 +03:00
Karl-Aksel Puulmann 2c05676d8e
Revert "Re-apply multiple filters in FE (#4219)" (#4223)
This reverts commit 77520390f8.
2024-06-13 12:45:50 +03:00
Adrian Gruntkowski 4baf6587ec
Do not parse query params from dogfooded events (#4217)
* Do not parse query params from dogfooded events

* Revert "Do not parse query params from dogfooded events"

This reverts commit ee97b87864.

* Ignore URL params entirely when dogfooding demo dashboard
2024-06-13 10:53:57 +02:00