How do I install a visitor ID tag on Drupal?

On Drupal, your visitor identification tag goes in: Create *.libraries.yml file in module/theme root, define JS files, attach via hook_page_attachments() or template. The install itself takes minutes; the part that goes wrong on Drupal is below.

Where the tag goes

  1. Create *.libraries.yml file in module/theme root, define JS files, attach via hook_page_attachments() or template.
  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 Drupal?

JavaScript must be defined in library YAML and attached via hooks; inline script tags in templates are not automatically processed by Drupal's asset system.

How do you verify the tag fires?

Clear cache (drush cr) and inspect page source to verify <script> tag includes your library file.

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