Skip to main content
You see the “Delayed javascript execution or lazy loading” error when a plugin or a code setting on your website delays the loading of the Cometly pixel. The pixel is the script that tracks where your website visitors come from and captures opt-in data from your forms. This issue stops Cometly from tracking accurately and results in missed data. The usual cause is a speed or caching tool that holds scripts back to make pages load faster, so the Cometly pixel’s delayed JavaScript execution is something you fix in that tool’s settings, not in Cometly.

How to fix delayed JavaScript execution on the Cometly pixel

  1. WordPress sites: you may have a plugin installed that delays JavaScript execution. The most common one is WP Rocket. To turn off its Delay JavaScript execution setting, see WordPress pixel installation.
  2. Custom sites: manually remove the code that delays the Cometly pixel’s JavaScript.
If you pinned your site to a script version (Setup > Install the Cometly pixel > Script version), the pixel tag must stay exactly as Cometly shows it. An optimizer that rewrites the tag (an optimizer plugin, Cloudflare Rocket Loader or Auto Minify, a tag manager) stops the browser from running it. Paste the snippet again and exclude it from optimization.

Confirm the pixel loads

After the change, check the pixel again in Cometly under Setup > Install the Cometly pixel > Verify your pixel. Click Verify next to your domain: it should show Pixel detected. See Install and verify the Cometly pixel. If it shows Pixel not detected, clear your website’s cache, check the settings above again, then click Retry.

Frequently asked questions

Which WP Rocket settings stop the Cometly pixel from loading?

Three options in the JavaScript Files section of WP Rocket’s File Optimization tab: Combine JavaScript files, Load JavaScript deferred and Delay JavaScript execution. Make sure all three are unchecked, click Save Changes, then clear your cache. WordPress pixel installation shows where to find them.

Do other caching or performance plugins delay the Cometly pixel?

They can. Any plugin that defers or lazy-loads JavaScript can interfere with the pixel, so turn those options off. Check the plugin’s documentation for settings similar to the WP Rocket ones.

Does installing the Cometly pixel through Google Tag Manager delay it?

It can. The pixel works when it is installed through Google Tag Manager, but you may lose attribution data because of loading delays and privacy blockers. Installing it directly in the <head> section of your website is recommended. See Google Tag Manager pixel installation.

Next steps

Still have questions or need a hand? We’re happy to help. Reach our team at support@cometly.com.