EU Cookie Law Disclosure

Issue #42 new
Former user created an issue

Hi, I have your addon installed on my sites.

I am using Google Tag Manager to organize my tracking codes.

Is it possible to set up the addon so it disallows / allows Google Tag Manager to load?

Comments (1)

  1. Fabian Bitter repo owner

    Hi,

    that’s on the roadmap. Currently i’m working on making all add-ons compatible with upcoming version 9. This takes a lot of time.

    In the meantime you can add this as a workaround to your site:

    (function($) {
      $(function(){
        CookieDisclosure.optIn = function () {
            CookieDisclosure.removePopup();
    
            CookieDisclosure.setStatus(true);
    
            dataLayer.push({'event': 'event_name'}); // @todo: enter the event name here
    
            // Remove Cookies server side
            CookieDisclosure.callMethod("optIn", function () {
                if (CookieDisclosure.settings.enablePageReload) {
                    location.reload();
                }
            });
        };
      });
    })(jQuery);
    

    You need to replace the event name and add this to a global area. You can use the HTML block or hardcode it to your theme.

    Fabian

  2. Log in to comment