• Resolved francescopini

    (@francescopini)


    Hi, I’m using your plugin and I have to say that I’m kinda of satisfied with it.

    The problem I have is when I need to use it for Google Analytics.
    Rather than just anonymize the IP, I’d like to block the script if the user doesn’t want profiling/statistics cookies.

    Could you please help with the use of the event you created? I’m talking about “statisticsCookiesEnabled”, “statisticsCookiesDisabled”, “profilingCookiesEnabled”, “profilingCookiesDisabled” and cookiePreferencesUpdated.

    That is unclear.

    Thanks,
    Francesco

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Nicola Modugno

    (@shark986)

    Hello @francescopini,
    SCK should block Google Analytics and should NOT block it only if anonymized, that is what you want, if I understand correctly.
    Or do you want to anonymize Analytics AND block it?
    If you post a link to a site we can check togheter how the plugin is working.

    The events you mentioned are basically triggered for Google Tag Manager.
    Using GTM, you could run scripts when events occurs.
    – “statisticsCookiesEnabled” and “profilingCookiesEnabled” are triggered every time (on every page load) those kind of cookies are enabled (and services unlocked directly from in the page).
    – “statisticsCookiesDisabled” and “profilingCookiesDisabled” are triggered when a user disables those kind of cookies through the popup. Note: only on a “disable choice” and not on every page, because the cookies should be blocked for default.
    – “cookiePreferencesUpdated” is triggered when a user updates its preferences, enabling or disabling cookies.

    “statistics” and “profiling” events are triggered together because at this moment the plugin does not manage different kind of services/cookies, but I have specified them for future implementations.

    Is it a bit more clear now? ??
    Let me know, Nicola.

    Thread Starter francescopini

    (@francescopini)

    Hi Nicola, first of all thanks for the reply.
    The website is this one.

    I decided to use Analytics inside GTM, but using your plugin option “Block Google Tag Manager”, GTM stays blocked also if the user wants statistic/profiling cookies!
    Maybe I understood wrong but I thought that it should allow GTM if the user accepts cookies.

    Thanks for the explanation on your events.
    You’re basically saying that if I use, for example, “profilingCookiesEnabled” as a trigger for Analytics in GTM, I’m able to fire Analytics functionality only if a user accepts cookies, that’s right?

    If so, it’s exactly what I need. =)
    If I’m wrong about how they work, I’m still wondering how to use those events.

    Kind Regards,
    Francesco

    Plugin Author Nicola Modugno

    (@shark986)

    @francescopini the theory is that Smart Cookie Kit does not block GTM if the option “Block Google Tag Manager” is disabled.
    Why Smart Cookie Kit does not block automatically GTM? Because GTM does not install statistical or profiling cookies itself.

    GTM stays blocked also if the user wants statistic/profiling cookies!

    When You enable the “Block GTM” option, Smart Cookie Kit will block GTM script until users won’t accept cookies. That option is useful if you install Analytics or other services by GTM regardless of cookie preferences of the user: SCK will unlock GTM (and all the services it install) only if user accepts statistics AND profiling cookies.

    if I use, for example, “profilingCookiesEnabled” as a trigger for Analytics in GTM, I’m able to fire Analytics functionality only if a user accepts cookies, that’s right?

    That’s exactly what I meant. If you are an advanced GTM user, you can keep disabled the “Block GTM” option and install Analytics and other services by GTM when statisticsCookiesEnabled or profilingCookiesEnabled events are triggered.

    Nicola.

    Thread Starter francescopini

    (@francescopini)

    Thanks very much for the clear and fast answer Nicola.

    What I’m seeing unfortunately is that, if I enable “Block GTM” option, SCK doesn’t block GTM script also if user accept all the cookies.

    For example, on studiorigenera.it, the “Block GTM” option is enabled, but if I don’t use GTM with a “profilingCookiesEnabled” trigger, SCK allows GTM to track everything.

    Maybe I’m doing something wrong but I expected it to be blocked (and non-tracking) after an user decided to refuse cookies.

    Kind Regards,
    Francesco

    Plugin Author Nicola Modugno

    (@shark986)

    @francescopini I am a bit confused as these phrases appears conflicting to me:

    What I’m seeing unfortunately is that, if I enable “Block GTM” option, SCK doesn’t block GTM script also if user accept all the cookies.

    For example, on studiorigenera.it, the “Block GTM” option is enabled, but if I don’t use GTM with a “profilingCookiesEnabled” trigger, SCK allows GTM to track everything.

    BUT, I think to understand the problem.

    As you can see viewing the source code of a page on studiorigenera.it, the noscript version of GTM is correctly blocked, and this means that SCK is properly configured and running. The problem is that the standard version of GTM is not being blocked. It depends by the position of the script in the page, because SCK starts its checks when scripts are supposed to be inserted by the WordPress core.

    I hypothesize that you inserted the script directly in the template file of the theme to follow GTM instructions. On WordPress this is not a good practice. You should insert scripts registering/enqueuing them through the core functions of WordPress. In this case you could use the wp_add_inline_script or follow this question to add the GTM script to pages.

    Give it a try and all should work as expected ??
    Let me know ??

    Thread Starter francescopini

    (@francescopini)

    Thanks,
    the problem was exactly that one!

    Now is working perfectly.

    Awesome Plugin and support.

    Kind Regards,
    Francesco

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Google Analytics configuration’ is closed to new replies.