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;
}
You can test it with the “pixelyoursite” plugin, but because our plugin loads the script using Javascript and AJAX, I’m not sure if this will work for you. You have to confirm this with your developer, and if is not working, my suggestion is to remove the “pixelyoursite” plugin, and add the Facebook pixel tracking code by javascript.
I hope this helps.