<%= form_for @conn, "/", [class: "max-w-sm w-full mx-auto bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4 mt-8"], fn f -> %>

Update javascript snippet

Allow up to 4 hours for DNS changes to propagate and for us to obtain an SSL certificate for <%= @site.custom_domain.domain %>

The setup is working when <%= @site.custom_domain.domain %>/js/plausible.js loads the javascript tracker.

To finish your setup, please update the tracking snippet on your site with your custom domain.

<%= textarea f, :domain, id: "snippet_code", class: "transition overflow-hidden bg-grey-lighter appearance-none border border-transparent rounded w-full p-2 pr-6 text-grey-darker leading-normal appearance-none focus:outline-none focus:bg-white focus:border-grey-light text-xs mt-4 resize-none", value: snippet(@site), rows: 2, readonly: "readonly" %>
<%= link("Back to settings →", class: "button mt-4 w-full", to: "/#{URI.encode_www_form(@site.domain)}/settings#custom-domain") %>

Problems? <%= link("Get help via email", to: "mailto:uku@plausible.io", class: "text-indigo-darker underline") %>

<% end %>