humanswitch / consentcookie

Open source AVG solution for websites
Apache License 2.0
27 stars 10 forks source link

Cannot read property 'isConsentWallAccepted' of undefined #10

Closed christianvriens closed 6 years ago

christianvriens commented 6 years ago

Description

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

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> 
StevenChoo commented 6 years ago

@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.

StevenChoo commented 6 years ago

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

StevenChoo commented 6 years ago

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

StevenChoo commented 6 years ago

fixed by #15

christianvriens commented 6 years ago

Tested and works. Result:

screen shot 2018-04-17 at 14 23 31