Hi there,
Thanks for your comments and suggestions.
I’ve implemented a hook in the plugin, and you can add the following code snippet to your theme’s functions.php
To enable the scroll, add the “scrollEnable” option with offset value (in pixels) where the plugin should setup the default cookies for you like : scrollEnable: 200
Below the snippets, the first it sets the default cookies (user can override) and the second script enable the default cookies on scroll:
function moove_gdpr_script_extension() {
wp_add_inline_script(
"moove_gdpr_frontend",
"jQuery(document).ready(function(){
jQuery(this).moove_gdpr_save_cookie({
thirdParty: true,
advanced: false
});
});",
"after"
);
}
add_action( 'wp_enqueue_scripts', 'moove_gdpr_script_extension', 999 );
function moove_gdpr_script_extension() {
wp_add_inline_script(
"moove_gdpr_frontend",
"jQuery(document).ready(function(){
jQuery(this).moove_gdpr_save_cookie({
thirdParty: true,
advanced: true,
scrollEnable: 200
});
});",
"after"
);
}
add_action( 'wp_enqueue_scripts', 'moove_gdpr_script_extension', 999 );
I hope this helps.