* Extract session management from AuthController
* Don't explicitly pass `current_user_id` to `live_render`'s session
* Add ability to retrieve session and user from token via `UserAuth`
* Always fetch current user (or just id) via `UserAuth` API
* Introduce `UserSession` as an embedded schema for now
* Make `UserAuth.get_user/1` accept `UserSession` as an input
* Introduce LV auth context populating user data from session on mount
* Refactor `AuthPlug` and make it populate `current_user_session` as well
* Rely on authenticated user data provided by auth plug or LV context
* Make `Sites.get_for_user(!)` accept `User` struct as well
* Set `logged_in` cookie explicitly when it's out of sync with session
* Expand modules documentation a bit
* Improve and extend tests slightly
* add the ability to pass date param into Query.build
* stop returning interval from main_graph controller action
* globally rename 'date' interval to 'day'
* Allow parsing query date range from a 'period' param
The 'period' param will not be exposed in the public API, but makes it
possible to construct a "realtime" query.
* Revert "Allow parsing query date range from a 'period' param"
This reverts commit c5630eaef9.
* call beginning_of_time for first_datetime instead of last
* allow 'realtime' and '30m' date_range shortcuts
* evaluate date_range to 'realtime' or '30m' instead of Date.range(today, today)
* Revert "evaluate date_range to 'realtime' or '30m' instead of Date.range(today, today)"
This reverts commit a887569ec5.
* Revert "allow 'realtime' and '30m' date_range shortcuts"
This reverts commit 91ae0fa5e6.
* fix graph tooltips
* Order QueryResult in API response
This improves experience in docs when querying interactively
* More utm in seeds
* More improved seeds
* Proper QueryResult.query structure
* Allow docs to query /api/v2/query and sites
The new endpoints use cookie authentication. The docs site uses
these endpoints to provide an interactive docs editor.
* query_result ordering test
* Refresh router
* Test module name
* First pass: unify onboarding UI
* Dark mode fixes
* Format
* Update self-hosted index
* Remove unnecessary child box in Enter Your 2FA screen
* Fixup Enter Your 2FA screen
* 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
* Add typescript, rewrite Countries map
* Add back DB IP geolocation notice
* Silence all current eslint warnings: to be removed gradually
* Reconfigure eslint import plugin for typescript
* Insert formatting pragma by default, but ignore files without pragma in CI
* Add data migration for creating and syncing location_data table and dictionary
* Migration to populate location data
* Daily cron to refresh location dataset if changed
* Add support for visit:country_name, visit:region_name and visit:city_name dimensions
Under the hood this relies on a `location_data` table in clickhouse being regularly synced with
plausible/location repo and dictionary lookups used in ALIAS columns
* Update queue name
* Update documentation
* Explicit structs
* Improve docs further
* Migration comment
* Add queues
* Add error when already loaded
* Test for filtering by new dimensions
* Update deps
* dimension -> select_dimension
* Update a test
* Removes outdated precommit scripts
* Updates eslint, prettier, stylelint and their configurations: turns on plugins that were installed but off
* Fixes stylelint errors
* Applies prettier to css files
* Fixes new eslint errors
* Updates lint script to include both stylelint and eslint
* Add safeguard against flaky auth rate limit tests
* Fix typo in a log message
* Extract and abstract rate limiting from `AuthController`
* Fix flaky rate limit test tag
* Don't leak prefix from auth rate limit
* Use more compact map syntax
* Remove special tag in favor of `eventually` test util function
* Update Goal schema
* Equip ComboBox with the ability of JS selection callbacks
* Update factory so display_name is always present
* Extend Goals context interface
* Update seeds
Also farming unsuspecting BEAM programmers for better
sample page paths :)
* Update ComboBox test
* Unify error message color class with helpers seen elsewhere
* Use goal.display_name where applicable
* Implement LiveView extensions for editing goals
* Sprinkle display name in external stats controller tests
* Format
* Fix goal list mobile view
* Update lib/plausible_web/live/goal_settings/list.ex
Co-authored-by: Artur Pata <artur.pata@gmail.com>
* Update lib/plausible_web/live/goal_settings/form.ex
Co-authored-by: Artur Pata <artur.pata@gmail.com>
* Update the APIs: plugins and external
* Update test so the intent is clearer
* Format
* Update CHANGELOG
* Simplify form tabs tests
* Revert "Format"
This reverts commit c1647b5307.
* Fixup format commit that went too far
* ComboBox: select the input contents on first focus
* Update lib/plausible/goal/schema.ex
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
* Update lib/plausible/goals/goals.ex
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
* Update lib/plausible_web/live/goal_settings/form.ex
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
* Pass form goal instead of just ID
* Make tab component dumber
* Extract separate render functions for edit and create forms
* Update test to account for extracted forms
* Inline goal get query
* Extract revenue goal settings to a component and avoid computing assigns in flight
* Make LV modal preload optional
* Disable preload for goal settings form modal
* Get rid of phash component ID hack
* For another render after render_submit when testing goal updates
* Fix LV preload option
* Enable preload back for goals modal for now
* Make formatter happy
* Implement support for preopening of LV modal
* Preopen goals modal to avoid feedback gap on loading edited goal
* Remove `console.log` call from modal JS
* Clean up display name input IDs
* Make revenue settings functional on first edit again
* Display names: 2nd stage migration
* Update migration with data backfill
---------
Co-authored-by: Artur Pata <artur.pata@gmail.com>
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
* return concatenated browser names and versions directly from the API
* return concatenated os names and versions directly from the API
* add detailed views for all device reports
* extract put_combined_name_with_version function
* return only version under the name key when detailed=true
* update changelog
* add more metrics into detailed views of Devices reports
* split up different devices modals into separate files
* Always show details modal for goal conversions
* Make metrics smaller in breakdown table
So that revenue metrics fit
* So that revenue metrics fit
* Add more space for dimension value in breakdown modal
* Use goals from postgres to build goal filter
* Remove unnecessary goal preloading
* Add contains filter for goals
* Make sure the correct imported tables are used when goals are in filters
* Remove 'contains' filter type for now
* Remove TODO comment
* Fix QueryParser test
* move goals.ex into a goals subfolder
* extract goal filtering logic into a separate module
* remove duplication from Imported.Base
* Extract `get_filter_goals` function
* Credo suggestions
* Credo ignore nesting
* apply suggestion - remove Sql.Util
* apply suggestion - pass imported? via opts
* remove duplicate function
* Uncomment tests
* Fix 500 error with goal suggestions
---------
Co-authored-by: Robert Joonas <robertjoonas16@gmail.com>
* Update `ua_inspector` fork to sanitize multi-part prereleases properly
* Add regression tests
* Make another version bump to include a fix for a missed corner case
* Add ability to lookup by email and site domain in HelpScout integration
* Handle callback with invalid parameters gracefully
* Add routine adjusting iframe height to the content of HS integration
* Add requestStorageAccess routine to support iframe cookies in Safari
* Fill first email pick when on failed user lookup
* Fix a typo in a comment
* track browser_language, theme, and logged_in for 'Filter Menu: Open'
* track props for 'Signup' and 'Signup via invitation'
* do not track theme as 'system' for non-logged-in users
* fix tests