diff --git a/config/.env.test b/config/.env.test index 8fe3862a7..322bcdc60 100644 --- a/config/.env.test +++ b/config/.env.test @@ -23,3 +23,5 @@ S3_REGION=us-east-1 S3_ENDPOINT=http://localhost:10000 S3_EXPORTS_BUCKET=test-exports S3_IMPORTS_BUCKET=test-imports + +VERIFICATION_ENABLED=true diff --git a/lib/plausible/verification.ex b/lib/plausible/verification.ex index 61df2b9af..27ceef29e 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?) end on_ee do diff --git a/lib/plausible_web/templates/site/settings_email_reports.html.heex b/lib/plausible_web/templates/site/settings_email_reports.html.heex index 08279318b..f0e3fea9a 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.heex index 5b1728236..122e55418 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 @@ -
+
Include this snippet in the <head>
section of your website.
To verify your integration, click the button below to confirm that everything is working correctly.
+
Paste this snippet in the <head>
of your website.