Skip to content

Commit 22a1fee

Browse files
authored
Bring back trigger showing first dashboard launch banner (#6168)
* Bring back trigger showing first dashboard launch banner * Use CSS class instead of onclick event
1 parent 5d857fa commit 22a1fee

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

lib/plausible_web/components/first_dashboard_launch_banner.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ defmodule PlausibleWeb.Components.FirstDashboardLaunchBanner do
2929
x-init={x_init(@site)}
3030
>
3131
<.styled_link
32+
class="plausible-event-name=Weekly+Email+Note+Click"
3233
href={Routes.site_path(PlausibleWeb.Endpoint, :settings_email_reports, @site.domain)}
33-
onclick="plausible('Weekly Email Note Click')"
3434
>
3535
Get weekly traffic summaries by email →
3636
</.styled_link>

lib/plausible_web/live/installation.ex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ defmodule PlausibleWeb.Live.Installation do
8484
{:ok,
8585
assign(socket,
8686
site: site,
87+
site_created?: params["site_created"] == "true",
8788
flow: flow
8889
)}
8990
end
@@ -105,6 +106,7 @@ defmodule PlausibleWeb.Live.Installation do
105106
def render(assigns) do
106107
~H"""
107108
<div>
109+
<PlausibleWeb.Components.FirstDashboardLaunchBanner.set :if={@site_created?} site={@site} />
108110
<PlausibleWeb.Components.FlowProgress.render flow={@flow} current_step="Install Plausible" />
109111
110112
<.focus_box>

0 commit comments

Comments
 (0)