Commit Graph

2237 Commits

Author SHA1 Message Date
hq1
7ba0863bc2
Fix UTM Campaigns filtering regression from #3153 (#3181) 2023-07-24 10:30:17 +02:00
Vini Brasil
16846b16c8
Add creatable option to ComboBox (#3169)
* Add creatable option to ComboBox

This commit changes the ComboBox component to allow a `creatable`
option. This option enables users to create new options along with
choosing existing options.

* Test ComboBox class parameter

* Use display_value instead of input

* Change scroll block to nearest to prevent glitches
2023-07-21 14:58:50 +01:00
RobertJoonas
9ed79542f2
List props frontend (#3126)
* add the props section in behaviors

* update listReport when keyLabel (=propKey) changes

* make column min-width configurable and increase for props

* add rendering condition to limit container height

* fix filter link

* fix tests

* disable clear for single-option combobox

* improve single-option combobox styling

* fix fetchPropKeyOptions fn update on query change

* BUGFIX: searching for prop_values in property filter modal

* change the order of funnels and props section pickers

* change props section Bar color from gray to light-red

* remove disabled options from combobox dropdown (multi & single)

* display percentage metric values without a % sign

* change metric labels in goal filter view to Visitors and Events

* fix realtime update timer
2023-07-21 11:19:07 +03:00
RobertJoonas
b9d122c0c7
Refactor: Use ListReport component in Sources (#3153)
* refactor SourceList to use ListReport

* refactor SourceList into a fn comp

* change referrer-drilldown API response format and remove dead code

* use ListReport in referrer-list

* fix CI

* fix flaky test

* remove IO.inspect
2023-07-21 07:35:41 +03:00
hq1
dfa5bbf4a0
Render funnel name in bold only when funnels tab active (#3163) 2023-07-19 12:56:56 +02:00
hq1
edd2757531
Expose 9000 for native clickhouse protocol (dev mode) (#3162)
* Expose 9009 for native clickhouse protocol (dev mode)

* s/9009/9000
2023-07-19 10:23:31 +02:00
hq1
bf84c043ce
Allow arbitrary suggestion modules in Live ComboBox component (#3154)
* Move ComboBox under Live.Components namespace

* Make suggestions module injectable through component API

* Reorganize tests

* Test ComboBox in isolation

* Allow external suggestion limit option

* Funnels editor: bugfix propagating suggestions over limit

* Update docs & typespecs
2023-07-19 10:23:14 +02:00
RobertJoonas
34fbc3d5bc
New private API to return custom prop values (#3111)
* copy prop_breakdown tests into a separate file

* add a new endpoint for custom props

Duplicate existing goal prop breakdown as a building base for the
new endpoint

* stick to original metric names + CR definitions

We currently use CR with two different definitions, which is inconsistent
and should be changed. This commit just documents the difference for the
time being.

* basic prop breakdown without goal filter

* increase % metric precision to one decimal place

* add some tests without goal filter

* silence credo for TODO comment

* use events metric instead of pageviews

* review feedback

* inline add_cr_a instead
2023-07-17 18:00:52 +03:00
hq1
e6996ccfda
Fix weekly/monthly report e-mails (MJML) (#3150)
* Render weekly/monthly reports with MJML

* Update changelog

* Fix APP-2NA (#3119)
2023-07-17 16:59:01 +02:00
hq1
4b9b3abafd
Respond with early 400 on malformed export request (#3151)
* Respond with early 400 on malformed export request

* credo
2023-07-17 14:50:56 +02:00
Vini Brasil
35107e2b8f
Add revenue metrics to prop breakdown (#3140)
* Extract <Money> React component

* Unhide prop breakdown for revenue goals

* Query revenue metrics on prop breakdown API
2023-07-15 12:04:29 +01:00
RobertJoonas
626dcba0c5
fix CR undefined bug (#3141) 2023-07-13 19:26:01 +03:00
dependabot[bot]
19914112c4
Bump floki from 0.32.1 to 0.34.3 (#3135)
Bumps [floki](https://github.com/philss/floki) from 0.32.1 to 0.34.3.
- [Release notes](https://github.com/philss/floki/releases)
- [Changelog](https://github.com/philss/floki/blob/main/CHANGELOG.md)
- [Commits](https://github.com/philss/floki/compare/v0.32.1...v0.34.3)

---
updated-dependencies:
- dependency-name: floki
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-13 13:19:40 +01:00
RobertJoonas
49a2a14237
refactor LazyLoader and fix bug (#3121) 2023-07-13 13:53:53 +03:00
Uku Taht
c550a87e01
Add webhook alert from Checkly -> Instatus (#2840)
* Add webhook alert from Checkly -> Instatus

* `terraform fmt`

* Send api healthcheck failures to TF

---------

Co-authored-by: Cenk Kücük <cenk@plausible.io>
2023-07-12 14:04:56 +02:00
ruslandoga
6fa558b651
release v2.0.0 (#3030) 2023-07-12 10:27:39 +01:00
Vini Brasil
fd01a67a5f
Plot revenue metrics on main graph (#3112)
* Move money cast function to Stats.Util

* Add revenue metrics to main graph API

* Plot revenue metrics on the main graph

* Return plain numbers instead of a map

* Fix Credo issues

* Fix canMetricBeGraphed function

* Revert canMetricBeGraphed function changes
2023-07-12 10:25:34 +01:00
Cenk Kücük
36bfdb35f5
upgrade github runner (#3114) 2023-07-12 10:39:46 +02:00
dependabot[bot]
eb8bc062d5
Bump eslint-plugin-playwright from 0.15.0 to 0.15.3 in /tracker (#3129)
Bumps [eslint-plugin-playwright](https://github.com/playwright-community/eslint-plugin-playwright) from 0.15.0 to 0.15.3.
- [Release notes](https://github.com/playwright-community/eslint-plugin-playwright/releases)
- [Changelog](https://github.com/playwright-community/eslint-plugin-playwright/blob/main/CHANGELOG.md)
- [Commits](https://github.com/playwright-community/eslint-plugin-playwright/compare/v0.15.0...v0.15.3)

---
updated-dependencies:
- dependency-name: eslint-plugin-playwright
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-12 10:25:43 +02:00
dependabot[bot]
8058a06d2d
Bump phoenix_live_view from 0.19.0 to 0.19.4 (#3131)
Bumps [phoenix_live_view](https://github.com/phoenixframework/phoenix_live_view) from 0.19.0 to 0.19.4.
- [Changelog](https://github.com/phoenixframework/phoenix_live_view/blob/main/CHANGELOG.md)
- [Commits](https://github.com/phoenixframework/phoenix_live_view/compare/v0.19.0...v0.19.4)

---
updated-dependencies:
- dependency-name: phoenix_live_view
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-12 10:24:27 +02:00
Kris Buist
c4316d61c6
Fix the country filter label when clicking on a country on the map (#3109) 2023-07-11 14:25:36 +02:00
hq1
e6e7f07915
Revert "Bump stylelint from 14.1.0 to 15.10.1 in /assets (#3115)" (#3125)
This reverts commit efe0d63b74.
2023-07-11 14:23:20 +02:00
dependabot[bot]
efe0d63b74
Bump stylelint from 14.1.0 to 15.10.1 in /assets (#3115)
Bumps [stylelint](https://github.com/stylelint/stylelint) from 14.1.0 to 15.10.1.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/14.1.0...15.10.1)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-11 14:14:22 +02:00
dependabot[bot]
f1c89a28f5
Bump eslint from 8.38.0 to 8.44.0 in /tracker (#3103)
Bumps [eslint](https://github.com/eslint/eslint) from 8.38.0 to 8.44.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.38.0...v8.44.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-11 14:01:28 +02:00
dependabot[bot]
50eb97d679
Bump semver from 5.7.1 to 5.7.2 in /assets (#3124)
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-11 14:01:02 +02:00
dependabot[bot]
2dbba5d724
Bump webpack from 5.38.1 to 5.88.1 in /assets (#3093)
Bumps [webpack](https://github.com/webpack/webpack) from 5.38.1 to 5.88.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.38.1...v5.88.1)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-11 14:00:53 +02:00
dependabot[bot]
5b960426f9
Bump @tailwindcss/aspect-ratio from 0.2.1 to 0.4.2 in /assets (#2263)
Bumps [@tailwindcss/aspect-ratio](https://github.com/tailwindlabs/tailwindcss-aspect-ratio) from 0.2.1 to 0.4.2.
- [Release notes](https://github.com/tailwindlabs/tailwindcss-aspect-ratio/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss-aspect-ratio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss-aspect-ratio/compare/v0.2.1...v0.4.2)

---
updated-dependencies:
- dependency-name: "@tailwindcss/aspect-ratio"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-11 13:59:56 +02:00
dependabot[bot]
4615866c13
Bump phoenix_live_reload from 1.3.3 to 1.4.1 (#2849)
Bumps [phoenix_live_reload](https://github.com/phoenixframework/phoenix_live_reload) from 1.3.3 to 1.4.1.
- [Release notes](https://github.com/phoenixframework/phoenix_live_reload/releases)
- [Changelog](https://github.com/phoenixframework/phoenix_live_reload/blob/main/CHANGELOG.md)
- [Commits](https://github.com/phoenixframework/phoenix_live_reload/compare/v1.3.3...v1.4.1)

---
updated-dependencies:
- dependency-name: phoenix_live_reload
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-11 13:59:31 +02:00
risson
50fa1b059b
Allow optional IPv6 for clickhouse repo (#2970)
* Allow optional IPv6 for clickhouse repo

Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>

* remove trailing comma

---------

Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
Co-authored-by: ruslandoga <rusl@n-do.ga>
2023-07-11 13:57:57 +02:00
Cenk Kücük
13a38aee14
upgrade clickhouse (#3113) 2023-07-11 13:54:50 +02:00
ruslandoga
7e2627ae4c
array join (#3021) 2023-07-11 12:43:53 +02:00
hq1
2be9020460
Fix APP-46E: accept invitation 2nd click (#3120)
* Fix APP-46E: accept invitation 2nd click

* :LspStop

* Update lib/plausible_web/controllers/invitation_controller.ex

Co-authored-by: Vini Brasil <vini@hey.com>

---------

Co-authored-by: Vini Brasil <vini@hey.com>
2023-07-11 10:52:09 +02:00
hq1
cf5cc8de94
Filter out GA imported data with no visitors recorded (#3123) 2023-07-11 10:47:24 +02:00
hq1
9debcdee24
Fix APP-2NA (#3119) 2023-07-11 10:47:14 +02:00
hq1
fea9bb32ee
Prevent robots from looking too much into public dashboards (#3118)
* Add noindex,nofollow to dashboard pages

* Implement NoRobots plug

* Enable NoRobots plug in the router

* Fixup internal route

* Fix double slash in the router

* Add special bot treatment to plausible.io live demo page

* Revert aggressive protection with agent detection
2023-07-11 10:47:03 +02:00
Roj
fd3c9ecc7b
Add missed space (#3116) 2023-07-10 09:13:55 +02:00
RobertJoonas
0541098330
Make the ListReport component more flexible (#3078)
* refactor ListReport

Pass a 'getFilterFor' function instead of a 'filter' object to ListReport

* Keep the statsBoxClass in one place only

* add classname prop to MoreLink

* define metric structs as ListReport inputs

* Fix a bug

If the query changes, we also want to reset the eventListener function.
Otherwise we keep calling an outdated function that fetches old data.

* fix CI
2023-07-06 17:29:08 +03:00
hq1
01fba1f34b
Bump funnel max size to 8 steps (#3094)
* Bump max funnel size to 8 steps

* Improve chart rendering for small screens/large funnels
2023-07-04 12:07:24 +02:00
hq1
ade437c085
Evaluate ephemeral funnels before saving (#3097)
* PoC: evaluate funnel on step selection

* Adjust test to actually _select_ steps

* Throttle and test ephemeral funnel evaluation

* Format compact percentages server-side

At this point it's pointless to duplicate this;
all the primitives exist in the API in case the client
wants a different representation.
2023-07-04 12:07:16 +02:00
hq1
e98a16141e
Enable superadmin access to funnel settings (#3104) 2023-07-04 12:07:00 +02:00
Cenk Kücük
f374650330
Postgres upgrade (#3062)
* Update list to the last 3 versions of postgres

* Update postgres prod version
2023-06-30 14:01:12 +02:00
hq1
34c053ed12
Fix spacing between two notices in funnel settings (#3092)
* Fix spacing between two notices in funnel settings

* Fixup
2023-06-28 14:11:48 +02:00
hq1
21a968ef2c
Set socket interval for hearbeats to 10s (#3091) 2023-06-28 13:53:37 +02:00
hq1
ff11b3f26d
Bugfix: funnel deletion (#3090)
Somewhere along the way of rebasing the feature,
the integration tests for deletion were lost.

j/k they were never written 🤡
2023-06-28 13:20:19 +02:00
hq1
eb397a6c25
Dynamically set up session domain (#3089)
* Dynamically configure session domain

* Fix up error message in runtime config
2023-06-28 12:28:26 +02:00
hq1
4ac83b6e5d
Reconfigure live websocket (#3087)
* Dynamically set :domain for the live socket

Ref: https://github.com/phoenixframework/phoenix_live_view/pull/2715

* Make runtime config raise before the user ends up in a reconnect loop

* hall of shame: remove console.info remnant

* Check origin on live websocket

* Get rid of single pipe
2023-06-28 10:16:32 +02:00
hq1
db5488efa6
Put live view meta tags behind a FF (#3083) 2023-06-27 14:10:17 +02:00
hq1
0c77b01a99
Allow configurable websocket URL for live view (#3082) 2023-06-27 13:37:21 +02:00
hq1
bbedeff683
Implement Funnels view on dashboard (#3066)
* Add Funnel react component

assets/js/dashboard/stats/behaviours/funnel.js - restored from:

98a76cbd Remove console.info calls
d94db99d Convert Funnel class component into a functional one
028036ad Review comments
3067a940 Stop doing maths in react
73407cc3 Fix error handling when local storage gets corrupted
e8c6fc52 Format numbers on funnel labels
c815709f Reorganize component responsibility
7a88fe44 Outline basic error handling
94caed7c Chart styling updates
4514608a Add percentages to funnel
d622c32d Add funnel picker

Co-authored-by: Uku Taht <uku.taht@gmail.com>

* Pass funnels list to react via data-funnels

* Implement Funnels react API

lib/plausible_web/controllers/api/stats_controller.ex - restored from:

f36ad234 Adjust to Plausible.Stats interface
9b532273 Test funnel stats controller
028036ad Review comments
bea3725f Remove IO.inspect
7a88fe44 Outline basic error handling
c8ae3eaf Move Funnels to StatsController and use base query
667cf222 Put private functions at the bottom

* Tweak funnel presentation

* Handle errors at the top

* Do not register DataLabels plugin globally

or else all the existing charts are affected

* Calculate drop-off percentage evaluating funnels

* Tweak dark mode + implement nicer tooltips

* Make currently selected funnel bold in the picker

* Count user_ids not session_ids when evaluating funnels

So if a visitor goes:

1. Start session
2. Complete funnel step 1
3. Inactive for 30 minutes
4. Complete funnel step 2

We would not be able to track this funnel completion because of the session timeout.
We like to o measure this as funnel completion even though the session expired in the middle.

cc @ukutaht

* Add extra properties to the funnels API

cc @ukutaht

* Improve tooltips so that step to data is rendered

* Change tooltip number formatting

* Remove debugging remnants

* Quick & dirty mobile view

* Fix mobile view: tweak dark mode & funnel switching

* Ignore DOMException: the operation was aborted

Otherwise this sometimes flashes the space shuttle
screen when navigating quickly via a keyboard.

* Format percentages on the main chart

* Close missing tag 🙈

* Revert "Close missing tag 🙈"

This reverts commit 9c2f970e22fd7e2980503242b414f42ce8bce1d2.

* Use jsx to render funnel tooltip

To get markup validated via lsp mostly...

* Fixup: s/class/className

* Fix className interpolation

* Add a ruler to the tooltip

* Tweak funnel chart style

* Fix font distortion issue on chart/canvas labels

* s/class/className

* Put "Set up funnels" link behind a feature flag

* Refactor internal selection storage

Getting ready for live funnel evaluation

* Don't try to connect LV socket if there's no CRSF token set up

This is perfectly okay for some of the templates/layouts.

* Fix up funnel creation typespecs

Unfortunately we can't define a type with literal string keys,
hence this must suffice.

* Use uniq over count/distinct

* Revert JSX in tooltips

Ref: https://github.com/plausible/analytics/pull/3066#discussion_r1241891155

* Remove the extra query for counting all visitors

cc @ukutaht

* Add premium notice

---------

Co-authored-by: Uku Taht <uku.taht@gmail.com>
2023-06-27 10:04:35 +02:00
Vini Brasil
a8daac5e03
Add notice to revenue goals UI (#3069)
This pull request changes the UI for revenue goals, replaces the select box with a toggle, and adds a notice. It also polishes up the goal creation UI in general to have the same font sizes and weights compared to the rest of the page.
2023-06-23 09:02:22 +01:00