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
Make import date range look non-clickable
Uku Taht826e900c1bb5
diff --git a/lib/plausible_web/controllers/site_controller.ex b/lib/plausible_web/controllers/site_controller.exindex 53f70ffa84..537b67760f 100644--- a/lib/plausible_web/controllers/site_controller.ex+++ b/lib/plausible_web/controllers/site_controller.ex@@ -706,14 +706,15 @@ defmodule PlausibleWeb.SiteController doPlausible.Stats.Clickhouse.pageview_start_date_local(site) || Timex.today(site.timezone){:ok, view_ids} = Plausible.Google.Api.get_analytics_view_ids(access_token)+ {view_id_name, _} = Enum.find(view_ids, fn {k, v} -> v == view_id end)conn|> assign(:skip_plausible_tracking, true)|> render("import_from_google_confirm.html",access_token: access_token,site: site,- view_ids: view_ids,selected_view_id: view_id,+ selected_view_id_name: view_id_name,start_date: start_date,end_date: end_date,layout: {PlausibleWeb.LayoutView, "focus.html"}diff --git a/lib/plausible_web/templates/email/google_analytics_import.html.eex b/lib/plausible_web/templates/email/google_analytics_import.html.eexindex d56f3f0cf4..eaadd1b403 100644--- a/lib/plausible_web/templates/email/google_analytics_import.html.eex+++ b/lib/plausible_web/templates/email/google_analytics_import.html.eex@@ -1,11 +1,11 @@Hey <%= user_salutation(@user) %>,<br /><br /><%= if @success do %>- Your Google Analytics import has completed.- <br /><br />- View dashboard: @link+ Your Google Analytics import has completed successfully. The Plausible dashboard for <%= @site.domain %> now contains historical imported data from <%= date_format(@site.imported_data.start_date) %> to <%= date_format(@site.imported_data.end_date) %>+<br /><br />+<%= link("Click here", to: @link) %> to view your dashboard.<% else %>- Unfortunately, your Google Analytics import failed.+ Unfortunately, your Google Analytics import for <%= @site.domain %> did not complete successfully. Please try again <%= if !Application.get_env(:plausible, :is_selfhost) do %>or <%= link("contact support", to: "https://plausible.io/contact") %><% end %>.<% end %><br /><br />--diff --git a/lib/plausible_web/templates/site/import_from_google_confirm.html.eex b/lib/plausible_web/templates/site/import_from_google_confirm.html.eexindex 7b243ede37..072d998d1e 100644--- a/lib/plausible_web/templates/site/import_from_google_confirm.html.eex+++ b/lib/plausible_web/templates/site/import_from_google_confirm.html.eex@@ -7,27 +7,24 @@<% {:ok, start_date} -> %><div class="mt-6 text-sm text-gray-500 dark:text-gray-200">- Confirm the view and dates in your Google Analytics account to be imported to the Plausible dashboard+ Stats from this property and time period will be imported from your Google Analytics account to your Plausible dashboard</div>- <div class="mt-3">+ <div class="mt-6"><%= styled_label(f, :view_id, "Google Analytics view") %>- <%= styled_select f, :view_display, @view_ids, disabled: "true", selected: @selected_view_id %>+ <span class="block w-full text-base dark:text-gray-100 sm:text-sm dark:bg-gray-800"><%= @selected_view_id_name %></span><%= hidden_input f, :view_id, readonly: "true", value: @selected_view_id %></div>- <div class="mt-6 text-sm text-gray-500 dark:text-gray-200">- Historical data will be imported from your first Google Analytics visitor to your first Plausible visitor- </div><div class="flex justify-between mt-3"><div class="w-36"><%= styled_label f, :start_date, "From" %>- <%= styled_text_input f, :start_date, value: PlausibleWeb.EmailView.date_format(start_date), readonly: "true" %>+ <span class="block w-full text-base dark:text-gray-100 sm:text-sm dark:bg-gray-800"><%= PlausibleWeb.EmailView.date_format(start_date) %></span><%= hidden_input f, :start_date, value: start_date, readonly: "true" %></div>- <div class="align-middle pt-8">→</div>+ <div class="align-middle pt-4 dark:text-gray-100">→</div><div class="w-36"><%= styled_label f, :end_date, "To" %>- <%= styled_text_input f, :end_date, value: PlausibleWeb.EmailView.date_format(@end_date), readonly: "true" %>+ <span class="block w-full text-base dark:text-gray-100 sm:text-sm dark:bg-gray-800"><%= PlausibleWeb.EmailView.date_format(@end_date) %></span><%= hidden_input f, :end_date, value: @end_date, readonly: "true" %></div></div>diff --git a/lib/plausible_web/views/form_helpers.ex b/lib/plausible_web/views/form_helpers.exindex 97cb24ccca..1dc16f75b5 100644--- a/lib/plausible_web/views/form_helpers.ex+++ b/lib/plausible_web/views/form_helpers.ex@@ -10,7 +10,7 @@ defmodule PlausibleWeb.FormHelpers do"mt-1 block w-full px-3 py-2 text-base dark:text-gray-100 dark:border-gray-500 border-gray-300 focus:outline-none sm:text-sm rounded-md"]@active_text_input_class "dark:bg-gray-900 focus:ring-indigo-500 focus:border-indigo-500"- @disabled_text_input_class "bg-gray-100 dark:bg-gray-800 select-none"+ @disabled_text_input_class "bg-gray-100 dark:bg-gray-800 select-none cursor-default"def styled_text_input(form, field, opts \\ []) doopts = merge_opts(@text_input_opts, opts)