<%= form_for @conn, "/", [class: "max-w-md 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 replace the tracking snippet on your site with the following.

<%= textarea f, :domain, id: "snippet_code", class: "transition overflow-hidden bg-gray-100 appearance-none border border-transparent rounded w-full p-2 pr-6 text-gray-700 leading-normal appearance-none focus:outline-none focus:bg-white focus:border-gray-300 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:support@plausible.io", class: "text-indigo-800 underline") %>

<% end %>