Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Forum: Plugins
    In reply to: [GDPR] Adsenses ?

    Identify which cookies are set by adsense. Add them to a new section GDPR -> Settings -> Cookies.

    Before instantiating your adsense script, check is_allowed_cookie('adsensecookie') where ‘adsensecookie’ is the cookie you previously identified coming from adsense.

    Forum: Plugins
    In reply to: [GDPR] Opt out not working

    There is no opt-out yet, my friend.

    GDPR compliance states that no cookies should be collected BEFORE they accept. Is this something that may be implemented?

    I’ve read this in a number of places too but it’s not about having no cookies set on page load, it’s about having no cookies set WITH personally identifiable information.

    For example this plugin sets two necessary cookies, both of which are GDPR compliant.

    I don’t think that addresses the problem as there is no way for the end-user to revoke consent or to opt-out. Unless I’m missing something?

    No problem, I definitely see what you’re saying. Currently this plugin doesn’t have opt-out functionality.

    Ideally, most of your cookies will not be “Must Use”, and you’ll allow users to opt-out of them. But this feature wont be released until V2.

    I’m in the same boat as you actually. Currently we have all our cookies set to “Must Use” which is not GDPR compliant. Users have no choice but to accept the cookies or leave the website.

    Waiting (not so) patiently for v2 πŸ˜›

    In your browser console can you type is_allowed_cookie('_ga'), does it return true? If so, clear your cookies for your site and run that command again. It should return false now.

    View post on imgur.com

    • This reply was modified 7 years, 10 months ago by solvitieg.

    I think it’s working just as it should. Perhaps a “dismiss” button could be added in a later version. The dismiss button would hide the cookie consent banner.

    But otherwise, from what you described, it’s working as you would expect. Your cookies are “must use”, therefore they’re set on load. The user can agree, dismissing the banner, or leave your website.

    Regarding the visited cookie. Personally I wasn’t able to reproduce it on your site. You might want to audit your plugins, but you could also check the Cookie’s value. If the cookie doesn’t contain personal information it’s safe to just leave.

    Browser plugins/extensions can set cookies too. Might be coming from there

    You can implement it in both those code snippets.

    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXX-X"></script>
    <script>
      if (is_allowed_cookie('_ga') && is_allowed_cookie('_gid')) {
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());gtag('config', 'UA-XXXXXXXX-X', {"anonymize_ip":true,"allow_display_features":false,"link_attribution":false});
      }
    </script>

    I’ve formatted the code slightly so you can see the if statement. You’ll want to double check the cookie name(s), as I see you’re using Google Tag Manager and I’m not familiar with which cookies it sets.

    Or for your second snippet:

    public static function ua() {
      if (!is_allowed_cookie('_ga') || !is_allowed_cookie('_gid')) {
        return false;
      }
      $domain = ((empty(self::$settings['domain']))?'auto':self::$settings['disable-analytics-integration']);
    
      $code  = '<script>';
      $code .= "
        (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
        })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');";
    
      $code .= sprintf(
        "ga('create', '%s', '%s');",
    
        esc_attr(self::$uaid),
        $domain
      );
    
      if( ! empty(self::$settings['custom-code']) ) {
        $code .= self::$settings['custom-code'];
      }
    
      if( self::$settings['linkid'] ) {
        $code .= "ga('require', 'linkid');";
      }
    
      if( self::$settings['displayfeatures'] ) {
        $code .= "ga('require', 'displayfeatures');";
      } else {
        $code .= "ga('set', 'displayFeaturesTask', null);";
      }
    
      if( self::$settings['anonymize_ip'] ) {
        $code .= "ga('set', 'anonymizeIp', true);";
      }
    
      $code .= "ga('send', 'pageview');";
    
      $code .= '</script>';
    }

    Did you switch plugins after you made this post? The consent bar is not the one from this plugin.

    +1, this would be huge. Successfully implemented opt-in consent using this great plugin.

    From my understanding this would allow some cookies to be set when the user clicks “I agree”.

    @ate-up-with-motor,

    You don’t need Google Analytics Germanized to get this working. You are correct that Google Analytics is instantiated from ga.js (or analytics.js).

    How is that script currently implemented in your wordpress site? If you can find that script, simply check is_allowed_cookie().

    Example:

    <script>
      if (is_allowed_cookie('_ga') && is_allowed_cookie('_gid')) {
        (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
        })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
    
        ga('create', 'XXXXXXXXXX', 'auto');
        ga('send', 'pageview');
      }
    </script>

    In your GDPR setup, ensure you have _gid and _ga set as opt-in “Cookies used by this site”.

Viewing 11 replies - 1 through 11 (of 11 total)