Support » Plugin: GDPR Cookie Compliance (CCPA ready) » Changing priority of third party cookie

  • Resolved olegburakov


    Hello! I’ve got google analytics at the third party header section but it loads too late.

    I disable ajax loading as you answered to some similar question by this
    add_action( 'gdpr_cc_prevent_ajax_script_inject', '__return_true' );

    But still this looks a little like a hack to me, because the 3rd party HEAD scripts loading in the BOTTOM of the page SEO guys are making A/B testing via google analytics and they want immediately loading of the GA in the head without any delays. Is it possible to output this section in the <head>? Thanks!

    • This topic was modified 11 months, 2 weeks ago by olegburakov.

    The page I need help with: [log in to see the link]

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


    Hi @olegburakov,

    Thanks for using our plugins.

    You can add the following code snippet to your functions.php in order to get rid of the execution delay:

    add_filter( 'gdpr_init_script_delay', 'gdpr_delay_script_execution', 20, 1 );
    				function gdpr_delay_script_execution( $ms ) {
    					return 0; // 5000 ms = 5 seconds.

    By default, there is a 2 second delay to improve the CLS.

    Hope this helps.

    Thread Starter olegburakov


    Thank you a lot @mooveagency !

    I’ll test it and give a feedback!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Changing priority of third party cookie’ is closed to new replies.