Documentation
Add analytics to Rails
The application layout's head, above the asset tags.
The application layout's head, above the asset tags. Every view rendered through that layout is then covered.
If you have a Content Security Policy configured through csp_meta_tag, the collector's origin needs adding to script-src — otherwise the browser blocks the tag and nothing is reported.
app/views/layouts/application.html.erb
<%# app/views/layouts/application.html.erb %>
<head>
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<!-- Inqetra -->
<script defer src="https://collect.inqetra.com/inqetra.js" data-site="9f1c4b2e-7a30-4d51-b8c6-2e5a0d7f3c11"></script>
</head>Worth knowing
9f1c4b2e-7a30-4d51-b8c6-2e5a0d7f3c11 is a placeholder. Yours is issued when you add a domain and is shown in the dashboard next to the snippet.
After it is in
Load a page and check the realtime view: it counts the last five minutes, so your own visit should appear within seconds. Then custom events covers naming the things that matter to you.