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.
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!
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.
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.