Problems with session tracking tools

I’m having real problems with session tracking/replay on my hubspot hosted site.

We’ve tried a number of different solutions, thinking it was the service that was the problem. Posthog and now UXCam. In both, we lose sessions, but SOME sessions seem to work.

We’ve verified settings in BOTH tools. In both cases, they are set to track ALL sessions.

But, we’re seeing a small subset.

What’s also weird, is that the tracking that HUBSPOT does themselves in their analytics shows EVEN LESS clicks than we have session recordings for.

We know we’re getting traffic, because we are running Ads to these landing pages, and we’re trying to see what’s happening on these pages. Each click is significant cost, so getting to the bottom of this is critical.

I’ve reached out to tech support. Let’s just say it was lackluster.

I’m wondering if there’s something with CSP in Hubspot’s hosting that’s impacting it?

More than 1 vendor having the same problem. Hubspot’s own weird tracking.

Any suggestions?

Great question to bring to the community!
Tagging some of our top contributors who might have some insight here - @ChrisoKlepke @colinwitt @louischausse - has anyone seen something like this before with third-party tracking on HubSpot hosted pages? Would love to get some expert eyes on this one! :eyes:
Cassie, Community Manager

Hi @WFlanagan,

When your Ad spend says 100, PostHog says 30, and HubSpot says 10, you aren’t just losing data, you’re losing visibility into your ROI.
here is exactly what is happening under the hood:

  • The HubSpot “Consent Banner” Black Hole (Most Likely):- If you have the HubSpot Cookie Consent banner set to “Opt-in,” HubSpot is legally and technically obligated to block all tracking scripts (including its own and PostHog/UXCam) until the user clicks “Accept.”

    • The Problem: Many users land from an ad, get the info they need, and bounce without ever touching that banner.
    • Result: The session happened, but the “recorder” was never allowed to turn on. HubSpot’s own analytics are often the strictest, which explains why their numbers are the lowest.
  • Browser-Level “Shields” (Safari, Brave, AdBlockers):- Session replay tools (PostHog, UXCam, Hotjar) are increasingly being flagged by “Intelligent Tracking Prevention” (ITP) in Safari and built-in blockers in browsers like Brave.

    • Because these tools record mouse movements and keystrokes, privacy-focused browsers often block their connection strings by default.
    • Standard analytics (like Google or HubSpot) sometimes slip through where “Replay” tools get blocked, creating that discrepancy you’re seeing.
  • Your CSP Suspicion:- You are right to look at the Content Security Policy (CSP). If HubSpot’s headers aren’t explicitly allowing the domains for PostHog or UXCam, the browser will “mute” those scripts.

How to check: Open your landing page in an Incognito window, right-click > Inspect > Console. If you see red text saying Refused to connect to or Violation of Content Security Policy, your CSP is definitely the culprit.

  • HubSpot’s Internal Bot Filtering:- HubSpot is very aggressive at filtering out what it deems “invalid” traffic to keep your CRM data clean. If your ads are hitting “bot-heavy” networks or low-quality placements, HubSpot might be silently discarding those sessions while the third-party tools (which are less picky) are still trying to record them.

My Recommendations for you:

  • Check the “Consent” Settings: Go to Settings > Privacy & Consent. If you are in a region where you can legally switch from “Opt-in” to “Notify,” do it for 24 hours. You will likely see your tracking numbers spike immediately.
  • Move Scripts to the Header: Ensure your PostHog/UXCam scripts are in the <head> of your HubSpot site, not the footer. If a user bounces quickly, a footer script never even gets the chance to load.
  • The Dev Solution (Server-Side): If the ad spend is significant, stop relying on “Client-Side” (Browser) tracking. Look into Server-Side GTM or using HubSpot’s Custom Behavioral Events API. This bypasses the browser blockers and records the “Hit” directly from the server.

(Taken help from ai)