Tracking and installation

Understand privacy and masking

Use UserTrail safely by masking sensitive data and respecting consent requirements.

Updated Jun 7, 20263 min read

Default privacy approach

UserTrail is designed for behavior analytics, not for collecting personal information. The goal is to show how visitors use a website: where they click, how far they scroll, which pages cause friction, and where sessions end.

Do not use tracking to collect passwords, card details, authentication codes, medical information, or other sensitive personal data. If a page contains sensitive information, mask it before tracking starts or exclude the page from tracking.

Good default rules are:

  • Do not track password or payment fields.
  • Do not collect full form input values unless there is a clear reason.
  • Avoid recording names, email addresses, phone numbers, addresses, and account identifiers.
  • Mask private page areas such as account dashboards, checkout summaries, and support conversations.
  • Load the tracker only after consent where local rules require consent.

What masking does

Masking prevents selected content from being collected or displayed in reports. A masked element should not expose readable text or private field values in session replay, heatmaps, or related analytics views.

Masking is useful for:

  • form fields
  • account details
  • checkout details
  • profile information
  • private comments or messages
  • customer support content
  • any area where visitors may enter personal data

Mark private elements

Use attributes such as data-analytics-private or data-analytics-mask to identify private content that should not be collected.

Examples:

<div data-analytics-private>
  Private account information
</div>

<input data-analytics-mask name="email" />

<section class="analytics-private">
  Billing details
</section>

Use data-analytics-private for larger areas and data-analytics-mask for individual fields or elements.

Mask form fields

Treat form fields carefully. Even harmless forms can accidentally collect personal data if visitors type names, emails, phone numbers, or order details.

Recommended approach:

  1. Mask all sensitive fields by default.
  2. Only leave non-sensitive fields visible when they are needed for usability analysis.
  3. Avoid collecting free-text values unless the field is designed for public, non-personal feedback.

For forms, the safest setup is to track interaction state, such as focus, hesitation, submit attempts, and submit failures, without collecting the visitor's typed value.

Exclude sensitive pages

Some pages are easier to exclude than mask. Consider excluding:

  • login pages
  • payment pages
  • account settings pages
  • admin portals
  • healthcare, finance, or legal forms
  • pages that show personal customer records

If a page is sensitive but still needs analytics, use broad container-level masking and review a test recording before enabling tracking for real visitors.

Where consent is required, your site should load the tracking script only after the visitor grants analytics consent.

A typical consent flow is:

  1. The visitor lands on your site.
  2. Your consent banner or consent management platform asks for analytics consent.
  3. If consent is granted, your site loads the UserTrail tracking script.
  4. If consent is denied, the UserTrail tracking script is not loaded.

UserTrail should not be used to bypass your consent flow. If your site uses Google Tag Manager or another tag manager, configure the UserTrail tag so it only fires after the correct consent state is active.

Test before going live

Before using UserTrail on production traffic:

  1. Open your own website in a test browser.
  2. Submit test interactions on key pages.
  3. Watch the session replay in UserTrail.
  4. Check that private text and field values are not visible.
  5. Review heatmaps and forms to confirm no sensitive data appears in labels or selectors.

Repeat this check when you redesign forms, add checkout steps, or create new account pages.

Operational checklist

  • Mask private areas before installing on sensitive pages.
  • Use consent mode where required.
  • Exclude pages that should never be recorded.
  • Review test recordings after setup.
  • Recheck masking when forms or page templates change.
  • Keep access to recordings limited to trusted team members.