Minor verification improvements (#4175)

* Handle long domains in verification recommendations

* Accept 200 callback status from WP sites
This commit is contained in:
hq1 2024-06-03 09:24:52 +02:00 committed by GitHub
parent 57e28f0da6
commit 12ddec6b77
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 6 deletions

View File

@ -216,26 +216,28 @@ defmodule Plausible.Verification.Diagnostics do
def interpret(
%__MODULE__{
plausible_installed?: true,
callback_status: 202,
callback_status: callback_status,
snippet_found_after_busting_cache?: true,
wordpress_likely?: true,
wordpress_plugin?: true
},
_url
) do
)
when callback_status in [200, 202] do
error(@errors.cache_wp_plugin)
end
def interpret(
%__MODULE__{
plausible_installed?: true,
callback_status: 202,
callback_status: callback_status,
snippet_found_after_busting_cache?: true,
wordpress_likely?: true,
wordpress_plugin?: false
},
_url
) do
)
when callback_status in [200, 202] do
error(@errors.cache_wp_no_plugin)
end

View File

@ -107,7 +107,7 @@ defmodule Plausible.Verification.Errors do
},
different_data_domain: %{
message: "Your data-domain is different",
recommendation: "Please ensure that the data-domain is an exact match to <%= @domain %>",
recommendation: "Please ensure that the data-domain matches <%= @domain %> exactly",
url:
"https://plausible.io/docs/troubleshoot-integration#have-you-added-the-correct-data-domain-attribute-in-the-plausible-snippet"
},

View File

@ -67,7 +67,11 @@ defmodule PlausibleWeb.Live.Components.Verification do
</p>
<p :if={not @finished?} class="mt-2 animate-pulse" id="progress"><%= @message %></p>
<p :if={@finished? and not @success? and @interpretation} class="mt-2" id="recommendation">
<p
:if={@finished? and not @success? and @interpretation}
class="mt-2 text-ellipsis overflow-hidden"
id="recommendation"
>
<span><%= List.first(@interpretation.recommendations).text %>.&nbsp;</span>
<.styled_link href={List.first(@interpretation.recommendations).url} new_tab={true}>
Learn more