On Framer, add Madder's snippet as a Custom Code script at the end of the <head>, set the form to redirect on submit, and fire Lead with a second script scoped to the thank-you page. About 10 minutes, plus a publish.
Madder already created the Meta pixel in your connected ad account and wrote the base code (step 2 of the tracking wizard). You only place it.
Before you start#
- A paid Framer site plan (custom code needs one) and editor access to the project.
- The base code copied from Madder's wizard (Copy code).
- A thank-you page in the project, for example
/thank-you.
1. Add 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. Framer keeps the snippet as one item you can edit later instead of a single text box.
2. Fire 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 behaviour; 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.
3. The 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: Google tag and conversion tracking.
4. Publish 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, confirm PageView and Lead.
- In Madder's wizard click I've installed it.
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 — the pixel only reports full loads; Framer's client-side navigation does not reload the page. Acceptable for Madder, which needs Lead, not every PageView.
- 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.