Meta Pixel and INP: Turn Off autoConfig

The pixel runs its own code on every click, before your code runs, until you turn off automatic configuration.

  • Good ≤ 200 ms
  • Needs improvement ≤ 500 ms
  • Poor > 500 ms
Arjen Karel
Updated · 8 min read
Share

Meta Pixel and INP in short

The Meta Pixel turns on automatic configuration by default and then runs its own code on every click, before your own click code runs. On our test page that pushed a store finder tap from 184 ms, a good INP, to 208 ms. One line above init, fbq('set', 'autoConfig', false, 'PIXEL_ID'), stops it; in Google Tag Manager it is a checkbox. You lose the button clicks Meta collects on its own. Your own events keep working.

Does the Meta Pixel slow down every click?

Yes. With its default settings the Meta Pixel, the old Facebook pixel, adds a click listener to the document in the capture phase, and on every click it runs its own code before your own click handlers run. All of that counts in the processing time of the tap, so it adds straight to your Interaction to Next Paint.

The listener comes from automatic configuration, the part of the pixel that sends "automatic events". Meta's help page says "We recommend keeping automatic events on", and new pixels have it on. The listener goes on after the first pixel event, the PageView. On each tap it walks up from the tapped element to find the button, measures it and reads its styles and text, looks for form fields to match, collects the page's structured data, and then sends a SubscribedButtonClick event.

It runs before your code because the browser hands a click to the capture listeners from the top of the page down first. React, Vue, jQuery and plain onclick handlers listen lower in the page or in the bubble phase, so the pixel goes first, even when it loaded seconds after your own code.

The pixel is on 16% of all pages, according to the Web Almanac 2025.

We measured it on a test page: a webshop product page with a gallery, a description that expands, a store finder and a menu, about 2,300 elements, with the pixel loaded as Meta publishes it. Mobile emulation in Chrome, 4x CPU slowdown, page loads in random order. The store finder lists a few hundred stores with their opening hours, so the page's own work for that tap is close to the limit. Without the pixel, the tap stayed at or under 200 ms in all 12 loads. With the pixel, it went over 200 ms in 8 of 12:

The store finder tap on the test page, one dot per page load: without the pixel and with autoConfig off every tap stays at or under 200 ms, with the pixel 8 of 12 taps go over 200 ms

The store finder tap, one dot per page load. Top: without the pixel, median 184 ms. Middle: the pixel as installed, median 208 ms. Bottom: the pixel with autoConfig off, median 184 ms. The dashed line is 200 ms, the limit for a good INP.

The pixel added about 26 ms of processing to that tap. It adds time to every button, even the light ones. Over 15 page loads with seven taps each, the processing time per tap (the median) was, with "fixed" meaning the pixel with autoConfig off:

TapNo pixelPixelFixed
Thumbnail1 ms33 ms6 ms
Show more4 ms27 ms8 ms
Lightbox3 ms20 ms6 ms
Menu3 ms16 ms3 ms

A tap that does little on its own stays under 200 ms with the pixel too. A tap whose own work already takes most of the 200 ms goes over. Field data from other sites shows the pixel's share at larger sizes: RUMvision saw Meta's script time per click grow from about 34 ms to about 59 ms between June and August 2026. The more structured data and form fields on a page, the longer Meta's code runs on every click.

How do you see the Meta Pixel in your INP?

A Function call from fbevents.js under Event: click is the Meta Pixel running its own code on the click, before your own script. You see it when you record a tap in the Chrome DevTools Performance panel.

  1. Open the page on its live domain, then DevTools, Performance, and set CPU to 4x slowdown.
  2. Start a recording, tap a button that opens something (a menu, a gallery), stop.
  3. Find the interaction in the Interactions track and open the Event: click under it on the main thread.
Chrome DevTools trace of the store finder tap with the Meta Pixel: under Event: click a Function call from fbevents.js runs first, then the page handler

The store finder tap with the pixel. Under Event: click, the first Function call is fbevents.js, the long one after it is the page's own handler (handle). Recording a trace slows the page down, so the trace takes longer than the tap does without it.

Test on the live domain. Meta only sends the automatic configuration to a page on the site's own domain. On localhost or 127.0.0.1 the listener never appears, so a local test shows nothing. A staging copy on another hostname may do the same: if no fbevents.js call shows up there, test on the live site.

Automated browsers can miss it too. On the test page the pixel sent no PageView in four of five loads to a browser that announced itself as automated (navigator.webdriver), so it never added the listener. A Puppeteer or Playwright script can show a clean tap while every click of your visitors runs Meta's code.

In field data the pixel shows up through the Long Animation Frames API: the script fbevents.js with the invoker #document.onclick during slow taps. CoreDash shows that per interaction. Without a RUM tool (real user monitoring), paste this observer in the console before you tap, or send what it logs to your own analytics. We used one like it on the test page:

new PerformanceObserver((list) => {
  for (const frame of list.getEntries()) {
    for (const script of frame.scripts) {
      if (script.sourceURL.includes('facebook.net')) {
        console.log(script.invoker, Math.round(script.duration) + ' ms', script.sourceURL);
      }
    }
  }
}).observe({ type: 'long-animation-frame', buffered: true });

Long animation frames start at 50 ms, so this catches the slow taps, which are the ones that decide your INP.

How do you turn off autoConfig in the base code, GTM or WordPress?

To turn off the Meta Pixel's automatic events, add fbq('set', 'autoConfig', false, 'PIXEL_ID') on the line above fbq('init', 'PIXEL_ID'), with your own pixel ID in both (the number Events Manager shows for your pixel). This is Meta's documented way to switch off automatic configuration. The listener stays on the page, but on a click it now returns almost at once.

In the base code, the snippet Meta gives you:

<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','https://connect.facebook.net/en_US/fbevents.js');
fbq('set', 'autoConfig', false, 'PIXEL_ID');
fbq('init', 'PIXEL_ID');
fbq('track', 'PageView');
</script>

In Google Tag Manager with the Meta Pixel template, open the tag, More Settings, and tick "Disable Automatic Configuration" in every Meta Pixel tag (the box is unticked by default). The tag that fires first initialises the pixel and adds the same line before init.

In a GTM Custom HTML tag with Meta's base code, add the line above init yourself, as in the base code.

With Meta's WordPress or WooCommerce plugin there is no setting for it. The line also works after init, so a small script after the plugin's pixel code is enough. In your theme's functions.php or a code snippets plugin:

add_action('wp_footer', function () {
    echo "<script>window.fbq && fbq('set', 'autoConfig', false, 'PIXEL_ID');</script>";
}, 99);

We checked that on the test page: with the line run after init, Facebook's main thread time in the store finder tap went from 22.8 ms to 2.5 ms in the DevTools summary. If a consent tool or a plugin that delays JavaScript loads the pixel later, put the line where the pixel starts instead. With more than one pixel, add the line for each pixel ID.

A second Meta listener, for events set up with Meta's Event Setup Tool, is not covered by this setting.

What do you lose when automatic events are off?

You lose the SubscribedButtonClick events, the page details the pixel reads on its own (such as the product details in your structured data), and the part of Automatic Advanced Matching that reads form fields by itself. Your PageView and every event you send yourself with fbq('track', ...) keep working, and so do the pixel's cookies.

Ask whoever runs the ads before you switch it off. Most campaigns optimize on purchases, leads or add to cart, which you send yourself. If they do use button clicks from automatic events, send those few clicks yourself, after the screen has updated, so the tap feels instant and Meta still gets the event. With the awaitPaint helper from the dataLayer article:

button.addEventListener('click', () => {
  openStoreFinder(); // the visitor sees this first
  awaitPaint(() => fbq('track', 'FindLocation'));
});

The same goes for events that go through Google Tag Manager: push them to the dataLayer after the paint.

Why doesn't yielding in your click handler help?

Every listener for one click runs in the same task, and the browser can't paint until that task ends. Yielding with scheduler.yield() in your handler moves your own work after the paint, but Meta's listener has already run by then.

We checked it on the test page with scheduler.yield() in every click handler, between the screen update and the rest, over 10 page loads per variant:

With yieldNo pixelPixelFixed
Processing (median)1 ms21 ms5 ms
Interaction (p75)40 ms56 ms40 ms

The yield took the page's own work out of the tap: from 3 to 1 ms without the pixel. With the pixel, processing stayed at 21 ms against 22 ms without the yield: almost all of it is Meta's.

Putting your own listener first, as a capture listener on window, doesn't help either: the pixel's listener runs straight after yours, in the same task, still before the paint. Yielding is still worth doing for your own code (see how to yield to the main thread).

Don't try to beat it by wrapping addEventListener to catch Meta's listener. It breaks the next time Meta changes its script, and you won't notice until the ads team asks where their data went.

How do you check the Meta Pixel fix?

Compare the same tap with and without automatic configuration. You can do that on the live site before changing anything, because the line works after the pixel has loaded:

  1. Open the page on its live domain, then DevTools, Performance, CPU 4x slowdown.
  2. Record two or three taps on buttons that do something.
  3. Run fbq('set', 'autoConfig', false, 'PIXEL_ID') in the console with your own pixel ID (the id= in the facebook.com/tr request in the Network panel), and record the same taps again.

The long Function call from fbevents.js under Event: click should be gone. A few milliseconds of Meta can stay:

The same tap with autoConfig off: under Event: click only the page handler runs

The same store finder tap after running the line in the page: only the page's own handler is left under Event: click.

Then put the line live and watch your INP on mobile in your field data. Search Console and CrUX show the last 28 days, so give it four weeks there; in RUM you see it within a day. Check that fbevents.js has gone from the scripts in your slow interactions.

If your INP is still red after the pixel is fixed, the next scripts in the tap are usually other tags, chat and review widgets. On sites without their own developer I do that work myself, without removing the tools.

About the author

Arjen Karel is a web performance consultant and the creator of CoreDash, a Real User Monitoring platform that tracks Core Web Vitals data across hundreds of sites. He also built the Core Web Vitals Visualizer Chrome extension. He has helped clients achieve passing Core Web Vitals scores on over 925,000 mobile URLs.

Arjen Karel

Need a faster site?

I'm Arjen, and I've been fixing slow sites for 17 years. If you're running into issues you can't fix yourself, send me your URL and let's have a chat.

Send me your URL
Arjen Karel
Arjen Karel, Web performance consultant since 2009

Why isn't our fix working?

Sometimes the CDN still serves the old HTML, or the fix went into the desktop template and mobile uses another one. Send me your URL and the problem, and I reply with a few times. I check your field data first, then we spend one hour on your site, and within a day you have my notes in writing. €350 excl. VAT.

Send me your URL

No developer to build the fix? I do the work myself, on a copy of your site.

Arjen KarelINP still red on mobile?Send me your URL