Troubleshooting

Popup Interaction Tracking Not Working on Squarespace

3 min read··By the TrackingCoder team
🔧

Common reasons popup-interaction tracking doesn’t fire

  1. GTM container not published - You imported the container but didn’t click Submit → Publish.
  2. GTM snippet not installed on your site - The GTM code needs to be in your site’s <head> and <body>.
  3. Cart drawer / mini-cart false-positives - Many Shopify and WooCommerce themes use a side-drawer that LOOKS like a popup but is actually the cart UI. Generic popup detectors fire on every add-to-cart, polluting your data. The TrackingCoder snippet checks for cart-specific markers (cart-drawer, cart-items, form[action*="/cart/add"]) and skips those.
  4. Popup is rendered inside an iframe - Klaviyo, Privy, OptinMonster, and many others render popups in iframes for style isolation. GTM on the parent page cannot see clicks inside the iframe. Check the vendor’s docs - most expose a callback like klaviyo.onClick or _iub.cs.consent.onConsentGiven.
  5. Animated popup never reaches “visible” state - A trigger that checks display: block on the popup container may not detect a popup that’s shown via CSS opacity / transform. Use an Intersection Observer or a custom event the popup vendor dispatches.
  6. First click outside dismisses the popup - Some popups close on the first ANY-click, including a click meant for the popup itself. The dismiss-click registers, but the inside-click never lands. Inspect with GTM Preview to see which path is firing.

Step-by-step debugging checklist

  1. Verify GTM is installed - Visit your site, right-click → View Page Source, search for “GTM-”. If you don’t see it, GTM isn’t installed.
  2. Check GTM Preview mode - In GTM, click Preview. Navigate your site and trigger the event. Look for your tag in the Tags Fired section.
  3. Check the trigger - If the tag shows as “Not Fired”, click on it to see which trigger conditions aren’t met.
  4. Open GTM Preview, trigger the popup - Watch the event timeline as the popup appears. If you see no events at all, the popup is in an iframe. If you see events but they look wrong, check Click Element / Click ID for what’s actually being clicked.
  5. Inspect the popup’s DOM ancestor - Right-click inside the popup → Inspect. Look at the parents until you reach <body>. If you pass through an <iframe>, that’s your problem. If not, check what unique class/id you can target.
  6. For vendor popups, use their callback API - Klaviyo: _klOnsite.push(['openForm', ...]). OptinMonster: document.addEventListener('om.Optin.show', ...). Privy: privy.on('campaign:show', ...). Each vendor has docs - Google “[vendor] javascript callback events.”

How to verify it’s working

  1. Open GTM Preview/Debug mode
  2. Navigate to your site
  3. Trigger the event (open and interact with the popup)
  4. Check the GTM debug panel - your tag should appear under “Tags Fired”
  5. Check GA4 DebugView (GA4 → Admin → DebugView) to confirm the event arrived

Still didn’t work?

Our team can help. Describe what’s happening and we’ll get back to you within 24 hours.

Still didn't work? Report this issue

Fill in the details below and our team will review it within 3-5 business days. We aren't obliged to refund - but if we genuinely can't make it work, we may credit you back. Either way, your credits remain usable on a different event or site.

No need to type https:// - we'll add it for you.

Min 20 characters (0/20).

Context automatically included: popup interaction tracking on squarespace

Skip the manual setup

TrackingCoder detects your CMS and plugins automatically, then generates ready-to-use tracking code. No more adapting generic tutorials - get code tailored to your exact setup in under 2 minutes.

Try TrackingCoder Free →

2 free credits on signup. No card required.