• Resolved simopa

    (@simopa)


    It would be useful to tag js scripts we cannot put in the configuration section of the plugin but we have to use in pages.

    something like <script type = “text plain” gdpr-cookie-category=”statistics” … > so that the plugin could really block everything.

Viewing 1 replies (of 1 total)
  • MA

    (@gasparnemes)

    Hi there,

    Thanks for your comment, unfortunately this is not possible as the plugin use the settings from the CMS and add the scripts based on the user preferences using AJAX.

    If you’re a developer, you can add some filters in your functions.php to add more scripts programmatically for different pages across the site based on the selected user preferences, please see the examples below:

    Advanced Header Scripts hook (available from v.1.0.3):

    add_action('moove_gdpr_advanced_cookies_header_assets','moove_gdpr_advanced_header_assets');
    function moove_gdpr_advanced_header_assets( $scripts ) {
       if ( is_singular() ) :
    	$scripts .= '<script>console.log("example script, advanced-header-scripts on singular page");</script>';
    	return $scripts;
       endif;
    }

    Advanced Body Scripts hook (available from v.1.0.3):

    add_action('moove_gdpr_advanced_cookies_body_assets','moove_gdpr_advanced_cookies_body_assets');
    function moove_gdpr_advanced_cookies_body_assets( $scripts ) {
       if ( is_singular() ) :
    	$scripts .= '<script>console.log("example script, advanced-body-scripts on singular page");</script>';
    	return $scripts;
       endif;
    }

    Advanced Footer Scripts hook (available from v.1.0.1):

    add_action('moove_gdpr_advanced_cookies_footer_assets','moove_gdpr_advanced_cookies_footer_assets');
    function moove_gdpr_advanced_cookies_footer_assets( $scripts ) {
       if ( is_singular() ) :
    	$scripts .= '<script>console.log("example script, advanced-footer-scripts on singular page");</script>';
    	return $scripts;
       endif;
    }

    The simmilar for the 3rd parties, these are the hooks:

    moove_gdpr_third_party_header_scripts

    moove_gdpr_third_party_body_scripts

    moove_gdpr_third_party_footer_scripts

    [ Signature deleted ]

    • This reply was modified 6 years, 10 months ago by MA.
    • This reply was modified 6 years, 10 months ago by Jan Dembowski.
Viewing 1 replies (of 1 total)
  • The topic ‘third part cookies’ is closed to new replies.