* 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
* Autoselect propkey on opening properties breakdown
* reset propkey when query changes
* ignore custom prop filter when selecting a prop key
* throttle api requests
* Force loading state on combobox when loading propkey
* Remove artificial throttling of API requests
* Disable combobox when no prop keys are found
* drop prop_key and set loading true when query changes
* Update changelog
---------
Co-authored-by: Robert Joonas <robertjoonas16@gmail.com>
Co-authored-by: RobertJoonas <56999674+RobertJoonas@users.noreply.github.com>
* Add popular browser icons
* Adjust fallback icon color for dark mode
* Add changelog
* Add MIUI browser logo
* Fix Edge and MacOS in seeds
* Add smaller browser logos
* Revert "Revert "Multiple filters on the frontend (#4174)" (#4218)"
This reverts commit 2f7dcae991.
* Make city links work again
By enforcing everything sent to the BE is stringified. We do this at serialization-time to ensure old dashboard links still work
* Add new logic for query parsing
Note this is not yet final, but this scaffolding will soon be used
* Send filters to BE in new encoding, flag add more button
* query.property -> query.dimensions
* Reduce number of operations for filtering
This helps ensure we can be consistent/simple with apiv2
* Update search console filter mapping
* Update filters sent from frontend
* Update new filter parsing
* Remove redundant clause
* Make filtering by event:goal work
* Handle * as old backend did - prefix/suffix by **, if not using wildcards already
* Update imports logic
* Credo warning
* Spacing for add row button in filter modals
* query fix
* LegacyDashboardFilterParser
* only single hostname filter allowed
---------
Co-authored-by: Uku Taht <uku.taht@gmail.com>
* Revert "revert filters.js from 14cf650 (#4208)"
This reverts commit 4edeed33ca.
* fix bug with wrong var name
* Do not cancel api requests on the first dashboard render
* Remove dead code (ComparisonContext)
The state of ComparisonContext is never read. We are storing all the
necessary state either in localStorage or in the `query` object.
* turn Filters into a fn comp
* turn Dashboard and CurrentVisitors into fn components
* turn Realtime into a fn comp
* Turn QueryLink into a fn comp
Also fix the "staticContext" console error when opening the period picker.
We don't need to pass all props into the Link component.
* extract a WRAPSTATE object
* prioritize other skip_imported_reasons over not requested
* return with_imported_switch info from top stats
* fix the with-imported-switch component
* Refactor ImportedQueryUnsupportedWarning
* do not render warning bubble when imported data not requested
* stop displaying warning bubble before the API response is received
* fix tab switch pills jumping due to bubble height
* drop loading condition of ImportedQueryUnsupportedWarning for Funnels
* add explicit check for realtime when rendering the bubble
* remove unused JS imports
* rename snake_case to camelCase
* Fix parsing = in jsonurl
This works around a bug in the jsonurl library where the literal causes a syntaxerror.
The urlencoded = however is handled without errors
* Changelog
* move imported.ex to imported subfolder
* move constructing base imported query into a separate module
* Implement imported table deciding and filtering
+ tests for pages, entry_pages, exit_pages and common filter types
* add top stats test with country filter
* add timeseries test
* Drop bounce_rate and time_on_page from imported & page-filtered Top Stats
* rename field returned by top stats
* turn pages into a fn comp
* Move dashboard API results under a results key
...and also return the skip_imported_reason to the frontend to be used
for displaying warnings.
* extend ListReport component with an optional afterFetchData prop
* turn Devices into a fn comp
* add not_requested as a skip_imported_reason
* display warning icons in the dashboard
* Implement filtering suggestions and translate filter fields for imported
* WIP
* Improve and cover filtering suggestions with tests
* Rename imported suggestions query helpers
* fix screen size breakdown with screen size filter
* support filtering by the same suggestion property
* support location filters when fetching location suggestions
* support filtering by multiple props from the same table
* Implement filtering by goals
* Make views per visit metric work for import entry and exit pages
* Get rid of circular dependencies between Stats.Imported and Stats.Imported.Base
* Clean up Query struct manipulation in Breakdown
* Rename helper function for clarity
* Automatically refresh query struct state after modifications
* Shutup credo
* display imported warning bubble in prop breakdown section
* Render warning bubble for funnels whenever imported data is in the view
* Transform any operator on respective goal filters
* Fix percentage and conversion_rate calculation in presence of custom props
* add tests for for combining page and pageview goal filters
* add skip_refresh option to query tweaking functions
* add imported CR support for timeseries
* still show url breakdown when special goal + url in filter
* rename Query.refresh
* use flat_map instead of map and concat
* fix darkmode color
* Handle invalid imported region codes in suggestions gracefully
* Add an entry to CHANGELOG.md
---------
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
* Make React frontend capable of reading API results under a results key
* remove redundant double negation
* Update assets/js/dashboard/stats/modals/props.js
add length key back
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
---------
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
* Start refactoring, supporting jsonurl
* WIP: Listing of applied filters works
* WIP: Remove some unneeded hackery
* WIP: Handle country labels better
* WIP: Handle multiple filters better
* WIP: Serializing filters for API queries
* Split modal code into 3
* Merge code paths for prop and other filter modals
* Get suggestions working again
* Display prop filters properly
* Handle re-opening a props modal properly
* Better label handling
* Better linking to filter modals
* Remove unneeded component
* Standardize how we update query more
* Use updatedQuery to remove more usecases of URLSearchParams
* Dont export toFilterQuery
* Custom toString for PlausibleSearchParams
* Fix props suggestions/filtering
* Refactor isFilteringOnFixedValue
* Improved encoding - goals now work again
* fix a typo
* Handle more cases where query.filters[ is used
* Fix locations tab changing behavior
* Fix for `setQuery` not to double up ?
* Handle goal filters properly now
* Delete dead code
* Update special goals handling
* Update <ListReport /> linking
* Show labeled values in list of filters
* Updae Props component handling of storage keys
* re-add special case handling in devices view
* Fix modal-related typo
* Get updatedQuery callsites working
* Update location modals linking
* Update props details model linking logic
* Switch back tab from props when removing goal filter
* Remove query.filters usage from within <Referrers /> component
* Private escapeFilterValue
* Fix sources/index.js
* Legacy redirect logic
* Update comment
* Disabled options in props modal
* Update escaping and is_not operator
* Restore `false` search property handling meaning unset
* changelog
* Fix filtering after clicking on a map
* FilterOperatorSelector
* replaceFilterByPrefix
* Improve naming for filter modals/groups
* Apply filters in search console request
* Remove dead code from search console modal
* Remove unimportant information from keyword modal
* Show invalid filters from search console
* Fix tests
* Add/Fix tests
* Fix typo
* Remove unused variable
* Fix typo
* Changelog entry
* Fix Credo
* Display impressions, CTR and position in keyword modal
* Undo change that should not have been committed
* Fix test
* Fix test
* filters -> search_console_filters
* make sure valid intervals consider custom range
* make default intervals per period more logical
* remove unused function
* adjust defaults for custom range
* Give a more semantic name to a function
* Make the LineGraph component thinner
* Move LineGraph into a separate file
* Move interval logic into interval-picker.js
This commit also fixes a bug where the interval name displayed inside
the picker component flickers the default interval when the graph is
loading.
The problem was that we were counting on graphData for returning us the
current interval: `let currentInterval = graphData?.interval`
We should always know the default interval before making the main-graph
request. Sending graphData to IntervalPicker component does not make
sense anyway.
* extract data fetching functions out of VisitorGraph component
* Return graph_metric key from Top Stats API
This commit introduces no behavioral changes - only starts returning an
additional field, allowing us to avoid the following logic in React:
1. Finding the metric names, given a stat display name. E.g.
`Unique visitors (last 30 min) -> visitors`
2. Checking if a metric is graphable or not
* Move metric state into localStorage
This commit gets rid of the internal `metric` state in the VisitorGraph
component and starts using localStorage for that instead.
This commit also chains the main-graph request into the top-stats request
callback - meaning that we'll always fetch new graph data after top stats
are updated. And we do it all in a single function.
Doing so simplifies the loading state significantly, and also helps to
make it clear, that at all times, existing top stats are required before
we can fetch the graph. That's because the metric is determined by which
Top stats are returned (for example, we can't be sure whether revenue
metrics will be returned or not).
* Make sure graph tooltip says "Converted Visitors"
* Extract a StatsExport function component
Again, instead of relying on `graphData?.interval` we can read it from
localStorage, or default to the largest interval available. The export
should not be dependant on the graph.
* Extract SamplingNotice function component
* Extract WithImportedSwitch function component
* Stop "lazy-loading" the graph and top stats
Since the container is always on top on the page, it will be visible on
the first render in any case - no matter the screen size.
* Turn VisitorGraph into a function component
* Display empty container until everything has loaded
* Do not display loading spinner on realtime ticks
* Turn Top Stats into a fn component
* fetch top stats and graph async
* Make sure revenue metrics can remain on the graph
* Add an extra check to canMetricBeGraphed
* fix typo
* remove redundant double negation
* CH Migration: exit/entry hostnames in sessions_v2
* Leave only exit_page_hostname, we already record hostnames
* Use ClickHouse DDL in favour of ecto so that cluster is included
* Compress with ZSTD(3)
* Expose Hostname filter in the dashboard dropdown
* Add `exit_page_hostname` to ClickHouse `sessions_v2` schema
* Start tracking hostname changes in sessions
* Implement hostname filter suggestions
* Enable filtering by `event:hostname`
* Add tests for filtering by hostnames
* Ensure filter suggestions work for exit pages too
* Allow overriding hostnames with `send_pageview` mix task
* Remove `:window_time_on_page` flag
It seems that we can remove it after all?
* Initialize `experimental_hostname_filter` query parameter
* Rewrite cache store behaviour with regards to session hostnames
* Work around inconsistent session merging
So that `populate_stats` can get closer to actual ingestion
* Improve top stats test
* Make it possible to filter sessions by entry/exit hostnames
* Update pages tests
* Expose `experimental_hostname_filtering` temporarily in the UI
* Untested yet: also apply experimental filtering to sources
* Introduce `hostname_filter` feature flag
* Format
* Test top sources with hostname filter + experimental flag
* Check import presence across all imports and not just the first one
Also, simplify imported data toggle rendering to not explicitly
refer to the earliest import source.
* Change imported stats toggle icon in dashboard
* Test `Imported.get_imports_date_range/1`
* Simplify failed UA/GA import email copy
* Add validation for the events metric in main_graph
* Test the already existing events metric support in main-graph
* Put total conversions on the graph
* extract main_graph_csv function (refactor only)
* add total_conversions and conversion_rate to goal-filtered visitors.csv
* update changelog