humanswitch/consentcookie

Cannot read property 'isConsentWallAccepted' of undefined

Closed this issue · 5 comments

Description

Copied the script from the configurator to my website to put consentcookie live.

  • Button is visible
  • Cannot click on the ConsentCookie.
  • Got error in the console.

screen shot 2018-04-09 at 10 31 55

My script:

<script src="//www.consentcookie.nl/consentcookie/dev/consentcookie.min.js"></script>
<script>window.ConsentCookie.init({
   "apps": {
      "endpoint": "https://www.consentcookie.nl/consentcookie/latest/consentcookie.json",
      "consent": {
         "cc": {
            "initstate": "optin"
         },
         "ga": {
            "initstate": "optin"
         },
         "gtm": {
            "initstate": "optin"
         }
      }
   },
   "design": {
      "layout": {
         "position": "right"
      },
      "colorscheme": {
         "primary": "#6DE2FC",
         "secondary": "#FFFFFF",
         "tertiary": "#FFFFFF"
      }
   },
   "resources": {
      "nl": {
         "info": {
            "title": "Over ConsentCookie",
            "text": "<p>Baas over eigen data, dat vinden wij heel normaal. Niet alleen vanwege de AVG, maar omdat wij geloven in transparantie en fatsoen. Daarom gebruiken wij ConsentCookie.</p>\n<p>ConsentCookie laat jou zien welke data we van jou verzamelen en waarom we dat doen. Ga naar Jouw instellingen om jouw persoonlijke voorkeuren vast te leggen. Ze zijn daarna direct van kracht en kunnen op elk moment worden aangepast.</p>\n<p>ConsentCookie op jouw eigen website gebruiken?<br />Voor meer informatie:<a href=\"\\&quot;http:/www.consentcookie.nl\\&quot;\">www.consentcookie.nl</a></p>"
         }
      }
   }
});
</script> 

@christianvriens It seems to be a version issue, where the wrong script is loaded. Could you please test it again after making sure the the script isn`t loaded from cache.

I think someone might suggested it already, but It probably would be good to add a version to global API object so we can trace back errors to a specific version.

@christianvriens Could you also check what values are set for the cookie consentcookie and if there is a value set with the name ccw

Issue should be fixed. @christianvriens Could you confirm this?

fixed by #15

Tested and works. Result:

screen shot 2018-04-17 at 14 23 31