Tracking and installation

Install UserTrail on WooCommerce

Add UserTrail to a WooCommerce store through WordPress and confirm ecommerce sessions are recording.

Updated Jun 19, 20262 min read

Before you start

WooCommerce runs on WordPress, so you can install UserTrail the same way you would install most website tracking scripts.

Create a site in UserTrail and copy the tracking snippet before editing WordPress.

Install with a header scripts plugin

The simplest option is usually a trusted header scripts plugin.

General steps:

  1. Open WordPress admin.
  2. Install or open your header/footer scripts plugin.
  3. Paste the UserTrail snippet into the header area.
  4. Save changes.
  5. Clear cache if your site uses a caching plugin.
  6. Visit the storefront and test recording.

Install in the theme

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

Use a child theme when possible so theme updates do not remove the snippet.

WooCommerce privacy notes

Be careful with cart, checkout, account, and payment pages. These pages may contain personal or payment-related information.

Recommended approach:

  • mask private fields
  • avoid recording payment details
  • check checkout recordings before collecting real visitor data
  • use consent mode where required

Verify recording

Test a normal shopping journey:

  1. Open a product page.
  2. Add a product to cart.
  3. View cart.
  4. Start checkout only if privacy masking is configured.
  5. Check UserTrail Sessions and Heatmaps.

Troubleshooting

If recording does not start:

  • clear WordPress and CDN cache
  • confirm the snippet is present in page source
  • check consent plugin rules
  • disable test browser extensions
  • confirm the site id matches UserTrail
  • check whether a security plugin blocks the script