mirror of
https://github.com/plausible/analytics.git
synced 2024-12-25 18:48:06 +03:00
Minor verification improvements (#4175)
* Handle long domains in verification recommendations * Accept 200 callback status from WP sites
This commit is contained in:
parent
57e28f0da6
commit
12ddec6b77
@ -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
|
||||
|
||||
|
@ -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"
|
||||
},
|
||||
|
@ -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 %>. </span>
|
||||
<.styled_link href={List.first(@interpretation.recommendations).url} new_tab={true}>
|
||||
Learn more
|
||||
|
Loading…
Reference in New Issue
Block a user