* 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
* 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
* Introduce `force_2fa` team policy and add API for toggling it
* Implement 2FA enforcement
* Make team policy available to CE too
* Improve copy (h/t @metmarkosaric)
* Send email to all team members when enforcing 2FA is enabled
* Only owners can enable and disable enforcing 2FA
* Don't send email to the user who enabled enforcing 2FA
* Add team selection screen to 2FA enforce exceptions
* Fix email URL
* Add tests
* Hide the Force 2FA section for non-owners completely
* Improve e-mail formatting
* Point at 2FA docs page for now
* Add changelog entry
* Reverse the exception to make dialyzer happy
* Fix a typo
Co-authored-by: Uku Taht <Uku.taht@gmail.com>
* Fix typespec 🤡 (h/t @ukutaht)
* Deliver force 2FA email notifications asynchronously
* Fix a typo in AlpineJS variable name (h/t @ukutaht)
* Put parameter in path helper instead of concatenating it as a string
* Improve and test audit logging of toggling 2FA enforcement
* Introduce 3 second delay before redirect
* Test audit logging only on EE
---------
Co-authored-by: Uku Taht <Uku.taht@gmail.com>
- Added dark mode change to CHANGELOG.md
- Fixed broken `WithImportedSwitch` icon focus outline
- Updated comments in `app.css` referencing old color scheme
* FULL join for time:hour as well as time:minute
Follow-up to https://github.com/plausible/analytics/pull/5694/files#r2321567271
A session might be active over multiple hours, but not (currently)
reported as such when requesting only specific metrics per hour.
This fixes that problem.
* Handle full join logic correctly
---------
Co-authored-by: Uku Taht <Uku.taht@gmail.com>
* Refactor table_decider#partition_metrics
* Refactor query pipeline to return a list of subqueries after splitting
* Move order_by out of join logic
* Refactor joining logic in query_builder
1. JOIN type is now set in QueryOptimizer
2. JOIN logic is now table and list-size agnostic
* Comment an edge case
* Rebuild session/visit smearing
Previously, whenever graphing any visit metric hourly/realtime, visit_duration and other
visit metrics would be way higher than expected, due to long sessions
dragging each bucket up and up. Now visits/visitors metrics are still
smeared and other visit metrics are counted under last bucket user was
active in.
visits metric was also overcounted (see new tests).
* Remove unneeded case
* Unit test for smearing in tabledecider
* Revert "Revert "Trim `month`, `year`, `day` periods to local now on main graph (#5668)" (#5684)"
This reverts commit 2d11681f25.
* Does not trim for comparisons
* Include the current hour in the trimmed time range
* Add custom props to full export
* Pass full `site` struct to `export_queries`
* Export only internal props if plan lacks custom props
* Add changelog entry
* Add spot check test for custom props
* Do not generate cartesian product of prop/value pairs 🤦
* Trim `month`, `year`, `day` periods to now on main graph
* Revert "Trim `month`, `year`, `day` periods to now on main graph"
This reverts commit 4f3930111d3a2737a51686e067d9b64f0d85ad58.
* Re-implement trimming in query optimizer instead
* Update JS types
* This is getting confusing
* Trim in stats_controller
* Set `query.now` based on query_praser and date results
* query.period -> query.input_date_range
* Changelog
* Test for response query.date_range
---------
Co-authored-by: Karl-Aksel Puulmann <oxymaccy@gmail.com>
* Sync pathname to event.props.path for special path-based goals
* Stop adding event.props.path for 'Form: Submission' events
* Update tracker script version
* Fix test expectations
* Fix format
* Simplify maybe_put_props_path with 'with'
* Add specs, fix factory
* Update tracker changelog
* Update EE/CE changelog
* Remove business logic from factory
* Refactor event.props.path sync result to be validated with the rest of the custom props
* Clarify doctests and update function name
* Migrate some
* Making progress
* All fixed
* Convert interval picker to tsx
* Fix format
* Fix tests
* Make sure focus outline looks right on DropdownTabButton
* Refactor Site Switcher to Popover
* Fix site switcher test
* Better jsdom mocks in assets tests
* Try svg placeholder favicon
* Update favicon test
* Try giving transition config directly
* Remove empty props
* Remove unnecessary closeDropdown to prevent Firefox transition issue
* Register open dropmenus globally
This is needed to prevent invalid state when navigating with site hotkeys with Firefox while a dropdown is open and coming back using browser
* Colocate popover-specific component
* Clarify behaviour on hitting hotkey for current site
* Try fix Firefox issue
* Try 1.7.19
* Commit to @headlessui/react v1.7.x
* Fix last two transition origins
* Align active tab on baseline
* Remove unneeded global dropmenu state
* Add changelog
* Funnels menu is searchable and scrollable
* Fix transform origin
* Stop funnels menu from holding onto search state
* Mandate ref be passed to SearchInput from the outside
* Avoid compiling pageleave variant
Instead, it's treated as a no-op. Tracker still serves it.
Compile wall time went down from 86s -> 46s.
* Vendor, no longer compile p.js
This was a legacy script variant which we keep for backwards
compatibility but little else.
* chore: Bump tracker_script_version to 6
* Update User schema with a field required by teams migration
* Start cloak vault for self-hosted release migrations.
Since this one is using schemas, existing encrypted columns
do require cloak to be up.
* Update changelog
* Make trial notification ee-only
* Replace `Plausible.ee?/0` with `ee?/0` across the codebase
* Bump release date
* 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
* APIv2: More tolerant shorthands for date ranges
I was using APIv2 today and got pissed off that I couldn't do
`"date_range": "3d"`. So I went ahead and fixed this issue...
* Changelog
* typegen
* fix
* More invalid tests
* Set site and member limits to unlimited for CE
* Don't even compile billing tests that trigger warnings in `ce_test`
* Split layout test into 2 distinct tests for CE and EE due to limits
* Update CHANGELOG.md
* Remove redundant test tag
* 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
* Remove editor->admin mapping from Site Settings > People
* Restrict editor role and allow admin to update site role
* Disable actions in Site Settings > People for roles other than admin and owner
* Fix test
* Update labeling of guest members in CRM for clarity
* Update phrasing in other spots of UI
* Update CHANGELONG.md
* Revise team related banners displayed under Site Settings > People
* Fix permissions check for role update
* change 7d and 30d periods in API v2
* change 7d and 30d periods in legacy API
* add 28d and 90d into the dashboard
* add tests
* add 28d and 90d to public API v2
* changelog
* npm run generate-types
* typo
* fix NPM test
* fix interval_test
* add P shortcut for last month
* hide last 30d from datepicker but keep keybind functional
* fix keybind hints
* Timex to Date + helpful comment
* prettier format
* adjust comment
* mention 30d -> 28d in changelog as well
* make period hidden param new default
* fix typo to stop logging error in test output
* add time:minute interval to internal api schema
* always get visitors and visits from sessions table when time:minute dimension used
* query-api generate types
* changelog update
* WIP
* tracker_script_version over reportedVersion
Will make it easier to grep for this thing
* CHANGELOG.md
* Only add tracker/package.json in workflow commit
* chore: Bump tracker_script_version to 1
* Show tracker_script_version is reported in tracker tests
* Track `engagement_time` while accounting for time page is blurred (#5206)
Consider this scenario:
1. User opens page /blog
2. 3 seconds later, alt-tabs to another window
3. minute later, alt-tabs to the page and closes it
Previously, this would be reported as 1m03s engagement_time. Now this
would be reported as 3s engagement_time.
* remove redundant engagement cooldown (#5199)
---------
Co-authored-by: RobertJoonas <56999674+RobertJoonas@users.noreply.github.com>
* 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