Support » Plugin: GDPR Cookie Compliance (CCPA, DSGVO, Cookie Consent) » Use this plugin with google analytic dashboard

  • Resolved jessydan



    I use the plugin Google Analytics Dashboard For WordPress and this plugin include the google analytics script at the bottom of my page. So even if I use your plugin to put the script only when the user don’t check the “3rd Party Cookies” the google analytic script is include by GADWP.

    How can I process ?

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



    Thanks for using our plugin!

    You will need to remove the script from your Google Analytics Dashboard For WordPress plugin, otherwise, your GA script will be added twice to your site.

    Hope this helps.

    Hi @mooveagency,

    I had a similar question. Some other, similar plugins include functions that can be accessed in functions.php to check whether a user has accepted the cookie agreement, etc., so that you can disable GA using the ga-disable-xxxxx cookie.

    As an example with monster insights, let’s imagine that your plugin included a function called moove_third_party_cookies_accepted which would tell us if a user had accepted third party cookies. This code might look like:

    add_action( 'init', 'toggle_monster_insights_based_on_moove' );
    function toggle_monster_insights_based_on_moove() {
        if ( function_exists( 'moove_third_party_cookies_accepted' ) && function_exists('monsterinsights_get_ua')) {
            if ( moove_third_party_cookies_accepted() ) {
                setCookie( 'ga-disable-'.monsterinsights_get_ua(), 'false' );
    	     setCookie( 'ga-disable-'.monsterinsights_get_ua(), 'true' );

    Otherwise, would it be recommended to do something such as:

    $cookie = isset($_COOKIE) && isset($_COOKIE["moove_gdpr_popup"]) ? $_COOKIE["moove_gdpr_popup"] : "";
    $decoded = urldecode($cookie);
    $json = json_decode($decoded, true);
    if(isset($json) && isset($json["thirdparty"]) && $json["thirdparty"] == "1"){
        setCookie( 'ga-disable-XXXXXX-X', 'false' );
    } else {
        setCookie( 'ga-disable-XXXXXX-X', 'true' );


    • This reply was modified 5 years, 1 month ago by cmborchert.
    Plugin Author Moove Agency


    Hi @cmborchert,

    Sorry for the late reply on this.

    Please update the plugin to the latest (1.3.0) version, we’ve implemented PHP cookie checking functions like:

    gdpr_cookie_is_accepted( 'strict' )
    gdpr_cookie_is_accepted( 'thirdparty' )
    gdpr_cookie_is_accepted( 'advanced' )

    So using the functions above, you can disable the Facebook plugin for WooCommerce using the following code snippet:

    function third_party_cookies_accepted () {
    	$enabled = false;
    	if ( function_exists( 'gdpr_cookie_is_accepted' ) ) :
    		$enabled = gdpr_cookie_is_accepted( 'thirdparty' );
    	return $enabled;

    add_action( 'gdpr_force_reload', '__return_true' );

    Note: Don’t forget to enable the force_reload once the code snippet is added (gdpr_force_reload hook from the snippet above)!

    I hope this helps.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Use this plugin with google analytic dashboard’ is closed to new replies.