<% else %>
Free trial
- <.link
- href={Routes.billing_path(@conn, :upgrade)}
- class="text-sm text-indigo-500 font-medium"
- >
+ <.styled_link class="text-sm font-medium" href={Routes.billing_path(@conn, :upgrade)}>
Upgrade
-
+
<% end %>
- <%= form_for @changeset, Routes.site_path(@conn, :change_domain_submit, @site.domain), [class: "max-w-lg w-full mx-auto bg-white dark:bg-gray-800 shadow-lg rounded px-8 pt-6 pb-8 mb-4 mt-8"], fn f -> %>
-
Change your website domain
-
-
- <%= label f, :domain, class: "block text-sm font-medium text-gray-700 dark:text-gray-300" %>
-
Just the naked domain or subdomain without 'www'
-
-
- https://
-
- <%= text_input f, :domain, class: "focus:ring-indigo-500 focus:border-indigo-500 dark:bg-gray-800 flex-1 block w-full px-3 py-2 rounded-none rounded-r-md sm:text-sm border-gray-300 dark:border-gray-500 dark:bg-gray-900 dark:text-gray-300", placeholder: "example.com" %>
-
- <%= error_tag f, :domain %>
-
-
-
- Once you change your domain, you must update the JavaScript snippet on your site within 72 hours to guarantee continuous tracking . If you're using the API, please also make sure to update your API credentials.
-
- Visit our documentation for details.
-
-
- <%= submit "Change Domain and add new Snippet →", class: "button mt-4 w-full" %>
-
-
- <%= link "Back to Site Settings", to: Routes.site_path(@conn, :settings_general, @site.domain), class: "text-indigo-500 w-full text-center" %>
-
- <% end %>
-
diff --git a/lib/plausible_web/templates/site/change_domain.html.heex b/lib/plausible_web/templates/site/change_domain.html.heex
new file mode 100644
index 000000000..8ea758763
--- /dev/null
+++ b/lib/plausible_web/templates/site/change_domain.html.heex
@@ -0,0 +1,45 @@
+
+ <%= form_for @changeset, Routes.site_path(@conn, :change_domain_submit, @site.domain), [class: "max-w-lg w-full mx-auto bg-white dark:bg-gray-800 shadow-lg rounded px-8 pt-6 pb-8 mb-4 mt-8"], fn f -> %>
+
Change your website domain
+
+
+ <%= label(f, :domain, class: "block text-sm font-medium text-gray-700 dark:text-gray-300") %>
+
+ Just the naked domain or subdomain without 'www'
+
+
+
+ https://
+
+ <%= text_input(f, :domain,
+ class:
+ "focus:ring-indigo-500 focus:border-indigo-500 dark:bg-gray-800 flex-1 block w-full px-3 py-2 rounded-none rounded-r-md sm:text-sm border-gray-300 dark:border-gray-500 dark:bg-gray-900 dark:text-gray-300",
+ placeholder: "example.com"
+ ) %>
+
+ <%= error_tag(f, :domain) %>
+
+
+
+ Once you change your domain, you must update the JavaScript snippet on your site within 72 hours to guarantee continuous tracking . If you're using the API, please also make sure to update your API credentials.
+
+
+ Visit our
+ <.styled_link new_tab class="text-sm" href="https://plausible.io/docs/change-domain-name/">
+ documentation
+
+ for details.
+
+
+ <%= submit("Change Domain and add new Snippet →", class: "button mt-4 w-full") %>
+
+
+ <.styled_link
+ href={Routes.site_path(@conn, :settings_general, @site.domain)}
+ class="w-full text-center"
+ >
+ Back to Site Settings
+
+
+ <% end %>
+
diff --git a/lib/plausible_web/templates/site/snippet.html.eex b/lib/plausible_web/templates/site/snippet.html.eex
deleted file mode 100644
index c46cea547..000000000
--- a/lib/plausible_web/templates/site/snippet.html.eex
+++ /dev/null
@@ -1,22 +0,0 @@
-
- <%= form_for @conn, "/", [class: "max-w-lg w-full mx-auto bg-white dark:bg-gray-800 shadow-md rounded px-8 pt-6 pb-8 mb-4 mt-8"], fn f -> %>
-
Add JavaScript snippet
-
-
Paste this snippet in the <head> of your website.
-
-
- <%= textarea f, :domain, id: "snippet_code", class: "transition overflow-hidden bg-gray-100 dark:bg-gray-900 appearance-none border border-transparent rounded w-full p-2 pr-6 text-gray-700 dark:text-gray-300 leading-normal appearance-none focus:outline-none focus:bg-white dark:focus:bg-gray-800 focus:border-gray-400 dark:focus:border-gray-500 text-xs mt-4 resize-none", value: render_snippet(@site), rows: 3, readonly: "readonly" %>
-
-
-
-
-
- <%= link("Start collecting data →", class: "button mt-4 w-full", to: "/#{URI.encode_www_form(@site.domain)}") %>
- <% end %>
-
- <%= if @is_first_site do %>
-
- <%= render(PlausibleWeb.AuthView, "_onboarding_steps.html", current_step: 3) %>
-
- <% end %>
-
diff --git a/lib/plausible_web/templates/site/snippet.html.heex b/lib/plausible_web/templates/site/snippet.html.heex
new file mode 100644
index 000000000..6f93026c3
--- /dev/null
+++ b/lib/plausible_web/templates/site/snippet.html.heex
@@ -0,0 +1,73 @@
+
+ <%= form_for @conn, "/", [class: "max-w-lg w-full mx-auto bg-white dark:bg-gray-800 shadow-md rounded px-8 pt-6 pb-8 mb-4 mt-8"], fn f -> %>
+
Add JavaScript snippet
+
+
+ Paste this snippet in the <head> of your website.
+
+
+
+ <%= textarea(f, :domain,
+ id: "snippet_code",
+ class:
+ "transition overflow-hidden bg-gray-100 dark:bg-gray-900 appearance-none border border-transparent rounded w-full p-2 pr-6 text-gray-700 dark:text-gray-300 leading-normal appearance-none focus:outline-none focus:bg-white dark:focus:bg-gray-800 focus:border-gray-400 dark:focus:border-gray-500 text-xs mt-4 resize-none",
+ value: render_snippet(@site),
+ rows: 3,
+ readonly: "readonly"
+ ) %>
+
+
+
+
+
+
+
+
+
+
+
+ On WordPress? We have
+ <.styled_link
+ new_tab
+ class="text-sm"
+ href="https://plausible.io/wordpress-analytics-plugin"
+ >
+ a plugin
+
+
+
+
+ See more
+ <.styled_link new_tab class="text-sm" href="https://plausible.io/docs/integration-guides">
+ integration guides
+
+
+
+ <%= link("Start collecting data →",
+ class: "button mt-4 w-full",
+ to: "/#{URI.encode_www_form(@site.domain)}"
+ ) %>
+ <% end %>
+
+ <%= if @is_first_site do %>
+
+ <%= render(PlausibleWeb.AuthView, "_onboarding_steps.html", current_step: 3) %>
+
+ <% end %>
+