diff --git a/lib/plausible_web/controllers/site_controller.ex b/lib/plausible_web/controllers/site_controller.ex index 6ac028e55..32c058716 100644 --- a/lib/plausible_web/controllers/site_controller.ex +++ b/lib/plausible_web/controllers/site_controller.ex @@ -33,19 +33,6 @@ defmodule PlausibleWeb.SiteController do |> render("snippet.html", site: site, layout: {PlausibleWeb.LayoutView, "focus.html"}) end - def goals(conn, %{"website" => website}) do - site = Sites.get_for_user!(conn.assigns[:current_user].id, website) - goals = Goals.for_site(site.domain) - - conn - |> assign(:skip_plausible_tracking, true) - |> render("goal_settings.html", - site: site, - goals: goals, - layout: {PlausibleWeb.LayoutView, "focus.html"} - ) - end - def new_goal(conn, %{"website" => website}) do site = Sites.get_for_user!(conn.assigns[:current_user].id, website) changeset = Plausible.Goal.changeset(%Plausible.Goal{}) @@ -66,7 +53,7 @@ defmodule PlausibleWeb.SiteController do {:ok, _} -> conn |> put_flash(:success, "Goal created succesfully") - |> redirect(to: "/#{website}/goals") + |> redirect(to: "/#{website}/settings") {:error, :goal, changeset, _} -> conn |> assign(:skip_plausible_tracking, true) @@ -83,7 +70,7 @@ defmodule PlausibleWeb.SiteController do conn |> put_flash(:success, "Goal deleted succesfully") - |> redirect(to: "/#{website}/goals") + |> redirect(to: "/#{website}/settings") end def settings(conn, %{"website" => website}) do @@ -98,6 +85,7 @@ defmodule PlausibleWeb.SiteController do weekly_report_changeset = weekly_report && Plausible.Site.WeeklyReport.changeset(weekly_report, %{}) monthly_report = Repo.get_by(Plausible.Site.MonthlyReport, site_id: site.id) monthly_report_changeset = monthly_report && Plausible.Site.WeeklyReport.changeset(monthly_report, %{}) + goals = Goals.for_site(site.domain) conn |> assign(:skip_plausible_tracking, true) @@ -106,6 +94,7 @@ defmodule PlausibleWeb.SiteController do weekly_report_changeset: weekly_report_changeset, monthly_report_changeset: monthly_report_changeset, search_console_domains: search_console_domains, + goals: goals, changeset: Plausible.Site.changeset(site, %{}) ) end diff --git a/lib/plausible_web/templates/page/index.html.eex b/lib/plausible_web/templates/page/index.html.eex index cf8f9a127..78f70044c 100644 --- a/lib/plausible_web/templates/page/index.html.eex +++ b/lib/plausible_web/templates/page/index.html.eex @@ -99,9 +99,9 @@ -
- Keep an eye on your traffic with a weekly email report including pageviews, visitor numbers, top pages and top referrers for the week. + Find out which referrers are driving the most conversions to your site. Works with custom events or page URLs you want your visitors to reach.
@@ -119,9 +119,9 @@ -- Plausible is built with modern web frameworks in mind and it works automatically with any pushState based router on the frontend. + Keep an eye on your traffic with a weekly email report including pageviews, visitor numbers, top pages and top referrers for the week.
diff --git a/lib/plausible_web/templates/site/goal_settings.html.eex b/lib/plausible_web/templates/site/goal_settings.html.eex deleted file mode 100644 index 0fca28c07..000000000 --- a/lib/plausible_web/templates/site/goal_settings.html.eex +++ /dev/null @@ -1,23 +0,0 @@ -<%= if get_flash(@conn, :success) do %> -<%= get_flash(@conn, :success) %>
-