activescott / cookieconsent

A free solution to the EU, GDPR, and California Cookie Laws

Home Page:https://www.npmjs.com/package/@activescott/cookieconsent

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to handle returned data from the library

Petrit-Halabaku opened this issue · comments

@activescott

Upon start, the library gives us these data, of course, if you choose the type: "categories".

Untitled

How can we use these data and those chosen by the user and return us an object/array so that we can manipulate those data? This is the returned data after choosing one of the boxes and submitting the form.

Untitled

@Petrit-Halabaku I created an example and put it in the docs/events-example branch. Direct link to the example at https://github.com/activescott/cookieconsent/tree/docs/events-example/examples-new/events

Does this answer your question?

From that example, this is the bit that matters:

cc.on("statusChanged", function statusChanged() {

As far as I can tell this is resolved in #87. Please let me know if I missed something.