Skip to content

Commit

Permalink
Do a test of route based "urls" being sent to plausible
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Nov 19, 2024
1 parent 7ddd4d4 commit 763ce1d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/views/application/_html_head.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@
<%= render "google_tag_manager" %>
<% if Rails.env.production? %>
<%# plausible.io analytics %>
<script defer event-signed_in="<%= user_signed_in?.to_s %>" data-domain="planningalerts.org.au" src="/js/script.outbound-links.pageview-props.js"></script>
<%# TODO: Reinstate outbound link tracking and tracking of whether user is signed in %>
<script defer data-domain="planningalerts.org.au" src="/js/script.manual.js"></script>
<script>
window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }
plausible('pageview', { u: "https://www.planningalerts.org.au<%= request.route_uri_pattern.gsub("(.:format)", "") %>" });
</script>
<% end %>

<%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
Expand Down

0 comments on commit 763ce1d

Please sign in to comment.