Viewing 1 replies (of 1 total)
  • Plugin Author Moove Agency

    (@mooveagency)

    Hi Niko,

    Thanks for using our plugins.

    You can try the following code snippet (should be added to functions.php)

    add_filter( 'gtm4wp_get_the_gtm_tag', 'gdpr_cookie_compliance_gtm4wp' );
    function gdpr_cookie_compliance_gtm4wp( $gtm_script = '' ) {
    	if ( function_exists( 'gdpr_cookie_is_accepted' ) ) :
    		return gdpr_cookie_is_accepted( 'thirdparty' ) ? $gtm_script : '';
    	else :
    		return $gtm_script;
    	endif;
    }
    add_action( 'gdpr_force_reload', '__return_true' );

    Hope this helps.

Viewing 1 replies (of 1 total)
  • The topic ‘Hook for Google Tag Manager?’ is closed to new replies.