Commit Graph

303 Commits

Author SHA1 Message Date
Uku Taht
97cdc4814e Refactor goals API 2021-12-13 15:23:47 +02:00
Uku Taht
1dba113e2f
[Draft] Improve location translations (#1526)
* WIP

* Use location library for search suggestions

* Remove unused code

* Remove Countries completely

* Fix tests
2021-12-13 12:03:27 +02:00
Uku Taht
b49fd19934
Pull 1506 - formatted (#1527)
* adding api route PUT /api/v1/sites/goals with form fields "goal_type" and "goal_value" with supported types "event" and "page"

* arm64 docker images

* adding api route DELETE /api/v1/sites/goals/:goal_id with form param "site_id"

* revert makfile + package.json

* return statement hotfix in case site could not be found

* adding api route PUT /api/v1/sites/goals/:goal_id with form params "site_id", "goal_type", and "goal_value"

* update the goal api routes to accept event_name or page_path instead of goal_value

* cleaning goals model

* mix format

Co-authored-by: Ahmed Abbas <a.abbas@ixdc.net>
2021-12-09 16:08:01 +02:00
RobertJoonas
9022234aa6
added invoices section (#1511)
* added invoices section

* fixed formatting

* UI and code style improvements, paddle sandbox setup only on dev environment (fixed)
2021-12-09 15:49:57 +02:00
Uku Taht
a2d0244315 Fix site locked email 2021-12-06 14:22:46 +02:00
Uku Taht
01706b7590 Remove dead code 2021-12-03 11:19:39 +02:00
Uku Taht
4d0bc61ffd Remove Twitter stuff 2021-12-02 11:53:29 +02:00
Uku Taht
e7e36b994d Skip usage checking for users who are on grace period 2021-12-02 11:42:34 +02:00
Uku Taht
effe56b3e4 Use new iso_codes package 2021-12-01 15:31:50 +02:00
Uku Taht
7cfd9f95f1 Delete a site through the API 2021-11-30 11:22:15 +02:00
Uku Taht
07af25ffc3 Fix subscription_interval for enterprise plans 2021-11-29 12:16:51 +02:00
Uku Taht
9c07cf7ea6 Report allowance issues to Sentry 2021-11-29 12:04:02 +02:00
Uku Taht
2463296403 Fetch enterprise plan corretly 2021-11-29 11:52:17 +02:00
Uku Taht
5880678eaf Fix tests 2021-11-26 16:40:39 +02:00
Uku Taht
7e93500834 Allow admins to access the stats API 2021-11-25 15:32:01 +02:00
Uku Taht
2bdfec1cc0
JS refactor: use generic ListReport for country report (#1487)
* Use ListReport for countries

* Fix countries tests

* Replace Browsers with ListReport

* Use Listreport for OS and screen size
2021-11-25 12:00:17 +02:00
Uku Taht
05bf43c1be
City level location data (#1449)
* Merge branch 'plausible_master'

* Add City level details

* Add City level details

* Use ISO codes instead of geoname_id for subdivisions

* Add easier way to configure geolocation database

* Add workflow for dev branch

* Correct clickhouse migration

* Translate subdivision names

* Translate city names

* WIP

* Region and country filters

* Fix region filter

* Remove region_name when removing region filter

* Add modals for regions and cities

* Remove dead code

* WIP

* Revert "WIP"

This reverts commit 3202bf2fe9.

* Feature flag to hide cities when deployed

* Add changelog entry

* Remove unused code

* Remove unused variables

* Fix test

Co-authored-by: AymanTerra <aymanterra@yahoo.com>
2021-11-23 11:39:09 +02:00
Uku Taht
06d0d0eafa Fix over limit email reccommendation 2021-11-23 11:21:55 +02:00
Uku Taht
e355828465 Remove pageview filter by default 2021-11-22 10:42:51 +02:00
Uku Taht
6b55ace014 Fix error with JSON parsing 2021-11-18 10:36:16 +02:00
Uku Taht
0edf4765d4 Ignore maps in prop values 2021-11-18 10:28:20 +02:00
Uku Taht
d3311898c5 Show message when grace period is over 2021-11-16 10:14:24 +02:00
Uku Taht
e9cb8eb4e2 Remove grace period if user upgrades 2021-11-16 10:14:24 +02:00
Uku Taht
ec2a4a1a65 Add [Action required] to over limit email 2021-11-16 10:14:24 +02:00
Uku Taht
d547d0f996 Send email notification when sites are locked at grace period end 2021-11-16 10:14:23 +02:00
Uku Taht
29cb7462e6 Add grace period to upgrade 2021-11-16 10:14:23 +02:00
Matt Colligan
7faa2f6673
CSV export output conversions and conversion rate when filtering for goal (#1464)
* Only add percentages to dashboard data when not filtering goal

* Correctly name CSV headers when exporting conversion data

* Remove percentages from tests when filtering for goal
2021-11-12 15:18:35 +02:00
Matt Colligan
3380685d40
Fix custom property total conversions value not displayed & Export custom properties (#1456)
* Fix custom property total conversions value not displayed

The custom property conversion metrics are not consistent with the other
metrics resulting in the total conversions not being displayed in the
dashboard. This fixes that.

* Export custom props of current goal when filtering dashboard for goal

This makes the CSV export also output a `prop_breakdown.csv` file which,
for the currently filtered goal, contains the conversion data for each
of its configured properties.

* Add test for goal-filtered CSV export
2021-11-10 16:53:38 +02:00
Uku Taht
7a02aae2a5 Accept custom props in expected format 2021-11-10 15:51:43 +02:00
Matt Colligan
d781301886 Apply existing filter to visitors.csv in export (#1454)
Also adds a test to ensure the filter always applies.
2021-11-09 14:51:10 +02:00
Matt Colligan
29e37c8342 More improvements for CSV export (#1446)
* Round time_on_page metric returned by 'pages' API

This rounds the `time_on_page` metric returned as part of the `pages`
API to the nearest second. While this shows no apparent change in the
web UI, it removes the decimal from the exported data in `pages.csv`.

* Tidy up export tests

* Round time_on_page in db query

* Add goal to CSV export tests

* Display CSV export spinner until download is ready

The mechanism used to make the page aware that the download is ready is:

- Client code sets a cookie and requests download.
- Server code handles download and removes cookie when complete.
- Client code polls every 1s to check the cookies, removing spinner when
  the export cookie is removed.
2021-11-09 09:51:38 +02:00
Matt Colligan
945bf82c72
Fix conversions metrics (#1447)
f576fa2 should have updated the conversion metric names so that
`unique_conversions` and `total_conversions` are the two metrics
returned by the conversions API. This updates those so that the CSV
export outputs the correct data.
2021-11-05 15:18:59 +02:00
Matt Colligan
f576fa2a2c
Improvements to CSV export (#1427)
* Add details=True to export API parameters

This makes the ZIP export add `%{"details" => "True"}` to the query's
`params` when fetching data internally for packaging in the ZIP.

This adds bounce_rate and time_on_page to the data in pages.csv, and
bounce_rate and visit_duration to sources.csv.

* Make API return data with consistent names

Some of the data types returned via the JSON or CSV API use inconsistent
naming, and some have redundant name changes (i.e. count -> visitors ->
count). This makes these all consistent and removes the redundancy.

This addresses #1426, fixes some of the CSV headers, and unifies the
JSON and CSV return data labels.

* Update changelog

* Test should use Timex.shift, not relative time

* Return full country names in CSV export

This also replaces the " character with ' in two country names, as those
are the characters used in the names, yielding a more predictable and
'correct' output.

* Fetch CSV exported data concurrently

* Use spinner to indicate when export has started

* Use 300 as default number of brekadown entries for export

Higher numbers (e.g. 1000) seem to cause clickhouse errors when there
many pages to request. It is unclear what is causing the error, as
clickhouse returns an "unknown" error code and an empty error message.
2021-11-04 14:20:39 +02:00
Matt Colligan
8138a6e3a5
Start putting together means to export all aggregate data (#1387)
* Export all dashboard data in zip

This packages all data currently visible in the dashboard into
individual CSVs and downloads them together in a zip.

* Also export conversions in zip of CSVs

* Update export test with zip file response

* Add zip file download to changelog
2021-10-26 15:54:50 +02:00
Uku Taht
7622621a1d Adds test 2021-10-26 15:51:45 +02:00
Uku Taht
1b0323f5c1 Use more path helpers 2021-10-26 10:59:14 +02:00
Uku Taht
710f6f568a Ignores invalid query param part 2021-10-25 10:02:38 +02:00
Uku Taht
6dd9b0bb2f Do not error when bad custom prop value is supplied 2021-10-22 15:48:59 +02:00
Uku Taht
b9b37cdd34 Show pricing v2 when appropriate 2021-10-22 14:15:43 +02:00
Uku Taht
26e34596c8 Allow enterprise plan users to create sites 2021-10-22 11:38:47 +02:00
Uku Taht
e66e9bd1b7 Check site limit for enterprise customers 2021-10-22 11:26:07 +02:00
Uku Taht
792e534edd Optimize usage calculation for large accounts 2021-10-22 10:42:27 +02:00
Uku Taht
b1594c631e Adjust API key limits for enterprise plans 2021-10-21 11:02:45 +02:00
Uku Taht
6a5b383e2b Add enterprise plans 2021-10-20 16:49:11 +02:00
Vignesh Joglekar
7e9d83d62e
Adds pagination for custom props & fixes an issue with errant (none) return values (#1382)
* Adds pagination for custom props, fixes errant (none) being returned in the middle of a dataset

* Formatting

* Fixes errant (none) value correctly

* Changelog

* Adds tests
2021-10-14 09:45:47 +02:00
Uku Taht
2e6f13ba67 Make sure ownership transfer sets trial_expiry_date 2021-10-12 10:28:32 +02:00
Uku Taht
cd68761928 Fix utm_sources when filtering by event:page 2021-10-11 12:16:00 +02:00
Uku Taht
bd7de59a9c Show total visitors when filtered for goal 2021-09-29 13:28:29 +02:00
Uku Taht
a722d02e63 Return 400 when domain is missing 2021-09-24 13:28:10 +02:00
Uku Taht
5be38a57fa Do not return prop names when they are not used 2021-09-24 11:03:20 +02:00