Commit Graph

111 Commits

Author SHA1 Message Date
Ralf Zimmermann
408d95fe09
Add custom goal props to breakdown endpoint (#1578) 2022-02-01 10:09:45 -06:00
Uku Taht
d1fe1f7e41 Cache the tracking script for 24 hours 2022-01-24 16:01:30 -06:00
ssendev
8077671f8a
Update session screen_size if unknown (#1610) 2022-01-21 14:32:19 -06:00
Niklas Hambüchen
1337b46e52
Allow user to specify listen interface via LISTEN_IP. (#1190)
This enables safer deployments to allow localhost-only
or VPN-interface-only listening.
2022-01-21 14:04:29 -06:00
Uku Taht
e4b99dbad6
Fix Security error with localstorage access (#1568)
* Fix Security error with localstorage access

* Changelog
2021-12-29 11:08:11 +02:00
Ru Singh
d5377987d9
Allow site toggle to work with minimal info for guests (#1510)
* chore(docker): improve repeat contributions workflow

* This change adds two new commands to gracefully stop and remove the Postgres and Clickhouse docker containers. To do so, it also gives them a recognizable name.

* Additionally, the Postgres container is updated to use a named volume for its data. This lower friction for repeat contributions where one would otherwise sign up and activate their accounts again and again each time.

* fix(ui): site switcher should toggle, instead of just opening

* feat/wip: public site toggle dropdown

* fix(ux): toggling the site switcher & closing from anywhere

* Do not react to key presses for guest users

* Cleanup duplicate code

* Fix logic left in for local testing

* Add a changelog entry for guest dropdown toggle
2021-12-22 09:54:09 +02:00
Uku Taht
48ad7485c8
PR 1393 continued (#1542)
* Add `utm_content` and `utm_term`.
Support `utm_content` and `utm_term` as requested in #515.

* Add dropdown for UTM options

* Remove utm_content and term from filter modal for now

Co-authored-by: Blender Defender <defenderblender@gmail.com>
2021-12-16 11:02:09 +02:00
Ralf Zimmermann
faf4459b15
Add "events" metrics to public breakdown endpoint (#1529) 2021-12-14 11:41:33 +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
Uku Taht
7d37208d52
Allow custom styles to be passed to embedded iframe (#1522)
* Allow custom styles to be passed to embedded iframe

* Changelog
2021-12-08 11:53:37 +02:00
RobertJoonas
ecdf04726b
Update CHANGELOG.md 2021-12-06 11:27:22 +02:00
Ru Singh
17563e99c5
UI fix: footer alignment on mobile (#1498)
* fix(ui): footer alignment on mobile

* docs(changelog): new entry for footer alignment
2021-11-30 13:06:58 +02:00
Uku Taht
ef3e015d4e Add changelog entry 2021-11-30 11:26:55 +02:00
Ru Singh
7da138e99e
UI fix for multi-line pill text underline issues (#1499)
* chore(docker): improve repeat contributions workflow

* This change adds two new commands to gracefully stop and remove the Postgres and Clickhouse docker containers. To do so, it also gives them a recognizable name.

* Additionally, the Postgres container is updated to use a named volume for its data. This lower friction for repeat contributions where one would otherwise sign up and activate their accounts again and again each time.

* fix(ui): pill text to use text decoration instead of border

Support is pretty good including Safari 12+ without a prefix.

* docs(changelog): entry for pill text fix
2021-11-29 16:21:09 +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
0e3db09f3c
Changelog for v1.4.1 2021-11-23 10:55:40 +02:00
Émile Perron
fbd6e37767
Add option to specify a URL in the manual extension (#1479)
* Add option to specify a URL in the manual extension

* Fix error when option parameter isn't provided
The uglify-js dependency had to be updated to support the optional chaining operator

* Remove the possibility to pass a function for the custom URL
This added weight unnecessarily, as the users can simply call the function themselves before triggering the event.

* Change optional chaining to ternary for improved browser support

* Revert package-lock.json to version 3.9.4 of uglify-js
It was previously updated to support optional chaining; reverting it as a reminder that this is the current browser support level that is accepted by Plausible.
2021-11-23 10:50:06 +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
Uku Taht
7364733faf Ensure that question marks are encoded properly for the database 2021-10-28 13:46:45 +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
cd0c98db71 Add changelog entries 2021-10-18 15:57:56 +02:00
Vignesh Joglekar
0c982a8670
Adds list-based country report option (#1381)
* Adds list option for countries report

* Changelog

* Renames Geo to Locations

* Lint

Co-authored-by: Uku Taht <Uku.taht@gmail.com>
2021-10-14 10:55:43 +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
Vignesh Joglekar
688e195e27
Fixes custom prop tab wrapping & spacing on smaller viewports (#1383)
* Fixes custom prop tab wrapping & spacing on smaller viewports

* Changelog

Co-authored-by: Uku Taht <Uku.taht@gmail.com>
2021-10-13 10:39:44 +02:00
Felix Haase
d3187e54e3
Fix z-indexes that cause menu overlay (#1365)
fixes #1352
2021-10-12 11:31:46 +02:00
Uku Taht
f5a7fd2819
Fix links in new tab (#1348)
* Fix links in new tab

* CHANGELOG
2021-09-21 10:44:51 +02:00
Ro Savage
b3bc796d50
Add conversion_rate to sources api and source table (#1299)
* Add conversion_rate to sources api and source table

* Remove percentageFormatter

* Update source tests to include conversionat rate

* Add CR to detals modal

* Correct formatting with linter

* Add change log

* Add CR to Pages, Device and Countries panels
2021-09-20 16:17:11 +02:00
Richard Willis
3f8af9a13b
Fix reading config from file (#1312) 2021-09-09 10:41:12 +03:00
Ru Singh
dd20fc8a17
Feature/details modal mobile (#1211)
* chore(docker): improve repeat contributions workflow

* This change adds two new commands to gracefully stop and remove the Postgres and Clickhouse docker containers. To do so, it also gives them a recognizable name.

* Additionally, the Postgres container is updated to use a named volume for its data. This lower friction for repeat contributions where one would otherwise sign up and activate their accounts again and again each time.

* Format countries modal

* Remove unused imports
* Run ESLint and make related fixes

* ESlint formatting for entry pages modal

* WIP: proof of concept for scrollable modals on mobile

* Fix modals being too wide on desktop

* Make modals truly responsive

This fixes the desktop behaviour completely now.

* Update changelog with modals responsiveness

* Update desktop modal width to 860px

It was an oversight to set it at 800px in the first place.

Co-authored-by: Uku Taht <Uku.taht@gmail.com>
2021-08-13 11:00:42 +03:00
Ru Singh
f179b253b4
Hotfix/bar overflow (#1202)
* chore(docker): improve repeat contributions workflow

* This change adds two new commands to gracefully stop and remove the Postgres and Clickhouse docker containers. To do so, it also gives them a recognizable name.

* Additionally, the Postgres container is updated to use a named volume for its data. This lower friction for repeat contributions where one would otherwise sign up and activate their accounts again and again each time.

* Break words early to maintain spacing; truncate on larger screens

* Update changelog entry on UI bars

* Truncate bar text from md breakpoint
2021-07-29 09:54:52 +03:00
Uku Taht
369f63bc58 Adds an option to rename the script file 2021-07-23 15:17:32 +03:00
Thomas Hutterer
145a3599c1
Turn off form autocompletion for new shared links (#1175)
* Turn off form autocompletion for new shared links

Many browser autofill input fields based on their name, but here it makes no sense to use the user's name (email) or even password for the shared link.

* Update changelog
2021-07-13 14:11:42 +03:00
Ru Singh
9ce9264144
Feature/goals bar text (#1165)
* chore(docker): improve repeat contributions workflow

* This change adds two new commands to gracefully stop and remove the Postgres and Clickhouse docker containers. To do so, it also gives them a recognizable name.

* Additionally, the Postgres container is updated to use a named volume for its data. This lower friction for repeat contributions where one would otherwise sign up and activate their accounts again and again each time.

* Improve bar component to work in a variety of situations

This fixes two issues from #972

- Goals area has display issues depending on the name of your custom events
- It is not possible to view labels for outbound links, 404 and custom props

* Update changelog entry

* Move content to children for Bar component

* Remove redundant fallback width

* Fix text color on root conversion texts

Hyperlinks (<a>) inherit their color. In the case of the root conversion text, we needed to specify the color somewhere.

The same color as the breakdown texts has been chosen.

The Bar component no longer needs to take in text classes.
2021-07-08 09:42:30 +03:00
Ru Singh
e5a4b82db4
Feature/mobile graph (#1160)
* chore(docker): improve repeat contributions workflow

* This change adds two new commands to gracefully stop and remove the Postgres and Clickhouse docker containers. To do so, it also gives them a recognizable name.

* Additionally, the Postgres container is updated to use a named volume for its data. This lower friction for repeat contributions where one would otherwise sign up and activate their accounts again and again each time.

* Update the ticks on the X and Y axis of the main chart to be responsive

* Update the changelog for the graph responsiveness fix
2021-06-28 16:05:22 +03:00
Vignesh Joglekar
30ac901141
Adds manual, editable, auto-suggested filters, and negated&globbed path-based filters (#1121)
* Adds manual-filters + friends

commit 308192044d726e9a6f7406e333048ab3407aa260
Merge: 39287ab a299fab
Author: Vignesh Joglekar <rexvigasaurus@gmail.com>
Date:   Fri Jun 11 03:40:55 2021 -0500

    Merge branch 'manual-filters' into manual-filters-2

commit a299fab1fb
Author: Vignesh Joglekar <rexvigasaurus@gmail.com>
Date:   Fri Jun 11 02:20:26 2021 -0500

    Changes to split and pattern matched function for time_on_page

commit 10f10c933a
Author: Vignesh Joglekar <rexvigasaurus@gmail.com>
Date:   Fri Jun 11 01:53:18 2021 -0500

    Fixes a couple of minor UX issues

commit f2e5ce8eb3
Author: Vignesh Joglekar <rexvigasaurus@gmail.com>
Date:   Fri Jun 11 01:49:10 2021 -0500

    Fixes time on page for globbed and negated page paths

commit bb18af6526
Author: Vignesh Joglekar <rexvigasaurus@gmail.com>
Date:   Thu Jun 10 05:24:05 2021 -0500

    Close to finalized version of updated version

    Just needs some additional testing + potentially code cleanup

commit d0b7bfe3da
Author: Vignesh Joglekar <rexvigasaurus@gmail.com>
Date:   Fri May 28 04:21:21 2021 -0500

    Real Dialyzer Fix

commit 296a76af34
Author: Vignesh Joglekar <rexvigasaurus@gmail.com>
Date:   Fri May 28 03:44:29 2021 -0500

    Dialyzer fix

commit 91f3b44017
Author: Vignesh Joglekar <rexvigasaurus@gmail.com>
Date:   Thu May 27 17:11:24 2021 -0500

    Changelog

commit e041f75745
Author: Vignesh Joglekar <rexvigasaurus@gmail.com>
Date:   Thu May 27 17:09:52 2021 -0500

    Formatting

commit f689642204
Merge: e00929b 4ff25f6
Author: Vignesh Joglekar <rexvigasaurus@gmail.com>
Date:   Thu May 27 17:08:47 2021 -0500

    Merge branch 'master' into manual-filters

commit e00929b1c5
Merge: 83887c4 806975e
Author: Vignesh Joglekar <rexvigasaurus@gmail.com>
Date:   Thu May 27 17:01:48 2021 -0500

    Merge branch 'manual-filters' of github.com:Vigasaurus/plausible-analytics into manual-filters

commit 83887c49cc
Author: Vignesh Joglekar <rexvigasaurus@gmail.com>
Date:   Thu May 27 16:59:32 2021 -0500

    Adds tests for suggestions, formats goals suggestion query

commit 1cb7732a08
Author: Vignesh Joglekar <rexvigasaurus@gmail.com>
Date:   Thu May 27 16:36:31 2021 -0500

    Adds goals as auto-complete capable filter

commit 4ca39cc406
Author: Vignesh Joglekar <rexvigasaurus@gmail.com>
Date:   Thu May 27 16:08:22 2021 -0500

    95% completed auto-complete setup

    Still needs:
    - tests
    - goals added as filter

commit 22d38c4cd8
Author: Vignesh Joglekar <rexvigasaurus@gmail.com>
Date:   Thu May 27 03:47:19 2021 -0500

    80% of auto-complete filters progress

    Still needs
    - countries and screen into new format
    - re-style dropdown and background
    - drop debounce time
    - tests

commit 806975ede9
Merge: 81c5e05 1a93542
Author: Vignesh Joglekar <rexvigasaurus@gmail.com>
Date:   Tue May 25 15:28:21 2021 -0500

    Merge branch 'master' into manual-filters

commit 81c5e05760
Author: Vignesh Joglekar <rexvigasaurus@gmail.com>
Date:   Tue May 25 15:21:03 2021 -0500

    Makes colorings on top bar elements consistent

commit fa7f6c2268
Author: Vignesh Joglekar <rexvigasaurus@gmail.com>
Date:   Tue May 25 14:58:25 2021 -0500

    Makes requested changes, adds different version of filter button

commit 7dc65b9b7a
Author: Vignesh Joglekar <rexvigasaurus@gmail.com>
Date:   Sat May 22 04:29:01 2021 -0500

    Changelog

commit c684f1c76a
Author: Vignesh Joglekar <rexvigasaurus@gmail.com>
Date:   Sat May 22 04:26:14 2021 -0500

    Various UI Improvements

    - Makes edit buttons full-length & properly sized
    - Adds remove filter button in edit menu

commit a632e7a8ee
Author: Vignesh Joglekar <rexvigasaurus@gmail.com>
Date:   Sat May 22 03:11:50 2021 -0500

    Adds tests for exclusions and wildcards

commit eb91a7942b
Author: Vignesh Joglekar <rexvigasaurus@gmail.com>
Date:   Sat May 22 03:02:23 2021 -0500

    Fixes editing UX on list view

commit 6209d72aee
Author: Vignesh Joglekar <rexvigasaurus@gmail.com>
Date:   Fri May 21 04:01:17 2021 -0500

    Bugfix in realtime view, formatting

commit 007d44df38
Author: Vignesh Joglekar <rexvigasaurus@gmail.com>
Date:   Fri May 21 03:23:16 2021 -0500

    Second pass - mostly everything user-facing is done

    Still needs:
    - Tests
    - Potentially negating other filters
    - Potentially some code cleanup

commit cb7b5b9fbd
Author: Vignesh Joglekar <rexvigasaurus@gmail.com>
Date:   Fri May 21 01:49:52 2021 -0500

    First pass on manual filter & path regex/negated filters

    Still needs:
    - Form structure on filter modal
    - Edit filter button
    - Filter dropdown UI improvement
    - Filter modal mount data collection
    - Tests
    - Potentially negating other filters

* Fixes an issue between the updated React version and Flatpickr not showing up

Reverting to v16 was the simplest fix without diving into the issue upstream with Flatpickr

* Resolves comments on UI and code style

Co-authored-by: Uku Taht <Uku.taht@gmail.com>
2021-06-21 14:42:16 +03:00
Uku Taht
e71de6dc1f
Invitations (#1122)
* Invite existing user to a site

* Add invitation flow for non-existing users

* Accept and reject invitations

* Use invitation flow for existing users

* Locking mechanism for sites

* Authorization for site settings

* Show usage based on site ownership

* Add ability to remove members from a site

* Do not show settings link to viewer roles

* Ability to remove invitations

* Remove `Plausible.Sites.count_for/1`

* Fix tests

* Do not show the trial banner after the trial

* Correct trial emails

* Transfer ownership

* Send invitation email to existing user

* Add invitation email flows

* Add plug for role-based authorization

* Rename AuthorizeStatsPlug -> AuthorizeSiteAccess

* Add email flow for ownership transfer

* Fix URLs in emails

* Fix small copy issues

* Make 'People' its own section in site settings

* Notify user via email if their access has been removed

* Check site lock status when invitation is accepted

* Check lock status when user subscribes

* Make sure only admins and owners can create shared links

* Changelog

* Add LockSites to daily cron

* Clean invitations after 48 hours

* Add notices about expiry

* Add invitation expired page

* Add doc link
2021-06-16 15:00:07 +03:00
Ru Singh
5c86b0dd96
Update CHANGELOG.md (#1130)
For #1113, the changelog wasn't updated. This simply adds a relevant entry to the CHANGELOG.md file. :)
2021-06-16 14:09:35 +03:00
Vignesh Joglekar
645069271a
Fixes React errors+crash when system theme changes on loaded dashboard (#1123)
* Fixes crash on theme change

* Changelog
2021-06-14 16:44:46 +03:00
Uku Taht
c37a2de627 Revert "Adds manual filters on FE, capability for exclusion filters (and the globbing we're used to) for path-based filters (#1067)"
This reverts commit b6eeb40472.
2021-06-02 14:35:17 +03:00
Maximilian Bosch
4ff25f68c8
Postgres socket authentication (#1052)
* Allow to connect to postgres via socket auth

* Add changelog entry for new env-vars

Co-authored-by: Uku Taht <Uku.taht@gmail.com>
2021-05-26 15:40:56 +03:00
Vignesh Joglekar
b6eeb40472
Adds manual filters on FE, capability for exclusion filters (and the globbing we're used to) for path-based filters (#1067)
* First pass on manual filter & path regex/negated filters

Still needs:
- Form structure on filter modal
- Edit filter button
- Filter dropdown UI improvement
- Filter modal mount data collection
- Tests
- Potentially negating other filters

* Second pass - mostly everything user-facing is done

Still needs:
- Tests
- Potentially negating other filters
- Potentially some code cleanup

* Bugfix in realtime view, formatting

* Fixes editing UX on list view

* Adds tests for exclusions and wildcards

* Various UI Improvements

- Makes edit buttons full-length & properly sized
- Adds remove filter button in edit menu

* Changelog

* Makes requested changes, adds different version of filter button

* Makes colorings on top bar elements consistent
2021-05-26 10:34:04 +03:00
Andrey Meshkov
90cfed035f
Added parameters for Clickhouse flush interval and max buffer size (#1073)
Currently, both are hard-coded to relatively small values.
This may cause an unnecessary high load on the Clickhouse instance.
It makes sense to make those configurable.
2021-05-25 11:37:52 +03:00
Vignesh Joglekar
41e4690116
Adds Time on Page metric to Top Pages report (#1007)
* First pass

Needs more testing & potentially cleanup

* Fixes tests, error handling

* Formatting

* Removes broken test

* Fixes inconsistent test

This was due to Clickhouse setup not inserting the sessions with the exact same timestamp consistently and making the test inconsistent

* Combines `include` param, asyncs time_on_page and bounce_rate

* Fixes CH error when no pageviews exist in period

* Format

* Changelog

* Increases await timeout to accomodate larger data sets

* Improves handling of timeout behavior

* Fixes session-based filtering on time on page queries

* Formatting

* Removes old forced entry page modal from top pages report
2021-05-18 15:14:33 +03:00
Uku Taht
e511c9663e
Pagination for sites listing (#994)
* Add simple pagination to sites index page

* Add changelog entry
2021-05-05 16:17:59 +03:00
Uku Taht
255b4b2325
Don't use localStorage when the browser doesn't support it (#971)
* Wrap localStorage with support checks

* Add changelog
2021-04-28 11:31:10 +03:00
Uku Taht
5c77ec3f5d
Support multiple data-domain values (#968)
* Support multiple `data-domain` values

* Add changelog entry
2021-04-27 10:26:44 +03:00
Uku Taht
b107717774
Additional metrics for timeseries API call and CSV export (#952)
* Add `metrics` option to timeseries call

* Add more metrics to csv export

* Add changelog entry
2021-04-23 15:27:50 +03:00
Uku Taht
fbe6ab9b61 Remove AppSignal 2021-04-23 11:42:05 +03:00
Uku Taht
b8baefee3b
Fix weekly report time range (#951)
* Fix weekly report time range

* Update changelog
2021-04-22 12:11:33 +03:00
Uku Taht
83a759c60a
Use db-ip lite database for countries (#906)
* Use DBIP database for countries

* Add fake data for geolocation tests
2021-04-12 12:21:07 +03:00