Stats for <%= @site.domain %> are currently private. You are the only person who can see them.
If you choose to make your stats public, anyone with the link will be able to view them.
<%= button("Make stats public", to: "/sites/#{URI.encode_www_form(@site.domain)}/make-public", method: "POST", class: "button mt-8") %>
<% end %>
Shared links
You can share your stats privately by generating a shared link. The links are impossible to guess and
you can add password protection for extra security.
<%= for link <- @shared_links do %>
<%= button(to: "/sites/#{URI.encode_www_form(@site.domain)}/shared-links/#{link.slug}", method: :delete, class: "py-2 px-4 bg-gray-200 text-red-600 rounded-l-none", data: [confirm: "Are you sure you want to delete this shared link? The stats will not be accessible with this link anymore."]) do %>
<% end %>
<% end %>
<%= link("+ New link", to: "/sites/#{URI.encode_www_form(@site.domain)}/shared-links/new", class: "button mt-4") %>
Goals
<%= if Enum.count(@goals) > 0 do %>
<%= for goal <- @goals do %>
<%= goal_name(goal) %>
<%= button("❌", to: "/#{URI.encode_www_form(@site.domain)}/goals/#{goal.id}", method: :delete, class: "text-sm", data: [confirm: "Are you sure you want to remove goal #{goal_name(goal)}? This will just affect the UI, all of your analytics data will stay intact."]) %>
<% end %>
<% else %>
No goals configured for this site yet
<% end %>
<%= link("+ Add goal", to: "/#{URI.encode_www_form(@site.domain)}/goals/new", class: "button mt-6") %>
Google Integration
Integrating with your Google account allows Plausible to show more information about your websites' performance on their search engine.
<%= if @site.google_auth do %>
Connected Google account: <%= @site.google_auth.email %>
<%= if @site.google_auth.property && !(@site.google_auth.property in @search_console_domains) do %>
NB: Your Google account does not have access to your currently configured property, <%= @site.google_auth.property %>. Please select a verified property from the list below.
<% else %>
Select the Google Search Console property you would like to pull keyword data from. If you don't see your domain, <%= link("set it up and verify", to: "https://docs.plausible.io/google-search-console-integration#1-add-your-site-on-the-search-console", class: "text-indigo-500") %> on Search Console first.
<% end %>
<%= form_for Plausible.Site.GoogleAuth.changeset(@site.google_auth), "/#{URI.encode_www_form(@site.domain)}/settings/google", [class: "max-w-xs"], fn f -> %>
<%= submit "Save", class: "button" %>
<% end %>
<% else %>
<%= button("Continue with Google", to: Plausible.Google.Api.authorize_url(@site.id), class: "button mt-4") %>
NB: You also need to set up your site on <%= link("Google Search Console", to: "https://search.google.com/search-console/about") %> for the integration to work. <%= link("Read the docs", to: "https://docs.plausible.io/google-search-console-integration", class: "text-indigo-500") %>
<% end %>
Email reports
<%= if @weekly_report do %>
<%= button(to: "/sites/#{URI.encode_www_form(@site.domain)}/weekly-report/disable", method: :post, class: "border rounded-full border-gray-300 flex items-center cursor-pointer w-8 bg-green-500 justify-end") do %>
<% end %>
<% else %>
<%= button(to: "/sites/#{URI.encode_www_form(@site.domain)}/weekly-report/enable", method: :post, class: "border rounded-full border-gray-300 flex items-center cursor-pointer w-8 justify-start") do %>
<% end %>
<% end %>
Send a weekly email report every Monday
<%= if @weekly_report do %>
Weekly report recipients
<%= for recipient <- @weekly_report.recipients do %>
<%= recipient %>
<%= button("❌", to: "/sites/#{URI.encode_www_form(@site.domain)}/weekly-report/recipients/#{recipient}", method: :delete) %>
<% end %>
<%= form_for @conn, "/sites/#{URI.encode_www_form(@site.domain)}/weekly-report/recipients", fn f -> %>
Some browsers and extensions block all analytics services, including privacy-friendly ones like Plausible.
To get around that, we offer a quick and easy way to serve the script from your custom domain. As a result, your stats are never blocked by clients because they are proxied through your subdomain.
<%= if @site.custom_domain do %>
Configured domain: <%= @site.custom_domain.domain %>
<% else %>
<%= link("Add custom domain", to: "/sites/#{URI.encode_www_form(@site.domain)}/custom-domains/new", class: "button") %>
<% end %>
Deleting the site removes all stats you've collected
<%= link "Delete #{@site.domain}", to: "/#{URI.encode_www_form(@site.domain)}", method: :delete, class: "button bg-red-600 mt-6", data: [confirm: "Deleting the site data cannot be reversed. Are you sure?"] %>