* exclude consolidated views when counting/listing sites
* Use Teams.owned_sites/1 now that it excludes consolidated views
* Until we figure out better - make sites.consolidated virtual for CE
* Safeguard ingestion, update tests for gate keeper/site cache
* Ensure consolidated sites are excluded from helpscout counts
* Test that consolidated views are excluded from site listings
* Update tests for owned sites to ensure consolidated views are excluded
* Update CRM tests to exclude consolidated sites
* exclude consolidated sites from quota usage
* filter out conslolidated sites from deleting events background job
* exclude consolidated (change domain background job)
* retrieve non-consolidated sites only by default
* Ensure Site struct defines a default for `consolidated`
* Make `sites.consolidated` column available in CE
* Add missing test to reminder e-mails, consolidation is irrelevant here
* Do not send setup help e-mail for consolidated sites
* Ensure no setup success email is ever sent for consolidated sites
* Skip consolidated sites in legacy time on page cut off
* Add minor test to Sites.get_for_user/2
* Extend get_for_user/get_for_user! options signature
* Move test dir up
* Write tests for Sites.get_by_domain
* Minor DRY
* fix typos
* Provide Site.regular() and ConsolidatedView.sites() for querying
* Use Site.regular() in Repo.get_by() calls
* Fix typespecs
* Update missing Site.regular() filters
---------
Co-authored-by: Robert Joonas <robertjoonas16@gmail.com>
* 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 🤦
* CSV import/export support for time-on-page
Note only the new time-on-page metric is exported this way
* visibility check for graphing of time_on_page
* FE no longer receives/sends legacy_time_on_page_cutoff
* Remove current_user from exports
* Remove legacy_time_on_page_cutoff from query.include, make behavior work off of site.legacy_time_on_page_cutoff explicitly
* Remove dead function
* More current_user_id removals
* include scroll_depth in full pages export
* import scroll_depth from CSV
* query scroll depth from imported data
* fix ordering by scroll depth with imported data
* fix imported scroll depth query + more tests
* enable scroll depth in top stats with imported data
* add main graph test
* fix test and native scroll depth sum select
* Update lib/plausible/exports.ex
Co-authored-by: ruslandoga <doga.ruslan@gmail.com>
* adjust test
* adjust test to catch error
* export/import/count pageleave_visitors
* extract base_q in export_pages_q
* rename total_visitors to pageleave_visitors
---------
Co-authored-by: ruslandoga <doga.ruslan@gmail.com>
* Reapply "Local CSV exports/imports and S3/UI updates (#3989)" (#3995)
This reverts commit aee69e44c8.
* remove unused functions
* eh, that one was actually used
* ugh, they were both used
---------
Co-authored-by: ruslandoga <67764432+ruslandoga@users.noreply.github.com>
* local CSV exports/imports and S3 updates
* credo
* dialyzer
* refactor input columns
* fix ci minio/clickhouse tests
* Update lib/plausible_web/live/csv_export.ex
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
* fix date range filter in export_pages_q and process only pageviews
* remove toTimeZone(zero_timestamp) note
* use SiteImport.pending(), SiteImport.importing()
* escape [SiteImport.pending(), SiteImport.importing()]
* use random s3 keys for imports to avoid collisions (sometimes makes the upload get stuck)
* clamp import date ranges
* site is already in assigns
* recompute cutoff date each time
* use toDate(timestamp[, timezone]) shortcut
* show alreats on export cancel/delete and extract hint into a component
* switch to Imported.clamp_dates/4
* reprocess tables when imports are added
* recompute cutoff_date on each call
* actually use clamped_date_range on submit
* add warning message
* add expiry rules to buckets in make minio
* add site_id to imports notifications and use it in csv_importer
* try/catch safer
* return :ok
* date range is not available when no uploads
* improve ui and warning messages
* use Generic.notice
* fix flaky exports test
* begin tests
* Improve `Importer` notification payload shape
---------
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>