tode compared with other tools
Google Analytics 4 in a Figma plugin, compared with tode
GA4 is free and familiar, and most of it is built around pages and cookies that a plugin does not have. A side-by-side on what you get from each.
, by Ilia
Google Analytics is free, familiar and already open in a tab for most people who publish a plugin. The catch is that the script does not run in a plugin, and the server-side route that does turns you into the SDK author. This page is the decision; the mechanics are in the longer note.
The two ways to use GA4 from a plugin
The gtag script in the UI iframe fails because the frame has a null origin and no cookies. You can configure it to live without storage, at which point every open is a new user, so in practice this route is off the table.
The Measurement Protocol works. From code.ts you POST events to google-analytics.com/mp/collect with your measurement id, an API secret and a client id you generate and keep in figma.clientStorage. You also send a session id and an engagement time with every event, or GA will not count the events as engaged sessions. The secret ships in your bundle, where anyone can read it.
Side by side
| GA4 via Measurement Protocol | tode | |
|---|---|---|
| Runs in a plugin | From the controller, with your own client | Yes |
| User identity | A client id you store yourself | The Figma user id, stable across devices |
| Sessions | Session id and engagement time sent by you | Measured automatically from the UI |
| Country and device | Only what you put in the hit | Country from the request IP, Figma editor from the API |
| Reports | Website shaped: pages, sessions, acquisition | Plugin shaped: active users, actions, metrics, sessions |
| Retention | Standard retention report, if identity holds | New vs returning, week-one cohorts, stickiness |
| Secret in the bundle | Yes, the API secret | An API key that can only write events to your plugin |
| Price | Free | Free for one plugin, paid plans from $12 a month |
| Debugging | DebugView and the validation endpoint | Debug flag logs every call to the console |
One honest point about the key: tode's API key is also visible in your bundle. The difference is scope. It can add events to one plugin and nothing else, and you can rotate it from the dashboard. GA's API secret is bound to a data stream that may be the same one your website uses.
Pick GA4 if
Free is the requirement, and you are willing to write and maintain the client, session and storage code once. Or your plugin is a companion to a website already measured in GA and you want the two in one property and one set of reports.
Pick tode if
You want retention, feature adoption and session length for a plugin without inventing an identity scheme, and you would rather look at a dashboard that uses plugin words. Or you have more than one plugin and want them side by side under one account.