Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

name the site and link its dashboard in the first visitor email (#6734)

Marko Saricfc0df9283853
diff --git a/lib/plausible_web/templates/email/site_setup_success_email.html.heex b/lib/plausible_web/templates/email/site_setup_success_email.html.heex
index a9420a7aaa..4e0a83f6cf 100644
--- a/lib/plausible_web/templates/email/site_setup_success_email.html.heex
+++ b/lib/plausible_web/templates/email/site_setup_success_email.html.heex
@@ -1,4 +1,6 @@
-Your first visitor is now visible in Plausible.<br /><br />
+Your first visitor on {@site.domain} is now visible in Plausible.<br /><br />
See where visitors come from, which pages they visit and which goals they complete, all in one simple dashboard.<br /><br />
Everything is designed to be understood at a glance. No custom reports. No digging through menus.<br /><br />
-<a href={plausible_url()}>View your Plausible dashboard</a>
+<a href={stats_url(@site.domain)}>
+ View your Plausible dashboard
+</a>
diff --git a/test/plausible_web/email_test.exs b/test/plausible_web/email_test.exs
index ce1bf15d78..dbefcbcbab 100644
--- a/test/plausible_web/email_test.exs
+++ b/test/plausible_web/email_test.exs
@@ -554,7 +554,10 @@ defmodule PlausibleWeb.EmailTest do
test "site setup success email", %{user: user, site: site} do
email = PlausibleWeb.Email.site_setup_success(user, site)
- assert email.html_body =~ "Your first visitor is now visible in Plausible."
+ assert email.html_body =~
+ "Your first visitor on #{site.domain} is now visible in Plausible."
+
+ assert email.html_body =~ "/#{URI.encode_www_form(site.domain)}\""
end
end