• martaxerra

    (@martaxerra)


    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://ww.wp.xz.cn/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ì

    (@antoscarface)

    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

    (@sleepyjake)

    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ì

    (@antoscarface)

    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.

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

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