Using PixelYourSite with WP Rocket

This is the guide to set up PixelYourSite with WP Rocket.

Pixel is not found in cached page

PixelYourSite has a setting to "Disable the plugin for known web crawlers".

When this is enabled, the PixelYourSite code, and therefore the tracking pixels, will not be added to any page that is visited by any kind of bot or crawler. This includes WP Rocket's Preload User Agent, as well as others like search engine crawlers etc.

WP Rocket's Preload User Agent can be excluded, as shown above.

But, even with Preload excluded, if any page is cached by a bot's visit, that page will not have the PixelYourSite code in it. Clearing the cache may fix it temporarily as the pages may be re-cached by non-bot visits. 

We recommend turning off this feature for best compatibility with page caching, and to ensure the pixel is always loaded for your visitors.

Incompatible option

The option PixelYourSite > Dashboard > Enable pixel is not compatible with WP Rocket because it clears the PHP buffer in a way that WP Rocket application of optimizations is interrupted.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.