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
Remove verification related feature flags (#4345)
hq1d565175c13c9
diff --git a/config/.env.test b/config/.env.testindex 8fe3862a76..322bcdc60b 100644--- a/config/.env.test+++ b/config/.env.test@@ -23,3 +23,5 @@ S3_REGION=us-east-1S3_ENDPOINT=http://localhost:10000S3_EXPORTS_BUCKET=test-exportsS3_IMPORTS_BUCKET=test-imports++VERIFICATION_ENABLED=truediff --git a/lib/plausible/verification.ex b/lib/plausible/verification.exindex 61df2b9afb..27ceef29ee 100644--- a/lib/plausible/verification.ex+++ b/lib/plausible/verification.ex@@ -4,14 +4,8 @@ defmodule Plausible.Verification do"""use Plausible- @feature_flag :verification-- def enabled?(user) do- enabled_via_config? =- :plausible |> Application.fetch_env!(__MODULE__) |> Keyword.fetch!(:enabled?)-- enabled_for_user? = not is_nil(user) and FunWithFlags.enabled?(@feature_flag, for: user)- enabled_via_config? or enabled_for_user?+ def enabled?() do+ :plausible |> Application.fetch_env!(__MODULE__) |> Keyword.fetch!(:enabled?)endon_ee dodiff --git a/lib/plausible_web/templates/site/settings_email_reports.html.heex b/lib/plausible_web/templates/site/settings_email_reports.html.heexindex 08279318b8..f0e3fea9af 100644--- a/lib/plausible_web/templates/site/settings_email_reports.html.heex+++ b/lib/plausible_web/templates/site/settings_email_reports.html.heex@@ -206,15 +206,13 @@type: :spike) %>-<%= if FunWithFlags.enabled?(:traffic_drop_notifications, for: @site) do %>- <%= render("traffic_change_form",- conn: @conn,- notification: @drop_notification,- site: @site,- heading: "Traffic Drop Notifications",- subtitle: "Get notified when your site has unusually low number of visitors within 12 hours",- toggle_text: "Send notifications of traffic drops",- threshold_label: "12 hours visitor threshold",- type: :drop- ) %>-<% end %>+<%= render("traffic_change_form",+ conn: @conn,+ notification: @drop_notification,+ site: @site,+ heading: "Traffic Drop Notifications",+ subtitle: "Get notified when your site has unusually low number of visitors within 12 hours",+ toggle_text: "Send notifications of traffic drops",+ threshold_label: "12 hours visitor threshold",+ type: :drop+) %>diff --git a/lib/plausible_web/templates/site/settings_general.html.heex b/lib/plausible_web/templates/site/settings_general.html.heexindex 5b1728236f..122e554185 100644--- a/lib/plausible_web/templates/site/settings_general.html.heex+++ b/lib/plausible_web/templates/site/settings_general.html.heex@@ -109,7 +109,7 @@</a></div>- <div :if={Plausible.Verification.enabled?(@current_user)}>+ <div :if={Plausible.Verification.enabled?()}><%= live_render(@conn, PlausibleWeb.Live.Verification,session: %{"open_modal?" => [email protected]["launch_verification"],diff --git a/lib/plausible_web/templates/site/snippet.html.heex b/lib/plausible_web/templates/site/snippet.html.heexindex 729962354d..8f4495ef4f 100644--- a/lib/plausible_web/templates/site/snippet.html.heex+++ b/lib/plausible_web/templates/site/snippet.html.heex@@ -7,11 +7,11 @@<%= form_for @conn, "/", [class: "max-w-lg w-full mx-auto bg-white dark:bg-gray-800 shadow-md rounded px-8 pt-6 pb-8 mb-4 mt-8"], fn f -> %><h2 class="text-xl font-bold dark:text-gray-100">Add JavaScript snippet</h2><div class="mt-4">- <p :if={Plausible.Verification.enabled?(@current_user)} class="dark:text-gray-100">+ <p :if={Plausible.Verification.enabled?()} class="dark:text-gray-100">Include this snippet in the <code><head></code>section of your website.<br />To verify your integration, click the button below to confirm that everything is working correctly.</p>- <p :if={not Plausible.Verification.enabled?(@current_user)} class="dark:text-gray-100">+ <p :if={not Plausible.Verification.enabled?()} class="dark:text-gray-100">Paste this snippet in the <code><head></code> of your website.</p>@@ -65,7 +65,7 @@</p></div><% button_label =- if Plausible.Verification.enabled?(@current_user) do+ if Plausible.Verification.enabled?() do"Verify your integration to start collecting data →"else"Start collecting data →"diff --git a/lib/plausible_web/templates/stats/waiting_first_pageview.html.heex b/lib/plausible_web/templates/stats/waiting_first_pageview.html.heexindex 78b0a14fc0..86c1b06545 100644--- a/lib/plausible_web/templates/stats/waiting_first_pageview.html.heex+++ b/lib/plausible_web/templates/stats/waiting_first_pageview.html.heex@@ -22,7 +22,7 @@</div><% end %><div- :if={not Plausible.Verification.enabled?(assigns[:current_user])}+ :if={not Plausible.Verification.enabled?()}class="bg-white dark:bg-gray-800 shadow-md rounded px-8 pt-6 pb-8 mb-4 mt-16 relative text-center"><h2 class="text-xl font-bold dark:text-gray-100">Waiting for first pageview</h2>@@ -61,7 +61,7 @@</div></div>- <%= if Plausible.Verification.enabled?(assigns[:current_user]),+ <%= if Plausible.Verification.enabled?(),do:live_render(@conn, PlausibleWeb.Live.Verification,session: %{diff --git a/test/test_helper.exs b/test/test_helper.exsindex 60cb5701a9..d4bef15395 100644--- a/test/test_helper.exs+++ b/test/test_helper.exs@@ -1,5 +1,3 @@-FunWithFlags.enable(:verification)-if not Enum.empty?(Path.wildcard("lib/**/*_test.exs")) doraise "Oops, test(s) found in `lib/` directory. Move them to `test/`."end