analytics/lib/plausible_web/templates/site
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
..
membership Add a note that a subscription is not transferred alongside a site (#2750) 2023-03-15 08:17:07 -03:00
change_domain.html.eex Allow domain change (#2803) 2023-04-04 10:55:12 +02:00
edit_shared_link.html.eex Add unique index to shared link name 2021-04-14 11:45:45 +03:00
import_from_google_confirm.html.eex Refresh Google Analytics token before import (#2254) 2022-09-26 12:29:56 +03:00
import_from_google_user_metric_form.html.eex Refresh Google Analytics token before import (#2254) 2022-09-26 12:29:56 +03:00
import_from_google_view_id_form.html.eex Handle GA authentication errors (#2505) 2022-12-07 23:32:14 -03:00
index.html.eex Fix favicon request URLS (#2976) 2023-05-29 10:30:03 +03:00
new_goal.html.heex Add notice to revenue goals UI (#3069) 2023-06-23 09:02:22 +01:00
new_shared_link.html.eex Optimize dark mode UI for shared link form (#2355) 2022-10-19 09:02:27 -03:00
new.html.eex Revert "Temporarily disable site creation (#2813)" (#2817) 2023-04-04 08:23:31 +02:00
settings_custom_domain.html.eex Update links to documents 2022-08-15 09:20:40 +08:00
settings_danger_zone.html.eex Removing the notes about the 48 hour deletion delay (#2735) 2023-03-14 07:47:35 -03:00
settings_email_reports.html.eex Update settings_email_reports.html.eex (#1486) 2021-11-24 10:47:53 +02:00
settings_funnels.html.heex Implement Funnels view on dashboard (#3066) 2023-06-27 10:04:35 +02:00
settings_general.html.eex Upgrade phoenix (#2902) 2023-05-09 11:51:35 +03:00
settings_goals.html.heex Implement Funnels view on dashboard (#3066) 2023-06-27 10:04:35 +02:00
settings_people.html.eex Fixed a minor typo for consistency (#2420) 2022-11-04 23:28:53 -03:00
settings_search_console.html.eex Separate GA/SC scopes (#2372) 2022-10-25 08:17:17 -03:00
settings_visibility.html.eex International Domain Names (IDN) Support (#2034) 2022-09-28 10:42:15 +03:00
snippet_after_domain_change.html.eex Upgrade phoenix (#2902) 2023-05-09 11:51:35 +03:00
snippet.html.eex Upgrade phoenix (#2902) 2023-05-09 11:51:35 +03:00