How to install the Meta pixel and Google tag on Webflow

On Webflow, paste Madder’s snippet into Site settings › Custom code › Head code, redirect the form to a thank-you page, and fire Lead from that page’s settings.

For Webflow. Takes about 10 minutes

On this page

Before you start#

  • A Webflow site plan (custom code does not run on free staging-only sites) and site Admin or editor access to settings.
  • The code from Madder’s pixel window (Copy code), already carrying your pixel ID (where it comes from).
  • A thank-you page in the Designer, for example /thank-you.

1Paste the pixel into Head code#

Paths as of September 2026. From the Designer open Site settings, click the Custom code tab, paste the snippet into Head code (limit 50,000 characters), then Save changes. Do not add <html>, <head> or <body> tags around it. Nothing goes live until you Publish.

2Fire the Lead event#

Webflow forms show a success message in place by default; a script inside that success block runs at page load, not at submission, so use a redirect instead:

  1. Select the form on the canvas (or in the Navigator) and open the Settings panel on the right.
  2. Under the form’s settings pick a redirect: choose your thank-you page or enter its URL. Keep the Success state text as a fallback.
  3. Open the thank-you page’s Page settings (gear icon in Pages), scroll to Custom code, and in Inside &lt;head&gt; tag paste:
<script>fbq('track', 'Lead');</script>

Page-level head code runs after site-level head code, so fbq is already defined. Save, then Publish.

Set the thank-you page to no-index (Page settings › SEO settings) so search visitors do not land on it and count as leads.

3The Google tag#

Paste the Google tag into the same Head code box, under the Meta snippet. Which tag and which conversion action: Install the Google tag on your website.

4Publish and verify#

  1. Publish to your custom domain, not only the webflow.io subdomain.
  2. 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.
  3. In Meta Events Manager: Data sources › your pixel › Test events, enter your URL, submit the form, and check that PageView and Lead appear.
  4. 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
You saved but did not publish, or you are checking the Designer preview (custom code runs only on the published site).
Lead never fires
The form still shows the inline success message; check the redirect is set and saved.
Lead fires on every page
The Lead script went into site-level Head code; move it to the thank-you page’s Page settings.
fbq is not defined in the console
The base code is in Footer code; move it to Head code.
Works on webflow.io, not on the domain
Publish targets both; check the custom domain was selected in the publish dialog.