Add tracking to a link
When adding a link, you can include a tracking ID during setup. Use a unique ID to ensure your results are accurate and not mixed with other events.

Add tracking to a form
When selecting a form on the canvas, you can add a tracking ID during setup. Whenever someone submits the form on your site, the event will be tracked.

Viewing results
Once you’ve added tracking to a link or form, you can view the results in your Analytics Overview. There will be a section called “Tracking”, where you can see the top 20 tracking events on your site. You can also use these tracking IDs in Funnels and A/B tests to measure conversion rates.

Record tracking events in an external system (Rudderstack, Segment, GA, etc.)
Framer provides custom events that you can use to track user interactions on your site. These events can be easily integrated with analytics platforms like Google Analytics or Segment.
Add the following script to the Custom Code section of your site:
Available events
Event | Description | Details |
|---|---|---|
framer:click | When someone clicks a link with a tracking ID set | |
framer:formsubmit | When someone submits a form with a tracking ID set | |
framer:pageview | When someone views a page | |
framer:triggerinvoke | When a trigger with a tracking ID set is invoked |
Track A/B test variants in an external system
Every Framer event includes details about the page and any A/B test the visitor sees. Use them to report which variant someone saw in tools like Mixpanel, Segment or Google Analytics.
Field | Description |
|---|---|
abTestId | The ID of the A/B test running on the page. Undefined if the page has no A/B test. |
abTestingVariantId | The ID of the variant the visitor sees. Undefined if the page has no A/B test. |
abTestingVariantName | “control” for the original page, otherwise the name of the variant page. Undefined if the page has no A/B test. |
webPageId | The ID of the original page. For A/B test variants, this is the page the variant belongs to. |
Use the IDs to group results. They stay the same when you rename a variant. The variant name only changes on events sent after the rename.
Example: Google Analytics using gtag.js
Example: Universal Analytics using analytics.js
FAQ
How do I add tracking to a link or form in Framer?
When adding a link or selecting a form on the canvas, you can include a unique tracking ID during setup. This ensures your results are accurate and not mixed with other events. For links, add the tracking ID when setting up the link. For forms, add the tracking ID during the form setup. Whenever someone clicks the link or submits the form, the event will be tracked.
Where can I view the results of my tracking events in Framer?
Once you’ve added tracking to a link or form, you can view the results in your Analytics Overview. There is a section called 'Tracking' where you can see the top 20 tracking events on your site. You can also use these tracking IDs in Funnels and A/B tests to measure conversion rates.
Can I send Framer tracking events to external analytics platforms like Google Analytics or Segment?
Yes, Framer provides custom events that you can use to track user interactions and send them to analytics platforms like Google Analytics or Segment. You can add a script to the Custom Code section of your site to listen for events such as 'framer:click' or 'framer:formsubmit' and forward them to your analytics tool. Example scripts are provided for both gtag.js and analytics.js integrations.
Can I see which A/B test variant a visitor saw in my own analytics tool?
Yes. All Framer events (framer:pageview, framer:click, framer:formsubmit and framer:triggerinvoke) include abTestId, abTestingVariantId, abTestingVariantName and webPageId. Listen for these events in your site’s Custom Code and forward the fields to tools like Mixpanel, Segment or Google Analytics.
