Event Classes on Framer
Recommended: Visual Tagger
We recommend using the Visual Tagger as a simpler option to setup tracking - it has the same tracking functionality in a simple widget
Click here to learn more about the visual taggerThis guide explains how to tag elements on your Framer website with a "class" that lets PixelFlow track that particular element, section or data to trigger or send along with an event to Meta.
Note: We've now released a smoother tracking experience for Framer by using the Visual Tagger - a widget that loads on your Framer website and lets you click any element and tag it with an event. Read more information here.
How to Use Class Tracking on Framer
Add the class from the Classes Document to elements using Framer's Code Overrides feature.
Before you do this for the first time, please follow the steps in "First Time Setup for Event Classes on Framer" below, then follow the steps afterwards.
You must follow the "First Time Setup" instructions below before you can use this - click to expand the section below.
IMPORTANT: First Time Setup for Class Tracking on Framer
You only need to create this file once. After it's created, you can reuse it for all elements you want to track on your Framer site.
Before you can use classes based tracking on Framer, you need to follow these steps one time first.
In Framer Designer, click on any element you want to track
On the right panel, scroll down to Code Overrides section and expand it
In the file field, click the dropdown, select New file, name your override (e.g., PixelFlowClasses), and click Create
Delete the content it creates and replace it with the following code (IMPORTANT - press the copy button or expand it and select it all)
Applying Event Classes to Elements
Click on the element you want to track in Framer Designer
In the Code Overrides section, select your created file (e.g., PixelFlowClasses) in the file field
Use the Classes Document to find which class corresponds to the event you want to track
Click on the Override field in Framer Designer and select the appropriate class from the dropdown (e.g., AddPaymentInfo or Subscribe)
Once done, publish your website to apply the changes
Make sure to publish your Framer site after adding event classes. Changes won't take effect until the site is live.
Triggering an Event from a Button in Framer
If you want to track a "Lead" event every time someone clicks a specific "Start Trial" button on your Framer website:
Click on your Subscribe button in Framer Designer
In the Code Overrides section, select your PixelFlowClasses file
In the Override dropdown, select Subscribe
Publish your website
Once published, PixelFlow will automatically track Subscribe events whenever users click that button and send the data to Meta.
Triggering an Event from a Form in Framer
To track form submissions, trigger an event and capture user data (name, email, phone), you need to add overrides to both the form container and individual input fields:
Add FormContainer override to your form container element
Add the appropriate action override to your submit button (e.g., Lead for a Lead event)
Add data extraction overrides to your input fields:
FormNameInput for first name input
FormEmailInput for email input
FormPhoneInput for phone input
FormLastNameInput for last name input
Verifying Your Setup
After adding overrides to your elements and publishing:
Visit your page on the live website (not in preview mode)
Right-click the element and select Inspect or Inspect Element
In the developer tools, verify that the PixelFlow class appears in the HTML code for that element
Test the tracking by triggering the event (clicking the button, submitting the form, etc.)
Check your PixelFlow event logs to confirm the event was captured
Common Issues and Solutions
Multiple Events Being Triggered
If you didn't add the "container" element (FormContainer) to your overall form, it can trigger multiple events on button click. Ensure you've added FormContainer
Override Not Appearing in Dropdown
Make sure you created the override file and pasted the complete code
Verify that the code doesn't have any syntax errors
Try refreshing Framer Designer or closing and reopening the project
Events Not Tracking in PixelFlow Dashboard
Verify the PixelFlow script is installed correctly (check the Framer Setup guide)
Confirm you published your site after adding the overrides
Make sure you selected the correct override from the dropdown
Check your browser console for JavaScript errors that might prevent tracking
Form Data Not Being Captured
Ensure FormContainer override is added to the form wrapper element
Verify input field overrides are added to the actual input elements, not labels or wrappers
Make sure the override names match exactly what's in the code file