Support » Plugin: GDPR Cookie Compliance (CCPA, PIPEDA ready) » Conditional php script

Viewing 1 replies (of 1 total)
  • Hi There,

    Thanks for your comments.

    We have implemented hooks to implement custom scripts by php based on the user preferences, check the hooks below:

    HOOK to GDPR custom 3RD-PARTY script by php – HEAD

    add_action('moove_gdpr_third_party_header_assets','moove_gdpr_third_party_header_assets');
    function moove_gdpr_third_party_header_assets( $scripts ) {
    	$scripts .= '<script>console.log(“third-party-head”);</script>';
    	return $scripts;
    }

    HOOK to GDPR custom 3RD-PARTY script by php – BODY

    add_action('moove_gdpr_third_party_body_assets','moove_gdpr_third_party_body_assets');
    function moove_gdpr_third_party_body_assets( $scripts ) {
    	$scripts .= '<script>console.log(“third-party-body”);</script>';
    	return $scripts;
    }

    HOOK to GDPR custom 3RD-PARTY script by php – FOOTER

    add_action('moove_gdpr_third_party_footer_assets','moove_gdpr_third_party_footer_assets');
    function moove_gdpr_third_party_footer_assets( $scripts ) {
    	$scripts .= '<script>console.log(“third-party-footer”);</script>';
    	return $scripts;
    }

    HOOK to GDPR custom ADVANCED-PARTY script by php – HEAD

    add_action('moove_gdpr_advanced_cookies_header_assets','moove_gdpr_advanced_cookies_header_assets');
    function moove_gdpr_advanced_cookies_header_assets( $scripts ) {
    	$scripts .= '<script>console.log(“advanced-head”);</script>';
    	return $scripts;
    }

    HOOK to GDPR custom ADVANCED-PARTY script by php – BODY

    add_action('moove_gdpr_advanced_cookies_body_assets','moove_gdpr_advanced_cookies_body_assets');
    function moove_gdpr_advanced_cookies_body_assets( $scripts ) {
    	$scripts .= '<script>console.log(“advanced-body”);</script>';
    	return $scripts;
    }

    HOOK to GDPR custom ADVANCED-PARTY script by php – FOOTER

    add_action('moove_gdpr_advanced_cookies_footer_assets','moove_gdpr_advanced_cookies_footer_assets');
    function moove_gdpr_advanced_cookies_footer_assets( $scripts ) {
    	$scripts .= '<script>console.log(“advanced-footer”);</script>';
    	return $scripts;
    }

    I hope this helps.

Viewing 1 replies (of 1 total)
  • The topic ‘Conditional php script’ is closed to new replies.