diff --git a/lib/plausible_web/controllers/site_controller.ex b/lib/plausible_web/controllers/site_controller.ex index 31cdabd57..709602606 100644 --- a/lib/plausible_web/controllers/site_controller.ex +++ b/lib/plausible_web/controllers/site_controller.ex @@ -92,6 +92,7 @@ defmodule PlausibleWeb.SiteController do def settings_general(conn, %{"website" => website}) do site = Sites.get_for_user!(conn.assigns[:current_user].id, website) + |> Repo.preload(:custom_domain) conn |> assign(:skip_plausible_tracking, true) @@ -168,15 +169,6 @@ defmodule PlausibleWeb.SiteController do |> render("settings_custom_domain.html", site: site, layout: {PlausibleWeb.LayoutView, "site_settings.html"}) end - def settings_snippet(conn, %{"website" => website}) do - site = Sites.get_for_user!(conn.assigns[:current_user].id, website) - |> Repo.preload(:custom_domain) - - conn - |> assign(:skip_plausible_tracking, true) - |> render("settings_snippet.html", site: site, layout: {PlausibleWeb.LayoutView, "site_settings.html"}) - end - def settings_danger_zone(conn, %{"website" => website}) do site = Sites.get_for_user!(conn.assigns[:current_user].id, website) diff --git a/lib/plausible_web/router.ex b/lib/plausible_web/router.ex index c7f069545..ffe9f431e 100644 --- a/lib/plausible_web/router.ex +++ b/lib/plausible_web/router.ex @@ -151,7 +151,6 @@ defmodule PlausibleWeb.Router do get "/:website/settings/search-console", SiteController, :settings_search_console get "/:website/settings/email-reports", SiteController, :settings_email_reports get "/:website/settings/custom-domain", SiteController, :settings_custom_domain - get "/:website/settings/js-snippet", SiteController, :settings_snippet get "/:website/settings/danger-zone", SiteController, :settings_danger_zone get "/:website/goals/new", SiteController, :new_goal post "/:website/goals", SiteController, :create_goal diff --git a/lib/plausible_web/templates/layout/site_settings.html.eex b/lib/plausible_web/templates/layout/site_settings.html.eex index e4c7430d2..67d66898e 100644 --- a/lib/plausible_web/templates/layout/site_settings.html.eex +++ b/lib/plausible_web/templates/layout/site_settings.html.eex @@ -30,7 +30,6 @@ <%= render("_settings_tab.html", this_tab: "search-console", text: "Search Console", site: @site, conn: @conn) %> <%= render("_settings_tab.html", this_tab: "email-reports", text: "Email reports", site: @site, conn: @conn) %> <%= render("_settings_tab.html", this_tab: "custom-domain", text: "Custom domain", site: @site, conn: @conn) %> - <%= render("_settings_tab.html", this_tab: "js-snippet", text: "JS snippet", site: @site, conn: @conn) %> <%= render("_settings_tab.html", this_tab: "danger-zone", text: "Danger zone", site: @site, conn: @conn) %> diff --git a/lib/plausible_web/templates/site/settings_general.html.eex b/lib/plausible_web/templates/site/settings_general.html.eex index e0fe9c2f4..32282163d 100644 --- a/lib/plausible_web/templates/site/settings_general.html.eex +++ b/lib/plausible_web/templates/site/settings_general.html.eex @@ -10,8 +10,7 @@
Include this snippet in the <head>
of your website.
Include this snippet in the <head>
of your website.