analytics/lib/plausible_web/templates/site/settings_funnels.html.heex

29 lines
993 B
Plaintext
Raw Normal View History

2023-07-27 17:46:32 +03:00
<section class="shadow bg-white dark:bg-gray-800 sm:rounded-md sm:overflow-hidden">
<PlausibleWeb.Components.Billing.Notice.premium_feature
billable_user={@site.owner}
current_user={@current_user}
feature_mod={Plausible.Billing.Feature.Funnels}
/>
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 11:04:35 +03:00
2023-07-27 17:46:32 +03:00
<div class="py-6 px-4 sm:p-6">
<header class="relative">
<h2 class="text-lg leading-6 font-medium text-gray-900 dark:text-gray-100">Funnels</h2>
<p class="mt-1 text-sm leading-5 text-gray-500 dark:text-gray-200">
Compose Goals into Funnels
2023-07-27 17:46:32 +03:00
</p>
Funnel site settings (#3039) * Update formatter config * Install LiveView JS integration & hooks * Temporarily update endpoint/session config * Optionally allow preloading funnels for goals * Site controller * Implement funnel settings lib/plausible_web/live/funnel_settings/combo_box.ex - restored from: 054de6e2 Fix the tab/blur bug again 20da4c89 Rename InputPicker to ComboBox lib/plausible_web/live/funnel_settings/form.ex - restored from: 9bedda3b Remove potential FIXME 20da4c89 Rename InputPicker to ComboBox 028036ad Review comments aea4ebc4 Access Funnel min/max steps via the __using__/1 macro 0dde27fd Remove inspect call eed588a7 Start testing the funnel editor 0e95228b Extract funnel settings test module 7b16ace5 Leverage aplinejs to deal with the tyranny 8dc6a3e7 wip cf228630 wip 30a43fd1 wip 89f10ecb wip 950a18d9 Dirty funnel save 298a6a53 wip 7690d50f wip 639c6238 fixup aa59adeb wip ff75c00b wip lib/plausible_web/live/funnel_settings/list.ex - restored from: 4eae122c Fix data-confirm attr interpolation 51f0397d Implement deleting funnels 1f6fe25d Add number of steps to funnels list 298a6a53 wip ff75c00b wip test/plausible_web/live/funnel_settings/funnel_settings/combo_box_test.exs - restored from: 20da4c89 Rename InputPicker to ComboBox test/plausible_web/live/funnel_settings/funnel_settings_test.exs - restored from: 34822ff4 Bootstrap InputPicker tests lib/plausible_web/live/funnel_settings.ex - restored from: 028036ad Review comments acd9c4f2 Prepare ephemeral funnel definitions so that users can test funnels 51f0397d Implement deleting funnels 0e95228b Extract funnel settings test module 8dc6a3e7 wip 89f10ecb wip 950a18d9 Dirty funnel save 298a6a53 wip aa59adeb wip ff75c00b wip test/plausible_web/controllers/error_report_controller_test.exs - restored from: 34822ff4 Bootstrap InputPicker tests test/support/html.ex - restored from: 0a53979d Improve InputPicker tests - include AlpineJS assertions 34822ff4 Bootstrap InputPicker tests lib/plausible_web/views/layout_view.ex - restored from: b490403b !ifxup lib/plausible_web/templates/site/settings_funnels.html.eex - restored from: 51f0397d Implement deleting funnels ea1315f3 Test funnels list in settings 7b16ace5 Leverage aplinejs to deal with the tyranny ff75c00b wip 4da25c35 Fixup lib/plausible_web/templates/layout/app.html.eex - restored from: ff75c00b wip * Add funnel settings route * Warn about funnels deletion when deleting goals lib/plausible_web/templates/site/settings_goals.html.eex - restored from: fdd9bcd0 Fixup f1e6364d Merge remote-tracking branch 'origin/master' into funnels-rebase 9d0b7c6d Fix markup error 4a4ddbdc Optionally preload funnels for goals and stub funnel-goal deletion ebdc4333 Extend the prompt in case of funnel-goal deletion 639c6238 fixup aa59adeb wip * Split new JS LiveView additions * Put funnels behind a feature flag * Integrate dashboard feature toggle * Update signing salt for live view * Update moduledocs * Update live reloader config * Use Phoenix.HTML.Safe for goal names * Workaround to get flashes working in embedded liveview * Keep feature toggles idempotent, rename property to setting We'll still retain the ability to flip bools on a lower level. * Update moduledocs * Make live flash disappear after 5s * Tailwind: purge .heex files too * Update docs link * Add live components to tailwind purge config * Update another flaky test Ref f0bdf872 cc @vinibrsl * Fix combobox input length w/ WebKit * Intoduce generic notice component * Revert "Fix combobox input length w/ WebKit" This reverts commit 3c653a6d85d5000167631e10ef45a93c13b41ed1. * Fix combobox input length on webkit * Make whole combobox item clickable, not only text * Fix glitch moving Save button on activation * Tweak dark mode * Show funnel form without waiting for funnel name input * Tweak dark mode * Include static Phoenix components in tailwind purge * Tune funnels form into a liveview of its own This is so that ComboBoxes can publish their selections and unavailable choices can be propagated to other siblings. * Push less data over websocket * Undo Lsp/formatter race condition * Fixup typespecs * Bust CI cache
2023-06-22 10:00:07 +03:00
Integrations Settings section (#3427) * Extend the Tokens context module * Extract GA Import to separate component * Extract Search Console settings to separate component * Remove Search Console from the router * Stop counting imported pageviews in general settings * Remove search console controller action * Add settings_integrations controller action * Fix remaining redirects * Add Integrations route * Replace SC sidebar item with Integrations * Update site controller tests * Implement Plugins API Tokens LV * Apply universal heroicon to docs info links * Add flash on token creation * Update CHANGELOG * Redirect to integrations upon forgetting GA import * Update moduledocs * Remove unnecessary wildcards * WIP: attempt at fixing broken oauth flow * Fix post-import redirect * Fixup missing attribute * Format * Seed random google auth * Use example.com for seeded e-mails * Tweak Google integrations layout * Remove dangling IO.inspect * Bugfix: copy to clipboard breaking LV form bindings * Update lib/plausible/plugins/api/tokens.ex Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com> * Update lib/plausible_web/controllers/site_controller.ex Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com> * Update lib/plausible_web/live/plugins/api/settings.ex Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com> * Update test/plausible/plugins/api/tokens_test.exs Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com> --------- Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
2023-10-18 15:01:17 +03:00
<PlausibleWeb.Components.Generic.docs_info slug="funnel-analysis" />
2023-07-27 17:46:32 +03:00
</header>
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 11:04:35 +03:00
2023-07-27 17:46:32 +03:00
<PlausibleWeb.Components.Site.Feature.toggle
feature_mod={Plausible.Billing.Feature.Funnels}
2023-07-27 17:46:32 +03:00
site={@site}
conn={@conn}
>
<%= live_render(@conn, PlausibleWeb.Live.FunnelSettings,
Implement better user password validation (#3344) * Add zxcvbn dependency * Change password length range requirement from 6-64 to 12-128 * Reimplement register form in LV * Implement server-side check for password strength * Add rudimentary strength meter * Make password input with strength a separate component and improve it * Fix existing tests to provide strong enough password * Apply formatting * Replace existing registration form with new one * Hide built-in label in `.input` component when none provided * Crop password to first 32 chars for analysis by zxcvbn * Add tests for new form components * Integrate hCaptcha into LV * Fix existing AuthController tests * Add tests for Live.RegisterForm * Hide strength meter when password input is empty * Randomize client IP in headers during tests to avoid hitting rate limit * Apply auxilliary formatting fixes to AuthController * Integrate registration from invitation into LV registration logic * Fix existing password set and reset forms * Make `password_length_hint` component more customizable * Optimize `Auth.User.set_password/2` * Remove unnecessary attribute from registration form * Move password set and reset forms to LV * Add tests for SetPasswordForm LV component * Add tests for password checks in `Auth.User` * Document code a bit * Implement simpler approach to hCaptcha integration * Update CHANGELOG.md * Improve consistency of color scheme * Introduce debounce across all text inputs in registration and password forms * Fix email input background in register form * Ensure only single error is rendered for empty password confirmation case * Remove `/password` form entirely in favor of preferred password reset * Remove unnecessary `router` option from `live_render` calls * Make expensive assigns in LV with `assign_new` (h/t @aerosol) * Accept passwords longer than 32 bytes uniformly as very strong * Avoid displaying blank error side by side with weak password error * Make register actions handle errors gracefully * Render only a single piece of feedback to reduce noise * Make register and password reset forms pw manager friendly (h/t @cnkk) * Move registration forms to live routes * Delete no longer used deadviews * Adjust registration form in accordance to changes in #3290 * Reintroduce dogfood page path for invitation form from #3290 * Use alternative approach to submitting plausible metrics from LV form * Rename metrics events and extend tests to account for them
2023-09-25 11:27:29 +03:00
session: %{"site_id" => @site.id, "domain" => @site.domain}
2023-07-27 17:46:32 +03:00
) %>
</PlausibleWeb.Components.Site.Feature.toggle>
</div>
</section>