diff --git a/assets/js/app.js b/assets/js/app.js
index eaad0400b..ac96c343b 100644
--- a/assets/js/app.js
+++ b/assets/js/app.js
@@ -18,6 +18,13 @@ if (document.querySelectorAll('[data-modal]').length > 0) {
new CustomEvent('close-modal', { bubbles: true, detail: e.detail.id })
)
})
+ window.addEventListener(`phx:open-modal`, (e) => {
+ document
+ .getElementById(e.detail.id)
+ .dispatchEvent(
+ new CustomEvent('open-modal', { bubbles: true, detail: e.detail.id })
+ )
+ })
}
const triggers = document.querySelectorAll('[data-dropdown-trigger]')
diff --git a/lib/plausible_web/live/components/modal.ex b/lib/plausible_web/live/components/modal.ex
index e7d76d65f..eb8103058 100644
--- a/lib/plausible_web/live/components/modal.ex
+++ b/lib/plausible_web/live/components/modal.ex
@@ -106,6 +106,11 @@ defmodule PlausibleWeb.Live.Components.Modal do
end
end
+ @spec open(Phoenix.LiveView.Socket.t(), String.t()) :: Phoenix.LiveView.Socket.t()
+ def open(socket, id) do
+ Phoenix.LiveView.push_event(socket, "open-modal", %{id: id})
+ end
+
@spec close(Phoenix.LiveView.Socket.t(), String.t()) :: Phoenix.LiveView.Socket.t()
def close(socket, id) do
Phoenix.LiveView.push_event(socket, "close-modal", %{id: id})
diff --git a/lib/plausible_web/live/verification.ex b/lib/plausible_web/live/verification.ex
index 094524955..de294d85d 100644
--- a/lib/plausible_web/live/verification.ex
+++ b/lib/plausible_web/live/verification.ex
@@ -34,6 +34,14 @@ defmodule PlausibleWeb.Live.Verification do
launch_delayed(socket)
end
+ socket =
+ if connected?(socket) and !!session["modal?"] and !!session["open_modal?"] do
+ launch_delayed(socket)
+ Modal.open(socket, "verification-modal")
+ else
+ socket
+ end
+
{:ok, socket}
end
diff --git a/lib/plausible_web/templates/email/drop_notification.html.eex b/lib/plausible_web/templates/email/drop_notification.html.eex
index 45a97075d..e6464fee8 100644
--- a/lib/plausible_web/templates/email/drop_notification.html.eex
+++ b/lib/plausible_web/templates/email/drop_notification.html.eex
@@ -4,6 +4,5 @@ We've recorded <%= @current_visitors %> visitors on <%= link(@site.domain, to: "
View dashboard: <%= link(@dashboard_link, to: @dashboard_link) %>
-Something looks off? Please use our integration testing tool to verify that Plausible has been integrated correctly:
-<%= link(@settings_link, to: @settings_link) %>
+Something looks off? Please use our <%= link("integration testing tool", to: @settings_link) %> to verify that Plausible has been integrated correctly.
<% end %>
diff --git a/lib/plausible_web/templates/site/settings_general.html.heex b/lib/plausible_web/templates/site/settings_general.html.heex
index 3970e83c7..5b1728236 100644
--- a/lib/plausible_web/templates/site/settings_general.html.heex
+++ b/lib/plausible_web/templates/site/settings_general.html.heex
@@ -112,6 +112,7 @@