Tracking and installation

Install UserTrail on WordPress

Add the UserTrail tracking snippet to WordPress using a plugin, theme, or tag manager.

Updated Jun 19, 20262 min read

Choose an installation method

WordPress supports several ways to install UserTrail:

  • header scripts plugin
  • theme header file
  • child theme
  • Google Tag Manager
  • custom site integration

For most users, a header scripts plugin or Google Tag Manager is the easiest option.

Install with a plugin

General steps:

  1. Open WordPress admin.
  2. Install a plugin that lets you add scripts to the site header.
  3. Paste the UserTrail snippet into the header scripts field.
  4. Save changes.
  5. Clear any page cache.
  6. Visit the live site and test recording.

Add the snippet to the header so it loads on every page you want to track.

Install with theme code

If you manage code directly, add the snippet before the closing </head> tag in the shared theme header.

Use a child theme where possible. Direct edits to a parent theme can be overwritten by theme updates.

Install with Google Tag Manager

Create a Custom HTML tag, paste the UserTrail snippet, choose the correct trigger, and publish the container.

If your site requires analytics consent, configure the tag so it only fires after consent is granted.

Verify installation

After installing:

  1. Visit the live WordPress site.
  2. Click and scroll on a tracked page.
  3. Wait for event processing.
  4. Open UserTrail Sessions.
  5. Confirm the page appears in Heatmaps.

Common WordPress issues

If data does not appear:

  • clear cache plugins
  • clear CDN cache
  • confirm the snippet appears in page source
  • check consent plugin settings
  • check security plugin blocking rules
  • confirm the snippet is installed on the active theme
  • test without ad blockers

Privacy

Mask sensitive forms, account pages, and checkout pages. WordPress sites often include plugins that add forms or member areas, so review recordings after setup.