Title: GDPR &#8211; disable pixel by java script
Last modified: February 24, 2019

---

# GDPR – disable pixel by java script

 *  Resolved [mic85b](https://wordpress.org/support/users/mic85b/)
 * (@mic85b)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/gdpr-disable-pixel-by-java-script/)
 * It is not very good plugin. It’s amazing.
 * But for me have one big disadvantage. The problem is with GDPR. I know that we
   can disable it by some code but the problem is when we use cache plugin. It will
   be hardcoded in page cache (for example Page Cache of W3Total Cache for nonlogged
   users).
 * It will be great if it will be possible to disable FB Pixel Code by sample java
   script.
 * Or maybe you have another advice for me. Please help 🙂
 * Sample code to disable:
 * <script>
    if (window.is_allowed_cookie( ‘_fbp’ ) ) {
 * …fb pixel code…
    } </script>

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [PixelYourSite](https://wordpress.org/support/users/pixelyoursite/)
 * (@pixelyoursite)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/gdpr-disable-pixel-by-java-script/#post-11243979)
 * Hi,
 * If you control the pixel using our dedicated filter there’s an AJAX option on
   the bottom GDPR page. Enable it and it should work with cache.
 * We plan to add a filter to control this option too.
 *  Thread Starter [mic85b](https://wordpress.org/support/users/mic85b/)
 * (@mic85b)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/gdpr-disable-pixel-by-java-script/#post-11247003)
 * I can’t find any information how to implement AJAX consent method. Could you 
   write something about it. My guess is that some java script should post something
   to plugin.
 *  Plugin Author [PixelYourSite](https://wordpress.org/support/users/pixelyoursite/)
 * (@pixelyoursite)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/gdpr-disable-pixel-by-java-script/#post-11247297)
 * If it’s your website we are talking about you just need to turn it ON and our
   filters will work with cache. You can find it on the GDPR section, the last thing
   there. We already have several implementation working fine in this way.
 * If you’re a developer, we will soon add a filter in the free version to control
   this part.
    -  This reply was modified 7 years, 3 months ago by [PixelYourSite](https://wordpress.org/support/users/pixelyoursite/).

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘GDPR – disable pixel by java script’ is closed to new replies.

 * ![](https://ps.w.org/pixelyoursite/assets/icon-256x256.jpg?rev=3178123)
 * [PixelYourSite - Your smart PIXEL (TAG) & API Manager](https://wordpress.org/plugins/pixelyoursite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pixelyoursite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pixelyoursite/)
 * [Active Topics](https://wordpress.org/support/plugin/pixelyoursite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pixelyoursite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pixelyoursite/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [PixelYourSite](https://wordpress.org/support/users/pixelyoursite/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/gdpr-disable-pixel-by-java-script/#post-11247297)
 * Status: resolved