How do I install a visitor ID tag on Ruby on Rails?

On Ruby on Rails, your visitor identification tag goes in: app/views/layouts/*.html.erb via javascript_include_tag helper OR app/assets/javascripts/*.js (asset pipeline). The install itself takes minutes; the part that goes wrong on Ruby on Rails is below.

Where the tag goes

  1. app/views/layouts/*.html.erb via javascript_include_tag helper OR app/assets/javascripts/*.js (asset pipeline).
  2. Paste your vendor’s tag snippet exactly as issued. Do not wrap it in extra script tags or reformat it.
  3. Publish or deploy, then verify (below) before trusting data.

What breaks visitor tracking on Ruby on Rails?

Asset pipeline concatenates and fingerprints JS; inline scripts may be ignored unless using script_tag directly in view.

How do you verify the tag fires?

Rails.env test, run rails server, inspect page source for <script> tags with fingerprint digest.

Then run through the labeled QA checklist before you rely on the numbers, and set expectations with the match-rate calculator — no vendor identifies every visitor.

All platform install guides