<%= 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 href="https://plausible.io/docs/change-domain-name/"> documentation for details.

Change Domain and add new Snippet →
<.styled_link href={Routes.site_path(@conn, :settings_general, @site.domain)}> Back to Site Settings
<% end %>