• Hi guys,

    Thank you for your awesome work on the plugin.

    I noticed a few bugs that should be solve before GDPR.

    The script gingeranalytics is already active when the website is loaded withouth the consent of the website visitor.

    You advertise that you natively support the blocking of iframes from youtube, instagram, etc. On my website, none of these iframes is blocked. Only manual editing allowed me to block the iframes. Unfortunately it doesn’t work at all for Instagram.

    Anyway, keep up that great work and thank you guys in advance for your response ??

    Regards
    Travelographer

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hey, as far as I see if you do not accept the cookie it adds the GA tracking but with anonymize = true for hiding the IP address. My question would be in addition to that because event if someone accepts I want to anonymize the ip, is this possible to add this setting?

    On my blog it is blocked. Maybe not all version of the GA scripts are blocked.

    Stefano.

    Thread Starter Travelographer

    (@travelographer)

    Hi guys,

    unfortunately the official support didn’t respond so far. As it is an important GDPR issue, I’ve tried to solve it by my own.

    In the folder ginger\addon\analytics you can find the javascript that is added when some pushes the accept button. (gingeranalytics.js & gingeranalytics.min.js)

    There you can also find the anonymize code you mentioned @johannes89

    So, if you really want an opt-in that your user have to consent for getting tracked by GA, then you just simply replace the original code with the following code in the file gingeranalytics.js

    
    /**
     * Created by matteobarale on 09/07/15.
     */
    function gingeranalytics(code) {
        console.log(code);
        console.log(getCookie('ginger-cookie'));
    
        if(getCookie('ginger-cookie') == 'Y'){
            var gacode =  "ga('create', '" + code + "', 'auto'); ga('set', 'anonymizeIP', true); ga('send', 'pageview');";
            var scriptanalytics = document.createElement('script');
    		    scriptanalytics.type = 'text/javascript';
    		    scriptanalytics.innerHTML = '(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\',\'//www.google-analytics.com/analytics.js\',\'ga\');' + gacode;
    		    console.log(scriptanalytics);
        	document.getElementsByTagName('head')[0].appendChild(scriptanalytics);
        }else{
    
        }
    
    }
    
    function getCookie(cname) {
        var name = cname + "=";
        var ca = document.cookie.split(';');
        for(var i=0; i<ca.length; i++) {
            var c = ca[i];
            while (c.charAt(0)==' ') c = c.substring(1);
            if (c.indexOf(name) == 0) return c.substring(name.length,c.length);
        }
        return "";
    }
    

    Hello,

    Im having same problem,

    Tried to move the analytics code on diferents places, also copied your ginger analytics functions. But when I open my web cookies from GA are enabled.

    I’ve read that this pluguins can stop GA cookies. Can anybody help on this plz?

    Thx

    Hello all,

    I could finally fix it, you must put the standard GA .js code, with global site gcag.js it wont work!!

    Thx all

    Thread Starter Travelographer

    (@travelographer)

    Hi @asilva2,

    Ginger Cookies alway embed the .min.js files. So please consider to change the code in these files as well ??

    Regards

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Opt-In doesn’t work – GA is active onload’ is closed to new replies.