• Resolved chuchuju

    (@chuchuju)


    Hello, I have a problem with google analytics.
    I have the tracking code in the header of my website (gtag.js)
    My problem is that I have now 2 trackings GA and the analysis of google analytics are distorted : I have a 0% rebound rate and it’s not normal (I checked with “google tag assistant”).
    The cookies scan with complianz indicates the google analytics cookie and put the tracking code somewhere. I removed the tracking code by saying “no, I don’t have tracking” in the assistant but it still put the tracking code somewhere.
    I checked in class-cookie.php because I suppose it might comes from here (maybe line 563) but I’m afraid to do somethig wrong.
    I don’t want that complianz add the tracking code because that gives me faulse results in google analytics, how can I do ?
    I hope there is a solution because your plugin is the greatest I found.
    Thank you.

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Rogier Lankhorst

    (@rogierlankhorst)

    Hi @chuchuju,

    When Complianz adds the analytics code, it will have analytics.js in the src, and the script element will have the classes cmplz-stats cmplz-native.

    I just checked your site, I only see one piece of analytics code, and not the snippet Complianz will add, which seems as you have configured it in the settings.

    Your current implementation is without the “anonymizeIp” attribute. Because IP’s are not anonymized, the plugin will block statistics tracking until the user consents. This might affect your GA results. To resolve this, you can either let Complianz configure Google Analytics for you, and remove your own script, or you can add the anonymize ip part to your own script.

    For some more background on this and information how to configure Google Analytics, see also this article:
    https://complianz.io/how-to-configure-google-analytics-for-gdpr/

    Let me know if this answers your question!

    Plugin Contributor Rogier Lankhorst

    (@rogierlankhorst)

    I just noticed you use a Tag Manager implementation, with an anonymizeIp attribute. Was looking for analytics before, I guess that’s why I missed it.

    The current version of the plugin does not yet recognize Tag Manager with anonymizeIp attribute.

    I have adjusted the cookie blocker to allow for GTM with anonymizeIp as attribute. You can check if this works for you by replacing this file in the plugin:
    https://raw.githubusercontent.com/rlankhorst/complianz-gdpr/master/core/php/class-cookie-blocker.php

    Thread Starter chuchuju

    (@chuchuju)

    Hello and thank you so much for your concern and your replies.
    In fact, I’m not a developer, I learned a little to be able to understand and make some little changes here or there.
    A tryied to anonymise following your first reply (that’s why you thought you’ve missed something). I added a bit of code (var _gaq = _gaq || []; _gaq . push ([ ‘_setAccount’ , ‘UA-XXXXXX’ ]); _gaq . push ([ ‘_gat._anonymizeIp’ ]); _gaq . push ([ ‘_trackPageview’ ]);)
    to anonymise but I think it makes a double tag too and don’t resolve my problem of double clic (that gives me a faulse rebond rate 0%) I writed to google support, they replyied to me to my first post but didn’t reply my second post to settle that problem of coding. (the entire code I put in the header is : <script async src=”https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXX”></script&gt;
    <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag(‘js’, new Date());

    gtag(‘config’, ‘UA-XXXXXXXX’);

    var _gaq = _gaq || []; _gaq . push ([ ‘_setAccount’ , ‘UA-XXXXXX’ ]); _gaq . push ([ ‘_gat._anonymizeIp’ ]); _gaq . push ([ ‘_trackPageview’ ]);
    </script> )
    if I remove the fisrt part, I have an error. I’m not good enough to understand everything and I don’t understand everything (neither with tag manager) but I tested today and I still have my problem with faulse double clic and I think it comes from the double tag with my error of anonymise code I added. I have to resolve this problem first before trying to replace the file in the plugin (I think).
    I’m a little bit lost… ??

    Plugin Contributor Rogier Lankhorst

    (@rogierlankhorst)

    I think it will be easier if you remove this code, and let Complianz configure Google Tag Manager for you in the Wizard. This will ensure that GTM gets fired on page load.

    Thread Starter chuchuju

    (@chuchuju)

    Hello and really, thank you so much for everything !!! You are really so kind !
    In fact, I prefer to let the tracking code in the header for 2 reasons : it’s the best way according to google support it’s better to do like this. And the second reason is that if I remove the plugin, I won’t have tracking anymore and I might forget I put the tracking code in the plugin (I totally forgot I put the code in the plugin and I spent a lot of time to find where the double clic came from).

    I’m not sure to want anonymise the datas and follow the steps you give uper to configure Google Analytics beacause my report will be incomplete and for the promote of the website.

    I’ve just thought about something, maybe I can remove the tracking code from the header, make a new analysis of cookies with the plugin (maybe it wouldn’t see the google analytics) and then reset the tracking code in my header. It is wacky but could resolve my problem. I could add a note in the cookies notice and in the privicy policy page to warn users. What do you think ? Could it work ?

    I can add your acount in my tag manager as an admin (I’m sorry I’m a moron), but where do I have do add it ? In the ADVANCED OPTIONS of tag manager (“get google analytic account”) ?
    Maybe it’s possible to fix this without adding ananymiselp in my tracking code. Maybe it’s possible to adjust the cookie blocker so that it doesn’t add the tag which makes a double tracking that gives me faulse result of rebond rate ?

    What do you think ?
    Again, thank you so so much for your concern, I’m touched really !
    I make another website for an association and I would like to use your plugin too because it is really the best I found and tryied (thoose news laws of privicy policy really bother me !)

    Kind regards !

    Plugin Author Aert Hulsebos

    (@aahulsebos)

    Hi @chuchuju,

    Complianz will categorize the Analytics code as non-functional, if Anonymize IP is not configured, by default. There’s no option to circumvent this.

    Regarding this configuration: https://complianz.io/how-to-configure-google-analytics-for-gdpr/, to configure Analytics as functional cookie.

    For the most part this is to disable sharing these IP-addresses with Google. Your Analytics Dashboard won’t suffer because of it. The only change we have noticed is a broader GEO location of your visitors, from IP to Postal Code or City. If you don’t need a more specific location of your users, anonymizing your IP will be best for GDPR and collecting data.

    Because the new Analytics codes are a-synchronous, placing the script is less relevant than before. Our reason to add it to the body tags, is to wait for the first interactive elements to be loaded, so we can skip most useless pageloads, which will increase your bounce-rate unnecessarily.

    Our advice is to let Complianz handle Tag Manager, and set your Analytics code on anonymize in Tag Manager. If you need help. This screenshot tells you where to add a new user: https://prnt.sc/myqg52

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘problems with google analytics’ is closed to new replies.