Before you start#
- A paid Framer site plan (custom code needs one) and editor access to the project.
- The code from Madder’s pixel window (Copy code), already carrying your pixel ID (where it comes from).
- A thank-you page in the project, for example
/thank-you.
1Add the pixel as a custom code script#
Paths as of September 2026. Open Project Settings (older builds label the same panel Site Settings › General), select the Custom Code tab in the left sidebar, then click Add Script (or + if scripts exist). Name it “Meta Pixel”, paste the snippet, choose the placement at the end of the <head> tag, leave it on all pages, and set it to run Once.
2Fire the Lead event#
Framer forms can Redirect on Submit, show an Overlay, or update the Button or Form. Use the redirect:
- Select the form, and in the properties panel on the right find the submit behavior; choose the redirect and enter your thank-you page.
- Back in Project Settings › Custom Code, click + to add a second script named “Meta Lead”, placed at the end of the
<body>tag, containing:
<script>fbq('track', 'Lead');</script>
- In that script’s page list select only the thank-you page. Set it to Run on every page visit: Framer navigates client-side, and a script set to Once would not fire when a visitor reaches the thank-you page without a full reload.
Overlay or button-state confirmations have no page change, so nothing tells the pixel a lead happened; that is why the redirect is required.
3The Google tag#
Add the Google tag as a third script, also at the end of the <head>, all pages, Once. Which tag and which conversion action: Install the Google tag on your website.
4Publish and verify#
- Click Publish; custom code runs only on the published site.
- Install the Meta Pixel Helper Chrome extension (now listed as Meta Ads Data Advisor). Open the live site: one pixel, status “Active”, your ID. Submit the form: on the thank-you page Lead appears.
- In Meta Events Manager: Data sources › your pixel › Test events, enter your URL, submit the form, and check that PageView and Lead appear.
- In Madder, open the pixel window again with Set up tracking. Madder checks as it opens. “The pixel is live.” means you are done. Otherwise press Check again after a minute, and if Madder still can’t see it, press Mark as installed.
If it doesn’t work#
- Nothing fires
- Not published since the change, or the site is on the free plan where custom code is stripped.
- PageView fires once, then never
- Framer moves between pages without a full reload. Add a script on all pages, set to Run on every page visit, containing
<script>fbq('track', 'PageView');</script>, and delete that same line from the base code so the first page is not counted twice. Lead counting is not affected. - Lead missing after the redirect
- The Lead script is set to Once; switch to Run on every page visit, or the page list does not include the thank-you page.
fbq is not defined- The Lead script is placed at the start of the
<head>before the base code; move it to the end of the<body>. - Lead fires on every page
- The page list for the Lead script is empty (all pages); restrict it.