* Clean up number formatting util
- Deduplicate number_format util
- Add tests for number_format util
- Add number formatting to visitor change percentage in site overview
* Move number_format to TextHelpers
- Move number_format to a more generic place in TextHelpers
- Revert the places where we use unlimited to use the inline util
* Remove `SSO_ENABLED` env flag and replace it with `ee?` checks where needed
* Fix name of a test module to avoid clash
* Remove unnecessary `ee?()` check from condition in `extra/` code
* Make visual tweaks to the dashboard
- Reduce shadow and increased border radius on cards, to be consistent with the rest of the app
- Reduce logo size
- Align horizontal and vertical spacing between cards
- Reduce line width of the main graph
- Fix horizontal alignment on tables
- Reduce border radius on sites overview for consistency with dashboard
- Add transition to hover effect on sites overview cards
* Remove negative margin from logo to ensure vertical centering
- The negative margin on the logo caused misalignment with the rest of the header
* Maybe load installation type from DB
* Swap get_or_create... with get_tracker_script_configuration
* Fix getting saved_installation_type
* Add utility to htmlize quotes
* Update manual snippet not found error text
* Prevent custom URL input if scriptv2 not true
* Test verification v2 flows
* Fix import for CE test
* 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>
* Add logic to find Plausible script tag
* Clarify where cookies fixtures come from
* Add case for snippet not found
* Fix issue with installation type not propagating to diagnostics
* Better struct definition
* Refactor verification tests to be more comprehensive
* Fix compile error related to Test.Support.DNS
* Fix DNS imports for CE
* Refactor when tracker is in HTML is detected
* Replace usages of `Timex.to_unix` with native API
* Wrap call to `Timex.is_valid_timezone?`
* Wrap calls to `Timex.today(tz)`
* Replace `Timex.today()` with `Date.utc_today()`
* Replace `Timex.now()` with `DateTime.utc_now()`
* Replace `Timex.compare` with `Date.compare`
* Wrap `Timex.diff` calls
* Replace `Timex.Timezone.convert` with `DateTime.shift_zone!`
* Wrap `Timex.parse!`
* Replace `Timex.to_date` with native API calls
* Replace `Timex.beginning|end_of...` with native API calls for Date
* Wrap `Timex.beginning|end_of...` for DateTimes and Dates for years
* Replace `Timex.format(!)` with native API calls
* Replace `Timex.to_naive_datetime` with native API calls
* Wrap time humanizing routines using Timex
* Remove unnecessary `use Timex` instances
* Replace `Timex.shift` with native API calls
* Make `QueryParser.parse_date` handle gaps and ambiguities gracefully
* Replace `Timex.now(tz)` with `DateTime.now!(tz)`
* Use a more suitable Date function for comparison (h/t @aerosol)
* 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
* Show Plausible not detected errors with installation type specific recommendations
* Update diagnostics and diagnostics tests for verification
* Format
* Stop calling statuses between 200..299 as errors
* Remove function that populates diagnostics randomly
* fix seeds.exs for CE
* unified FF function
* remove gtm tab on ce
* CE change domain flow: remove detection logic
* CE installationv2 (review & provisioning flows) + tests
* change domain tests
* fix tests
* FF for user too
* small improvements (review comments)
* keep the CE and EE versions of the same function together
* Implement a very crude HTTP relay to persistor service
* Temporarily disable local session and event persistence
* Temporarily disable Promex in dev
* Setup dedicated Finch pool for persistor
* Temporarily adjust load script parameters
* Fiddle with pool opts
* Only log errors
* Bump rate
* Put persistor configuration in runtime config
* Move persistor client code to a separate module
* Move event and session persistence behind a switchable adapter
* Add scaffolding of relaying persistor
* Instrument relayed persistence
* Adjust persistor API to accept full ingest event
* Fix persistor URL in config defaults
* Switch local dev env of embedded_with_relay backend
* Revert "Temporarily disable Promex in dev"
This reverts commit d9c9e9075d130cc5177a2a7559b98a2026077327.
* Lower default `PERSISTOR_COUNT`
* Refactor payload encoding and decoding slightly
* Test and slightly improve persistor logic
* Accept cookies (WIP)
* Make resolving Plausible function call a priority
* Update tracker script version
* Remove cookieBannerLikely, replace with debug-only cookiesConsentResult
* Use compact rules
* Make verifier tests less flaky
* Add fixtures for accepting cookies
* Limit CMPs
* Fix dep position
* 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>
* Make "last N months" return date ranges consistent with "last N days"
* Make goal suggestions not rely on predefined period
* Use native `Date` API for calculating beginning and end of months
* Explicitly declare color scheme availability and preference
* Revert "Explicitly declare color scheme availability and preference"
This reverts commit e1e6242d29.
* Add `color-scheme: auto;` to generated iframe embed code
This is supposed to be taken care of
by d05731194e
but not quite it seems.
The first test with a fairly involved exunit template
(ConnCase) is usually 700ms vs 60ms whichever comes second.
(48-core Threadripper, but similar results on macs AFAIU).
This makes --trace / --slowest flags produce misleading results.
h/t @zoldar