Commit Graph

3960 Commits

Author SHA1 Message Date
Artur Pata 17951faec8 Update test cache options to be on par with the real cache 2025-12-17 13:47:32 +02:00
Artur Pata 4c40a77b5a Update cache options and assert that CE broadcast_put works 2025-12-17 11:27:39 +02:00
Artur Pata c0397da663 Add tests 2025-12-16 20:31:22 +02:00
dependabot[bot] 69d8d22ac2
Bump actions/cache from 4 to 5 (#5949)
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-16 12:58:01 +00:00
dependabot[bot] 9978f9be0f
Bump actions/download-artifact from 6 to 7 (#5951)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-16 12:45:26 +00:00
Sanne de Vries dfeda94e06
Add report percentages to dashboard and details view (#5923)
* Update report percentages on dashboard and details view

* Add percentages to Countries, Regions, and Cities reports

* Add percentages to Channels, Sources, and UTM reports

* Add percentages to top pages, entry pages, and exit pages reports

* Update tests to include percentages

* Change dashboard copy from title case to sentence case

* Update details modal style

* Make animations snappier

* Introduce max height to modal and make inner content scrollable

* Improve modal mobile design

- Enable horizontal scroll for details modal on mobile
- Add responsive spacing and positioning to modal

* Added mobile tap behavior to external link in list report

* Show tooltips only when in comparison mode or when the number is abbreviated

* remove previously added showTooltip prop

- This isn't needed anymore since we now handle the tooltip logic in the MetricValue component

* Show long format upon hovering detailed view metrics

* Added mobile tapping behaviour to detailed view

* Added percentages to all detailed views

* Add mobile swipe-to-close behavior for modal

* Adjust sensitivity of modal drag to close

* Use hammerjs for swipe-to-close modal behaviour

* Prevent dragging if gesture starts inside table

* Show 2 decimal places for percentages < 0.1% across dashboard

* Adjust dark mode styles

* Add hover effect to external link icon

* Update tests to expect two-decimal percentages

* Undo hammer install and revert to old modal styling

* Remove CR and % columns from goals and custom props reports on dashboard, and show on hover in detailed view

* Remove unused constants

* Undo conversion rate on hover behaviour

- Unlike percentages, CR should show permanently.

* Show percentages permanently in custom props detailed view

* Adjust width of conversion metrics column

* Updated metric-value test

* Update top-bar test

* Added changelog entry

* Fix test expectations for percentages with imported data

- Update tests to expect correct percentages (≤100%) when imported data is included. These tests will fail until the percentage calculation bug is fixed, documenting the expected behavior.

* Add imported_visitors to tests to ensure correct total_visitors calculation

* Correct imported_visitors count in test
2025-12-16 12:43:16 +00:00
dependabot[bot] 6446e15871
Bump actions/upload-artifact from 5 to 6 (#5948)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-16 12:37:54 +00:00
dependabot[bot] 810b956269
Bump tj-actions/changed-files from 47.0.0 to 47.0.1 (#5950)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 47.0.0 to 47.0.1.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](24d32ffd49...e002140703)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-version: 47.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-16 12:37:41 +00:00
Adam Rutkowski aed90f7ffc
Make CI vigilant about uncaptured logs during test runs (#5676)
* Let's see

* test error

* Revert test changes

* Bump

* schedulers

* tmp

* Bump timex

* ignore libcluster warning

* fixup

* fix typo

* Set shell: bash
2025-12-15 13:28:04 +00:00
Artur Pata f07dc8dd49
Display segment filters to anyone that can see the dashboard being filtered by the segment (#5935)
* Remove segment filters secrecy

* Update changelog

* Update CHANGELOG.md

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

---------

Co-authored-by: Adam Rutkowski <hq@mtod.org>
2025-12-15 10:21:29 +00:00
Adam Rutkowski 38381195f8
Reapply+bugfix: goals with custom props (#5936) (#5944)
* Reapply "Goals with custom props (Stats API queries, funnels) (#5936)" (#5943)

This reverts commit 45116bda7b.

* Gracefully handle `nil` for existing goal.custom_props

* Revert "Gracefully handle `nil` for existing goal.custom_props"

This reverts commit 8e38748775.

* Migration: make `goals.custom_props` non-null

* Adjust test
2025-12-11 13:09:34 +00:00
Adam Rutkowski c78ddf6ba4
Update migration that failed to run (#5946)
* Update migration that failed to run

* !fixup
2025-12-11 12:49:36 +00:00
Adam Rutkowski 40f0d4bfbf
Migration: make `goals.custom_props` non-null (#5945) 2025-12-11 12:22:36 +00:00
Artur Pata e4b282a610
Fix broken v1 filters redirect (#5941) 2025-12-11 11:51:38 +00:00
Adam Rutkowski 45116bda7b
Revert "Goals with custom props (Stats API queries, funnels) (#5936)" (#5943)
This reverts commit b6b9c2c0bf.
2025-12-11 09:17:33 +00:00
Adam Rutkowski b6b9c2c0bf
Goals with custom props (Stats API queries, funnels) (#5936)
* Migration: add custom propos to goals + revisit unique constraints

* Update constraints in goal schema (and move module)

* Add a comment, not really related but useful?

* Implement querying for goals with custom props

* Optimize goal_join_data (down to one iteration) + include goal custom props

* Test goal custom propos addition + new constraints

* Test querying for goals with custom propos attached

* Test funnels made of goals with custom props

* Format

* Fixup test name

* Fixup migration

* Unified goal join macro

* Remove dupe test

* Clean up user_id usage

* Fixup test to match the description

* Revert "Temporary: make room for pre/post migration constraint names (#5942)"

This reverts commit e4bc6b8715.

---------

Co-authored-by: Uku Taht <uku.taht@gmail.com>
2025-12-11 08:39:46 +00:00
Adam Rutkowski b299aa352a
Migration: goal custom props + revamped unique constraints (#5940)
* Migration: add custom propos to goals + revisit unique constraints

* Fixup migration
2025-12-11 08:26:44 +00:00
Adam Rutkowski e4bc6b8715
Temporary: make room for pre/post migration constraint names (#5942) 2025-12-11 07:56:37 +00:00
Adrian Gruntkowski ee906f4033
Improvements to LV dashboard scaffolding (#5937)
* Remove redundant data-tile attribute

* Remove unused component

* Set  always to ignore for optimistic loading

* Use `patch` instead of `href` in `dashboard_link`

* Replace "widgets" with first-class hooks

* Fix `useEffect` React dependency
2025-12-10 12:18:29 +00:00
Artur Pata c4ea07d8bc
Fix /change-domain page permissions (#5939)
* Add test case

* Fix change domain permissions

* Update changelog

* Add more comprehensive tests for other roles
2025-12-10 09:44:23 +00:00
RobertJoonas d6673fbbd5
DashboardQueryParser & DashboardQuerySerializer (#5938)
* rename query_parser_test to api_query_parser_test

* allow metrics to be nil in ParsedQueryParams

* swap now with relative_date in ParsedQueryParams

* add DashboardQueryParser

* stop defining defaults in ParsedQueryParams

* add DashboardQuerySerializer

* make sure parse -> serialize is a reversible transformation

* fix codespell

* fix test and silence credo

* fix another test

* parse and serialize with_imported

* cleaner decode_filters

* precompile do_not_url_encode_map and simplify uri_encode_permissive

* remove prepending ? logic
2025-12-09 13:07:36 +00:00
Adam Rutkowski d9456d7308
Give voice to humans against robotic oppression (#5934)
* Give voice to humans against robotic oppression

* Add claude folder to gitignore

---------

Co-authored-by: Uku Taht <uku.taht@gmail.com>
2025-12-08 16:40:42 +00:00
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
Artur Pata 1ff2b52cbb
Add :segment_id field to shared_links schema (#5924)
* Add :limited_to_segment_id field to shared_links schema

* Refactor column name, add FK, index, and on delete cascade

* Format
2025-12-04 10:50:07 +00:00
Sanne de Vries 98e0f7276b
Bring autoconfigure notification a step forwards in custom events cre… (#5912)
* Bring autoconfigure notification a step forwards in custom events creation flow

- Rather than showing a notification that custom events have been detected at the bottom of the form, we now show a modal prior to the form, that allows the user to add them instantly or set them up manually.

* Added tests for autoconfigure modal

* Clean it up a little

---------

Co-authored-by: Adam Rutkowski <hq@mtod.org>
2025-12-03 16:24:43 +00:00
RobertJoonas 12d818af8a
Refactoring preparation for DashboardQueryParser (#5929)
* rename QueryParser to ApiQueryParser

* move utc_time_range construction to querybuilder

* input_date_range format

* rename 30m atom to realtime_30m

* move build_comparison_date_range into do_build
2025-12-03 15:09:17 +00:00
Adrian Gruntkowski 98632aee74
Don't multiply average revenue metric by sampling rate in the query (#5931)
* Don't multiply average revenue metric by sampling rate in the query

* Fix formatting
2025-12-03 14:49:11 +00:00
Adam Rutkowski fa09b73ff1
Fix postgrex disconnection during async tests (#5926) 2025-12-02 12:29:10 +00:00
dependabot[bot] 85d9e59bf3
Bump actions/checkout from 5 to 6 (#5903)
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-02 12:19:59 +00:00
Adam Rutkowski b1f21a2736
Upgrade dependencies (#5922)
* Bump deps

* Update mjml

* Update credo

* Update dialyzer

* Minor updates:

cloak cloak_ecto ex_money fun_with_flags_ui
heroicons joken locus mox
phoenix_ecto phoenix_live_reload
sweet_xml zstream

* Format
2025-12-02 11:05:32 +00:00
RobertJoonas 5b69061885
Consolidated views <> revenue goals: add comment + fix typespec (#5921)
* add comment + fix typespec

* Update lib/plausible/goals/goals.ex

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

---------

Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
2025-12-01 13:17:13 +00:00
Adam Rutkowski b64a2355a0
Platform upgrade: elixir 1.19.4 and otp 27.3.4.6 (#5920)
* Platform upgrade: elixir 1.19.4 and otp 27.3.4.6

* !fixup

* credo

* credo

* Bump cache

* fix docker image tag

* hum

* hum

* Match docker images

* Define ALPINE_VERSION once

* fixup
2025-12-01 12:50:49 +00:00
Adam Rutkowski 8a7d681c43
CRM: allow searching sites by `domain_changed_from` (#5918) 2025-12-01 08:37:41 +00:00
Uku Taht 3c9ba41cb6
Use prima modal in ip_rules settings (#5910)
* Use prima modal in ip_rules settings

* Remove unused alias

* Do not render portal in test environment - fixes tests

* Simplify invitation modal tests

* Bump CI cache version to rebuild with prima 0.2.1

The CI was using cached dependencies with prima 0.1.9, which doesn't
support the portal parameter needed for tests. Bumping the cache
version forces a rebuild with the correct prima 0.2.1 from mix.lock.

* CI debugging

* Use correct mix env

* Resolve mix.env() at compile-time
2025-11-27 13:22:05 +00:00
Adam Rutkowski 111a8b9462
Enforce max limit for goals per site (#5917)
* Limit preloading goals

* Enforce max limit for goals per site

* typo

* credo

* Remove logger call

* Integrate #5916

* Add a test

* Add test

* Unignore opts
2025-11-27 10:19:13 +00:00
Sanne de Vries 8082b695d5
Remove background color from demo CTA (#5911) 2025-11-26 13:16:56 +00:00
Adam Rutkowski 0eea55d1c1
Slurp common test modules into exunit templates (#5909)
* Slurp common test stuff into exunit templates

* !fixup

* !fixup

* !fixup

* !fixup
2025-11-24 13:30:06 +00:00
Adam Rutkowski 5fe2be8dc8
Remove :consolidated_view feature flag (#5908) 2025-11-24 11:42:15 +00:00
Sanne de Vries 2c00acc89b
Update goal settings design (#5886)
* Update goal settings design

- Replace the `Add goal` button in goal settings with a dropdown button to directly select the goal type. This way, a modal opens with the correct form for the selected goal type. The tabs in the modal have been removed.
- Add a new `pill` component to show the goal type in the table in a more distinct way. The `settings_badge` component is replaced with the `pill` component. The `pill` component that was used in `plan_box.ex` is renamed to `highlight_pill`.
- Replaced `Belongs to funnel` text with a funnel icon in the goal settings list.
- Some small tweaks like increasing the search bar width, the padding of the table cells, and adding a header to the goal settings list.

* Update tests to use the new dropdown component instead of tabs

* Replace custom `pending invitation` pill with new pill component

* Temporary: bump prima to exercise prima dropdown LV re-render fix

* Temporary: Bump prima again

* Revert "Temporary: Bump prima again"

This reverts commit 024b34a6e9.

* Revert "Temporary: bump prima to exercise prima dropdown LV re-render fix"

This reverts commit a6eabb73d0.

* Update prima

* Replace `Add goal` button with dropdown button in goal settings empty state

* Update test to check both empty and non-empty states of the add goal dropdown

* Remove pb-14 from feature gate

---------

Co-authored-by: Adam Rutkowski <hq@mtod.org>
2025-11-24 11:30:55 +00:00
Adam Rutkowski f2bc96debe
Consolidated view CTA variant for insufficient custom plans (#5907)
* Consolidated view CTA variant for insufficient custom plans

* Remove unused binding
2025-11-24 11:22:56 +00:00
Adam Rutkowski 26e5c41ef7
CRM: enable team search by identifier via `team:{UUID}` (#5904) 2025-11-24 10:21:02 +00:00
RobertJoonas 7a11f5ec40
Refactor building the Query struct (#5893)
* rename Query.build -> Query.parse_and_build

* rename two test files and move 4 %Query{} building functions into subfolder

* rename StatsAPIFilterParser to LegacyStatsAPIFilterParser

* rename Filters.QueryParser to QueryParser

* turn QueryParserTest into QueryParseAndBuildTest

* move query_parser.ex out of filters directory

* separate build from parse

* disable sample_threshold in the new intermediate build function, for now

* remove now redundant test util functions

* remove unused import

* address todo from earlier

* credo

* Make module names in sync with paths in tests

---------

Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
2025-11-24 09:16:05 +00:00
Adam Rutkowski 6d5951fffd
Consolidated Views: flip CTA flow, ask to upgrade first (#5905)
* Consolidated Views: flip CTA flow, ask to upgrade first

Avoiding accidental dark pattern here: we'll first ask the
user to upgrade, instead of letting them create a team
they might not need, uninformed.

* Test

* !fixup
2025-11-24 08:43:31 +00:00
Sanne de Vries b8d64e2eff
Updated empty states across settings (#5874)
* Updated empty states across settings

* Fix funnels and props functionality not hiding when toggled off

- Add show_content? attribute to generic tile component
- Ensure content is hidden when toggled off
- Avoid rendering border and empty space when toggled off
- Fix formatting

* Update personal sites empty state

* Make `tile` component lv-embeddable (#5891)

* Use new tile component for funnels, goals, imports and custom properties

- Update the settings live views to use the new tile component
- Ensure tile component is updated when feature visibility is toggled
- Extract `no_search_results` and `empty_state` components for better readability
- Extract `highlighted` component
- Update tests

* Add empty states for team sites and simplify empty state logic

- Hide top bar on `/sites` when empty state is shown
- Extract empty state logic to a separate function
- Show the same empty state for both personal and team sites, with different copy
- extract search logic to a separate function
- add tests for various empty states cases

* Clean up:
  - remove HTTP feature visibility routes now that
    we're doing it 100% via LV
  - add tests for feature toggling
  - move "site_role" to where it's used (upgrade CTA),
    since there were already some feature-related function calls
    there
  - fix random test failures left

* Fixup

---------

Co-authored-by: Adam Rutkowski <hq@mtod.org>
2025-11-24 07:50:14 +00:00
Sanne de Vries 25d40155e9
Fix Safari bug where `+ Add another step` button wasn't hidden properly (#5897)
* Fix Safari bug where `+ Add another step` button wasn't hidden properly

* Increase spacing between add step button and conversion rate when both are shown
2025-11-20 16:18:15 +00:00
Sanne de Vries a9050abdb4
Add hover state for location bars (#5896)
- As part of https://github.com/plausible/analytics/pull/5890, hover states were added to all bars on the dashboard, but the countries/regions/cities bars were missed.
2025-11-20 14:24:29 +00:00
Sanne de Vries a29f0a30ba
Fix login link being invisible on hover in dark mode (#5898) 2025-11-20 14:15:24 +00:00
Sanne de Vries 1df08a25b4
Change header dropdown copy to sentence case (#5887) 2025-11-18 13:31:15 +00:00
Sanne de Vries dec382ccd5
Make various UI improvements (#5890)
- Fix invite modal z-index issues
- Improve invite modal design
- Add hover state to stats bars on dashboard
- Improve feature gate design
- Improve trial upgrade CTA design
2025-11-18 13:28:09 +00:00