Skip to main content
Question

Not to able to see GA4 event in Figma site

  • October 11, 2025
  • 1 reply
  • 124 views

yjshin

Hey everyone,
I’ve been testing a custom React component on a Figma Site (built with Figma’s new code components / figma:react), and I’m having trouble tracking clicks with Google Analytics 4 (GA4).

Here’s what I’ve done so far:

  1. Added my GA4 Measurement ID (e.g. G-XXXXXXX) in Site settings → Analytics

  2. Confirmed that the gtag script is loading properly (I can see gtag() in the console)

  3. Added a simple component that fires an event on click:

    if (window.gtag) { window.gtag("event", "cta_button_click", { content_type: "cta_button", button_text: "Get Started", }); }

  4. The console shows the log correctly on click,
    but nothing appears in GA4 → Realtime → Events or DebugView.

It feels like the event is being called in a sandboxed context where analytics can’t actually send data out — maybe due to how Figma Sites handle scripts or iframes?

Has anyone managed to successfully track custom GA4 events inside Figma Sites yet?
If yes, how did you make it work? (Any tricks with global window, site analytics setup, or custom script injection?)

Thanks in advance 🙏
Would love to get GA4 working properly inside Figma Sites — analytics are crucial for testing engagement.

1 reply

sylab_x
  • New Member
  • March 18, 2026

Hi,
You're likely right about the sandboxed context. Figma Sites often isolate custom React components, so even if the gtag function is visible in the console, the actual network request might be getting intercepted or blocked by the platform's security policy.

If you can't get the client-side event to fire through their native analytics setup, the most reliable workaround is to bypass the browser entirely. I had a similar headache with event tracking on limited platforms and ended up routing everything through a Wordpress facebook capi bridge.

Basically, instead of relying on window.gtag in the frontend, you send the event data to a server-side container (like GTM or a WP-based relay) which then forwards it to GA4/Meta. It’s much more stable because it doesn't care about Figma’s iframe restrictions or browser blocks. Might be worth considering if you need 100% accuracy for those engagement metrics