• Resolved mhayek83

    (@mhayek83)


    Hi!

    Warning: My experience with coding is minimal.

    I’ve “installed” Cookiebot on my site via Google Tag Manager as described here: https://cybot.uservoice.com/knowledgebase/articles/425087-google-tag-manager-deployment, and I do get a neat banner with the consent options and all that.

    For the cookie declaration, I just copied the code from cookiebot manager into the page I’m going to use solely for the purpose and it works fine.

    But! I’m really struggling with getting the cookies actually allowed or blocked using the above plus modifying plugins based on user selections in the banner.

    So my first question is: If I do use GTM like I did? Do I have to trigger the enabling/disabling of individual cookies also via GTM? How do I do that for things other than Google’s own Analytics that you showed an example for?
    For example, how do I implement such a trigger for “Facebook for woocommerce” plugin cookies?

    And if I don’t have to do everything in GTM or everything by coding on my site, then question 2:
    Following instructions that were given to another ticket here (https://www.ads-software.com/support/topic/where-are-the-script-tags/), I found out which line in the source code triggers the fr cookie, I already knew it was a Facebook one, I found the function in the plugin code, and changed <script type=’text/javascript’> to <script type=’text/plain’ data-cookieconsent=’marketing’> and saved. After deleting my browser cookies and starting over, I see that this cookie doesn’t get set at all, regardless of what I choose in the banner.
    What have I done wrong?

    Thanks,
    Maria

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author cookiebot

    (@cookiebot)

    Hi @mhayek83

    Thanks for reaching out!

    As far as we can tell from your description, you’ve done it right.

    You can’t control what your plugins are doing via GTM, so you have to mark up the scripts manually. And from what we can tell you’ve done that.

    Please note: If your existing trigger is of the event type “Page View”, you need to change it to event type “Window Loaded” since the visitor’s consent is not available to GTM before the window has loaded.

    Does this fix your issue?

    [ Signature deleted ]

    • This reply was modified 6 years, 9 months ago by Jan Dembowski.
    Thread Starter mhayek83

    (@mhayek83)

    Hi Cookiebot team, and thanks for the answer.
    Unfortunately changing the event type didn’t work for me. The cookie I try to control becomes always disabled regardless of choice in the banner.

    Does language matter? the fact that my site is in Norwegian and that’s also the language I use Cookiebot in? Shouldn’t, right? code is code.

    Another question that arises here is: How about widgets? I tried to test this out on another cookie just to be sure, and by coincidence tried NID set by Jetpack contact info widget with an imbedded Google map. As far as I understand, it’s that Google map that results in NID being set. How do I handle those?

    I feel like I’m digging such a deep hole with this GDPR business, that I won’t be able to come out of it when/ if done ??

    Thanks,
    Maria

    Plugin Author cookiebot

    (@cookiebot)

    @mhayek83

    Unfortunately changing the event type didn’t work for me. The cookie I try to control becomes always disabled regardless of choice in the banner.

    Can you give us a code example on how you are “tagging” the script that is setting the cookie?

    Does language matter? the fact that my site is in Norwegian and that’s also the language I use Cookiebot in? Shouldn’t, right? code is code.

    The language does not matter.

    Another question that arises here is: How about widgets? I tried to test this out on another cookie just to be sure, and by coincidence tried NID set by Jetpack contact info widget with an imbedded Google map. As far as I understand, it’s that Google map that results in NID being set. How do I handle those?

    We’re are developing an Addon for Jetpack, that can integrate Jetpack and Cookiebot. You can follow the progress at https://github.com/CybotAS/CookiebotAddons – should be finished soon.

    Is the Google Map an iframe or a JS call ?

    Thread Starter mhayek83

    (@mhayek83)

    Can you give us a code example on how you are “tagging” the script that is setting the cookie?
    Yes!
    1. Went into the report and selected this:
    fr facebook.com HTTP 3 months
    First found URL: https://www.cottoncandy.no/blogg/
    Cookie purpose description: Used by Facebook to deliver a series of advertisement products such as real time bidding from third party advertisers.
    Initiator: Script tag, page source line number 280

    2. Went to the URL above, view page source and found line 280:
    280 <script>
    281 fbq(‘init’, ‘917314418431527’, {
    The function was a bit above that at line 273:
    272 <script type=’text/javascript’>
    273 !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
    274 n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;

    3. Went into my WordPress admin page, plugins –> editor, selected Facebook for Woocommerce, found the exact same function lines in facebook-commerce-pixel-event.php, looked like this:
    <script type=’text/javascript’>
    !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
    n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;

    4. Changed the top line there <script type=’text/javascript’>, to <script type=’text/plain’ data-cookieconsent=’marketing’> and saved.

    5. Cleared caches, refreshed pages, tried a few times with marketing not selected in the banner, and a few with it selected, and didn’t manage to get the plugin set at all.

    Is the Google Map an iframe or a JS call ?
    According to the cookiebot report, iframe.

    Thanks,
    Maria

    Plugin Author cookiebot

    (@cookiebot)

    @mhayek83

    Thanks for the detailed explanation.

    From what I can see on your site, the “text/plain” part is not added to the function at line 267.

    I’ve found the plugin that you are talking about here;

    https://github.com/facebookincubator/facebook-for-woocommerce/blob/3c858c9ba535a1c9cf7603ee418e3adc80117c26/facebook-commerce-pixel-event.php

    Did you add the modification to line 78 ?

    Thread Starter mhayek83

    (@mhayek83)

    No, I have not. Had no idea I had to. Do I have to? (as I mentioned earlier minimal coding knowledge…).
    I have reverted the change on my site since it didn’t work, that’d probably explain why you don’t see it.
    What do you suggest I try next then? Apply the change to both line 78 and 22? (Referring to line numbering on github)

    Thanks,
    Maria

    Plugin Author cookiebot

    (@cookiebot)

    @mhayek83 sorry for the slow response.

    Playing around with this specific plugin requires some time, and we are very busy at the moment.

    We’ll get back to you as soon as possible and thanks for your understanding.

    Thread Starter mhayek83

    (@mhayek83)

    Alright, I’ll wait. Thank you for your help.

    Maria

    Plugin Author cookiebot

    (@cookiebot)

    @mhayek83

    What do you suggest I try next then? Apply the change to both line 78 and 22? (Referring to line numbering on github)

    Sorry for the delay. I’ve just tested, and yes, this works. Please try it out.

    Since you mentioned that you use Jetpack, we’ve had our coders do a Cookiebot -> Jetpack integration, where the Google Map widget is withheld from showing, until the user gives consent to marketing cookies. There is even a link to change the users consent, with some text saying; please accept marketing cookies to see this map. Right now the text is hardcoded but will be editable later. Take a look at the installation instructions here; https://github.com/CybotAS/CookiebotAddons (push the Clone or Download button -> Download ZIP)

    For your convenience, we will soon release this as a WP plugin, that can run side-by-side with Cookiebot. Moreover, we’ll add Facebook for WooCommerce integration there as well, so you wont have to update it manually again.

    • This reply was modified 6 years, 9 months ago by cookiebot.
    • This reply was modified 6 years, 9 months ago by cookiebot.
    Thread Starter mhayek83

    (@mhayek83)

    Sounds awesome! Thanks! That should take care of a big chunk of fickling with code that I was dreading.
    I’ll do what you advised in your answer for now and wait for the WP plugin(s).

    Thanks again,
    Maria

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Cookiebot via GTM’ is closed to new replies.