<%= @total_visitors %> new visitors from Google
<%= timeframe_to_human(@query) %>
<%= case @search_terms do %> <% {:ok, []} -> %>
Search term
Visitors
Could not find any search terms for this period
Search term
Visitors
<%= for {term, count} <- search_terms do %>
<%= term %>
<%= count %>
<%= bar(count, search_terms) %>
<% end %>
<% {:error, msg} -> %>
Unable to show search terms. Google Search Console API returned the following error:
<%= msg %>
<% nil -> %>
<%= if @conn.assigns[:current_user] && Plausible.Sites.is_owner?(@conn.assigns[:current_user].id, @site) do %>
You can link your Google account to see the search terms that lead to your website.
<%= link("Connect with Google", to: "/#{@site.domain}/settings#google-auth", class: "button mt-4") %>
<% end %>
<% end %>