Title: Prior consent
Last modified: May 18, 2018

---

# Prior consent

 *  [martaxerra](https://wordpress.org/support/users/martaxerra/)
 * (@martaxerra)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/prior-consent/)
 * Hi,
    I love your plugin and wondered if there are any updates about the GDPR 
   requirements. The pixel should be activated only after having obtained prior 
   consent from the visitors (we should record consents, too), I would have liked
   to manually update the code through cookiebot ([https://wordpress.org/plugins/cookiebot/#installation](https://wordpress.org/plugins/cookiebot/#installation))
   but I don’t know how.
 * Any news about it?
 * Thanks a lot
    marta

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

 *  Plugin Author [Antonino Scarfì](https://wordpress.org/support/users/antoscarface/)
 * (@antoscarface)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/prior-consent/#post-10306899)
 * Hi,
 * sorry for the delay on my response.
 * To achieve what you requested me, you may add a custom code in your website. 
   Just add the following snippet at the end of the `functions.php` file of your
   active theme or in a new one-file plugin:
 *     ```
       function my_pixelcaffeine_consent() {
           ob_start();
           AEPC_Pixel_Scripts::pixel_init();
           $script = ob_get_clean();
   
           echo str_replace('<script>', '<script data-cookieconsent="marketing">', $script);
       }
   
       add_action('init', function() {
           if ( 'head' == get_option( 'aepc_pixel_position', 'head' ) ) {
               remove_action( 'wp_head', array( 'AEPC_Pixel_Scripts', 'pixel_init' ), 99 );
               add_action( 'wp_head', 'my_pixelcaffeine_consent', 99 );
           } else {
               remove_action( 'wp_footer', array( 'AEPC_Pixel_Scripts', 'pixel_init' ), 1 );
               add_action( 'wp_footer', 'my_pixelcaffeine_consent', 1 );
           }
       });
       ```
   
 * In this way, the snippet will change the `<script>` tag of Pixel Caffeine, adding
   the `data-cookieconsent="marketing"` expected by the plugin you mentioned, as
   I read in the documentation.
 *  [sleepyjake](https://wordpress.org/support/users/sleepyjake/)
 * (@sleepyjake)
 * [8 years ago](https://wordpress.org/support/topic/prior-consent/#post-10331315)
 * Hi,
 * I implemented this solution last week, but the facebook pixel still loads. I 
   then deactivated the plugin, now I only get a white page where my staging site
   was…
 * How can I fix this? Any help would be appreciated!
 *  Plugin Author [Antonino Scarfì](https://wordpress.org/support/users/antoscarface/)
 * (@antoscarface)
 * [8 years ago](https://wordpress.org/support/topic/prior-consent/#post-10360228)
 * Hi,
 * sorry to hear that it didn’t solve for you.
    I’m working on adding some compatibility
   to these kinds of plugins, I’ll release the new version as soon as possible, 
   most probably within the end of this month or start of next one.
 * Thanks for the patience.
 *  [sleepyjake](https://wordpress.org/support/users/sleepyjake/)
 * (@sleepyjake)
 * [8 years ago](https://wordpress.org/support/topic/prior-consent/#post-10360935)
 * Hi,
 * No worries, I’m just not fluent enough in php to spot the error. For now PixelCaffeine
   is disabled. Would be happy to get it running again once it respects the cookiebot
   options.

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

The topic ‘Prior consent’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/pixel-caffeine_e2ce0c.svg)
 * [Pixel Caffeine](https://wordpress.org/plugins/pixel-caffeine/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pixel-caffeine/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pixel-caffeine/)
 * [Active Topics](https://wordpress.org/support/plugin/pixel-caffeine/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pixel-caffeine/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pixel-caffeine/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [sleepyjake](https://wordpress.org/support/users/sleepyjake/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/prior-consent/#post-10360935)
 * Status: not resolved