* Highlight rows from sessions which are matched by the filter
* Send start_time of recording to frontend
This helps us calculate offsets a bit better
* Use timestamp by server for date shown
* Load session events via kea logic
* Update rrweb, rrweb-player
* Highlight events user is filtering for in sessions player
* Handle empty case properly
* Add positive test
* Order session recording events in query
* Fix filtering by multiple events with differing names
previously only the first would have been used due to overlapping
params.
* Return all highlighted times as action_filter_times
* Send back ids not timestamps
This avoids weird rounding errors causing issues
* Show skeleton for longer
* update typing
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
* Upload static cohort using CSV, closes #2868
* fix tests
* Fix tests
* Fix e2e test
* Avoid double inserts
* Speed up query
* Move to params
* fix tests
* Use JSON instead of protobuf
* unused import
* produce instead of produce_proto
* Insert directly into clickhouse, no need for kafka
* a few quick fixes
* insert in batch to clickhouse
* test SQLi since we can't really trust what we are inserting
* Extra check for duplicates
Co-authored-by: James Greenhill <fuziontech@gmail.com>
* Remove (apparently) useless person joins from sessions sql
* WIP: Make sessions list query use python iteration
* WIP: Show loader while session data is loading
* Aggregate together sessions
* Calculate start and end points of session separately
* Remove cruft code
* Load session events asynchronously for self-hosted
Note clickhouse behavior is unchanged.
* Update pagination logic for sessions
In addition to offset, postgres now returns a dict containing person_id,
timestamp which is used to make sure we filter events on different pages
correctly
* Add some tests to SessionListBuilder
* Fix typing errors
* Fix pagination limit
* Move tests to right file
* Query less events for sessions list
Since we're ordering by end_time we know events before last end_time are
all processed.
* Add test for current_url behavior
* Make sure old tests remain working
* Remove unused base class
* Move sessions-related queries to separate subfolder
* Extract sessions list code to separate file(s)
* Sort sessions by end time in ch as well
* List end time in sessions table
* Return person email when querying sessions lists on postgres
This gets used by the view
* Return email over all user properties for sessions in clickhouse and view
* Fix an ordering bug
* Fix a pagination bug
* Fix endpoint
* Fix basic sessions tests for pagination
* Sort consistently for sessions list builder
* Roll pagination into filters
* Refactor adding filtering component
* Fix a type error
* Rename events to entries
This makes much more sense since you can select e.g. actions
* Start of the session filter box
* WIP: Sessions filtering
* Make SelectBox more generic
* Make sessions filtering visuals
* Extract operator value selection code
* Make action properties filterable
* Make it possible to filter by cohorts
* Filtering by events
* Make loading sessions possible with the new logic
* Make it possible to filter by actions/events via backend with new code
Note that it's all relying on old 'paths' - will refactor these later.
* Make it possible to filter by user properties
* Update imports
* Small fixes for sessions filter
* Add UserFilter file
* Ignore extra args to Property
* Make it possile to filter by recording duration
* Update how session duration filter works in the backend
* Rename a few columns
* Remove dead mixins
* Remove duplicated logic, put code behind feature flag
* Move sessions filters logic to subfolder
* Don't show properties if feature flag.
* Add saved filters support
This will require some discussion with Paolo - probably want to show
this on the side?
* Add divider before sessions table
* Narrower typing for recordings
* Some frontend for saving filters
* Small rename
* Add SessionsFilter model
* Save filter on backend
* add missing filter
* Extract const
* Make ActionFilterDropdown be able to pick actions again.
* Fix links from person modal to sessions
* Update tests.
* Fix database model
* Use proper deep equal for detecting active filter
* Remove unneeded field
* Only return filters from correct page
* Add missing data-attr
* Add instrumentation
* rename component
* Fix analytics metadata
* separate math aggregates
* add data attr back
* adjust cypress
* make sure tooltip is viewable
* Show total by default
Co-authored-by: Tim Glaser <tim@glsr.nl>
* Make funnel steps sortable
* sortableElement eats the `index` prop, must pass separately
* properly sort all types of filters
* Lock dragging to Y axis
* Sorting UI improvements (#2888)
* use icon for drag handle
* allow sorting only when there's at least two steps
* add instrumentation
Co-authored-by: Michael Matloka <dev@twixes.com>
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
* elements instrumentation, stats & heatmaps
* add events for action & inspect mode
* more events
* fix capture on setExtensionPercentage
* update posthog imports
* add heatmap and action counts
* update heatmap and action counts
* fix few type errors
* track down all data-* attributes when selecting an HTML element in the toolbar
* exchange extensionPercentage for toolbar loaded
* rename event (lost in some rebase)
Co-authored-by: Marius Andra <marius.andra@gmail.com>
* Solve render warning on insights
* Fix a type error in SelectBox
* Solve some other typescript errors with SelectBox
* Make ActionFilterDropdown not depend on passed logics, add typing
* Fix retention, move open conditional into component
* Simplify onClose logics, solve tpescript errors
* Rename value to id for actions
This way we can avoid some remapping
* Fix fragment warning:wq
* Make it possible to filter by actions in the UI
* add close button
* Allow setting property filters for events
* Readd logic as prop
* Only show action filters on cloud
* extract code to format entity filter
* make it possible to filter by action
* Hack to make filtering by actions subfilters possible
Example url:
http://localhost:8000/api/event/sessions?date_from=2020-12-10&date_to=2020-12-10&action_filter={%22type%22:%22events%22,%22id%22:%22test-event%22,%22properties%22:[{%22key%22:%22email%22,%22value%22:%22example.com%22,%22operator%22:%22icontains%22,%22type%22:%22person%22}]}
Not sure if the team filtering is legit here
* Use discriminated union in types
* Add kludge support for action_filter on sessions via url
* Reduce code in buildURL
* Add link to sessions page from persons modal
* Add muted overview of the invisible filter
* Add link to cohort sessions from persons page
* drop irrelevant test code
* Test clickhouse filtering by action filter
* put filter behind a cloud-only conditional
* remove dead import
* Add icons/data-attr to sessions links
* Appease linter gods
* Remove a dead TODO
This was solved in PR #1849
* Make sessions query more readable
* Remove dead code from sessions
* Make it possible to test with imports in jest
* Fix a bug and add tests to createActionFromEvent
I added tests when initially solving #2848, but the original solution
had to be scrapped. The tests are still valid though
* feature flag papercups
* Use @papercups-io/chat-widget instead of weird useEffect hacks
* Rename basicComponents to essentialElements
* Add posthog_domain to Papercups metadata
* Actually rename basicComponents to essentialElements
Co-authored-by: Michael Matloka <dev@twixes.com>