Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
URL generation and configuration
Uku Taht7916e6f44ed5
diff --git a/config/config.exs b/config/config.exsindex 152bd7c82b..d3c8c189b8 100644--- a/config/config.exs+++ b/config/config.exs@@ -19,7 +19,7 @@ config :plausible, :clickhouse,config :plausible, PlausibleWeb.Endpoint,url: [host: System.get_env("HOST", "localhost"),- port: String.to_integer(System.get_env("PORT", "8000"))+ scheme: System.get_env("SCHEME", "http")],http: [port: String.to_integer(System.get_env("PORT", "8000"))diff --git a/lib/plausible_web/templates/site/custom_domain_dns_setup.html.eex b/lib/plausible_web/templates/site/custom_domain_dns_setup.html.eexindex 4fbfc1cc01..b50f1980a5 100644--- a/lib/plausible_web/templates/site/custom_domain_dns_setup.html.eex+++ b/lib/plausible_web/templates/site/custom_domain_dns_setup.html.eex@@ -3,8 +3,8 @@<ol class="list-disc pl-4 my-4"><li>Go to your DNS provider’s website</li><li class="mt-4">Create a new CNAME record for <code><%= @site.custom_domain.domain %></code></li>- <li class="mt-4">Point the record to <code>custom.<%= plausible_url() %>.</code> (including the dot)</li>+ <li class="mt-4">Point the record to <code>custom.<%= base_domain() %>.</code> (including the dot)</li></ol><%= link("Done ->", to: "/sites/#{URI.encode_www_form(@site.domain)}/custom-domains/snippet", class: "button w-full mt-6") %>-</div>\ No newline at end of file+</div>diff --git a/lib/plausible_web/templates/site/settings.html.eex b/lib/plausible_web/templates/site/settings.html.eexindex 2fb4acf47f..cd2439dcfc 100644--- a/lib/plausible_web/templates/site/settings.html.eex+++ b/lib/plausible_web/templates/site/settings.html.eex@@ -35,7 +35,7 @@<%= if @site.public do %>Stats for <%= @site.domain %> are currently <b>public</b>. Anyone with the following link can view the stats:<div class="relative text-sm mt-4">- <input type="text" id="public-link" value="<%= base_domain() <> "/" <> URI.encode_www_form(@site.domain)%>" class="transition bg-gray-100 appearance-none border border-transparent rounded w-full p-2 pr-16 text-gray-700 appearance-none focus:outline-none" />+ <input type="text" id="public-link" value="<%= plausible_url() <> "/" <> URI.encode_www_form(@site.domain)%>" class="transition bg-gray-100 appearance-none border border-transparent rounded w-full p-2 pr-16 text-gray-700 appearance-none focus:outline-none" /><a onclick="var input = document.getElementById('public-link'); input.focus(); input.select(); document.execCommand('copy');" href="javascript:void(0)" class="absolute right-0 text-indigo-700 font-bold p-2"><svg class="feather-sm"><use xlink:href="#feather-copy" /></svg></a>