Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Session recording capturing card or password fields: how to fix

OPS-204High impactCould addBy FunnelGuardPublished Updated
On this page

What this issue is

A session recording tool (also called session replay) adds a script to your site that records how visitors use it: clicks, scrolls and sometimes keystrokes. You watch the sessions later to see where people get stuck. Examples include Hotjar, Microsoft Clarity, FullStory and Smartlook.

The problem appears when the recording includes what people type into form fields. A card number, expiry date, CVV, password, email or address can end up stored on the vendor's servers, and visible to anyone on your team with access to the tool.

It often happens quietly. Masking defaults differ by tool and setting. Custom checkouts, embedded payment forms, fields with unusual names, and content loaded after the page starts can slip through.

How card data ends up in a recording
  1. Visitor types card numberCheckout form field
  2. Replay script reads inputMasking off or field not covered
  3. Sent to vendor serversStored with the session
  4. Visible to your teamPlayback shows the digits

The leak happens at the recording step, long before anyone notices.

Why it costs you leads or sales

This issue rarely drops conversions directly. The cost is legal, financial and reputational, and it can force you to change how you track users.

What can go wrong
  • Card data stored by a tool that is not part of your payment setup can create problems with card scheme rules (PCI DSS) and with your payment provider.
  • Passwords and personal data stored without a clear purpose can breach privacy laws such as GDPR.
  • A vendor breach or a staff member with replay access exposes real customer data.
  • Regulators or your payment provider may ask you to stop recording on checkout pages, which removes insight exactly where you need it.
  • Customers who learn their card was recorded lose trust and do not come back.

How to check if your site has it

Audit your recordings
  1. List every replay tool on your site

    Check Google Tag Manager, your theme or plugin settings and the page source for scripts from Hotjar, Clarity, FullStory, Smartlook, Mouseflow, Lucky Orange or similar. Also ask your team what they installed.

  2. Watch recent checkout and login sessions

    Filter recordings by URLs such as /checkout, /cart, /login, /account. Play several and look at the form fields while the visitor types.

  3. Look for readable text in inputs

    Real digits, plain-text passwords, names, emails or addresses mean masking is not working. Asterisks or blocks mean the field is masked.

  4. Test it yourself with fake data

    Use a test card number from your payment provider's docs, or a made-up value, in a staging or live form. Wait for the session to appear, then play it back.

  5. Check embedded payment forms

    Fields inside an iframe from your payment provider (Stripe, for example) are normally outside the reach of your page scripts. Fields rendered directly in your own page are not.

  6. Search the tool's data

    Some tools let you search or filter text inputs or export events. Look for patterns like 16-digit numbers.

How to fix it

Work in this order: stop new capture, then clean up old data. Setting names change over time, so check your tool's current documentation if a menu differs from what is described here.

Stop sensitive data being recorded
  1. Turn on the strictest masking

    In your replay tool's privacy settings, choose the option that masks all text input (and ideally all text) by default. Hotjar suppresses keystrokes and masks some fields by default, and Clarity has masking modes (Strict, Balanced, Relaxed). Pick the strictest and confirm it in the settings.

  2. Tag sensitive elements explicitly

    Add the tool's suppression attribute to card, password, address and account fields or their wrapper. For example Hotjar uses data-hj-suppress, Clarity uses data-clarity-mask="True" and FullStory uses the fs-exclude class.

  3. Exclude whole sensitive pages

    If you cannot be sure of masking, stop recording on checkout, payment, login and account URLs. Most tools let you set URL rules, or you can load the script only on other pages.

  4. Use hosted payment fields

    Where possible, use your payment provider's hosted fields or redirect so card inputs live in the provider's iframe, not in your page.

  5. Delete data already captured

    Delete affected recordings in the tool, or ask the vendor's support to purge them. Reduce who has access and shorten the retention period.

  6. Tell the right people

    If real card data was stored, contact your payment provider and whoever handles compliance or data protection for your business.

Example: marking fields as sensitive (attribute names differ per tool)html
<!-- Hotjar -->
<input type="text" name="card_number" data-hj-suppress>

<!-- Microsoft Clarity -->
<input type="text" name="card_number" data-clarity-mask="True">

<!-- FullStory -->
<input type="text" name="card_number" class="fs-exclude">
Where to make the change on your platform
  1. Find how the tool is installed

    Check the plugin list for an official plugin (for example Hotjar or Clarity) or a code snippet in your theme or a header/footer plugin.

  2. Change privacy settings in the tool

    Set masking in the vendor dashboard, not in WordPress. Then add suppression attributes to custom form fields through your form plugin's field settings or theme template.

  3. Exclude checkout pages

    For WooCommerce, stop the script loading on the cart, checkout and my-account pages with the plugin's page rules or a conditional in your theme.

Recording a checkout session

Before

  • Card number visible as typed digits in playback
  • Password field shown in plain text
  • Replay script loads on every page
  • Old recordings kept indefinitely

After

  • Inputs masked in playback
  • Sensitive fields tagged with suppression attributes
  • Script excluded from checkout and login
  • Old sensitive recordings deleted, short retention set

How to confirm it's fixed

Verify after the change
  1. Run a fresh test

    Complete a checkout or login with fake data in a private browser window. Wait for the new session to appear.

  2. Play it back

    Every sensitive field should show as masked, blank or hidden. Check each form step, including address and account fields.

  3. Check the network request

    If you excluded pages, open browser DevTools > Network on the checkout page and confirm no requests go to the replay vendor's domain.

  4. Confirm old data is gone

    Search the tool again for previously affected sessions and confirm they were deleted.

How to prevent it happening again

Ongoing habits
  • Keep masking on strict by default and only unmask specific non-sensitive elements.
  • Add the suppression attribute to new forms as part of your launch checklist.
  • Review replay tools after any checkout, theme or form redesign.
  • Limit who can view recordings and set a short retention period.
  • Control who can edit your tag manager container, since a new replay tag can be added there.
  • Review recordings of checkout and login monthly with fake data tests.
  • Check your privacy policy and consent banner cover session recording.

How FunnelGuard handles this

FunnelGuard does not check for this yet. It cannot tell you whether a session recording tool is capturing card or password fields. It is a possible future check.

What FunnelGuard does nearby: a robot visitor runs your real customer journeys on a schedule, such as lead forms and checkouts, and checks each step, the tracking hits to ad and analytics platforms, and whether test leads reach your inbox and CRM. If a change to your checkout or tag setup breaks a step, you get one alert with a screenshot and a likely cause. It never enters real card details and stops before payment unless your store's test mode is set up.

To watch for this issue today, put a monthly reminder in your calendar to run the fake-data test above, watch the playback, and review which scripts load on your checkout. Your replay tool's own privacy settings and your browser's DevTools Network tab are the best manual checks.

Questions people ask

Can session recording tools capture credit card numbers?

Yes, if the card field is in your own page and masking is off or does not cover that field. Most tools mask some inputs by default, but custom forms and unusual field names can slip through. Check by playing back a test session.

Why is my Hotjar or Clarity recording showing passwords?

Usually masking is set to a relaxed mode, the field is not recognised as a password input, or it was customised with a non-standard element. Switch to the strictest masking mode and add the tool's suppression attribute to the field.

How do I stop session recordings capturing form fields?

Turn on the strictest input masking in your replay tool, add its suppression attribute (such as data-hj-suppress or data-clarity-mask) to sensitive fields, and exclude checkout and login pages. Then replay a fake-data session to confirm.

Is it a problem if a session replay tool records card data?

It can be. Storing card data in a tool outside your payment setup may conflict with card scheme rules (PCI DSS) and your provider's terms, and personal data may need a lawful basis under privacy laws. Ask your payment provider or a compliance adviser.

Do Stripe or PayPal embedded fields get recorded?

Fields in an iframe hosted by the payment provider are normally not readable by your page scripts, so replay tools cannot capture the digits. Fields you build yourself in the page can be recorded.

How do I delete session recordings that contain sensitive data?

Open your replay tool, find the affected sessions, and delete them from the dashboard, or ask the vendor's support to purge them. Then set a shorter retention period and restrict who can view recordings.

Does FunnelGuard detect session recording capturing card fields?

No. FunnelGuard does not check this yet. It monitors your funnel steps, tracking hits and lead delivery, so it can alert you when a checkout or form breaks, but you need to review recordings and masking yourself.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.