klaro-org / klaro-js

Klaro Privacy Manager. An open-source, privacy-friendly & compliant consent manager for your website.

Home Page:https://klaro.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reset Consent button: how to pass right parameter

queengab opened this issue · comments

Hi,

this is my first post here good morning!
So first, thanks for sharing your Klaro Consent plugin, is awesome! Thanks very much.

Now I'm using for the first time Klaro on a new website under construction.
With a plugin and Laraveloframework.

I struggled a little (in particular with google analytics cause i can't understand it needed a "data-name" parameter ) but after some times i'm entered, i hope, in the spirit!

Now the first time, i can see the dialog box in the left-bottom corner of the page. I can see the dialog box with all three buttons, and it's ok.

Now i have question: i'd like to insert on my footer two buttons like yuo example here

<button class="btn btn-theme-orange" onClick="return klaro.show(klaroConfig, true)">Verify your cookies</button>
<button class="btn btn-theme-orange" onClick="klaro.getManager().resetConsents();location.reload()">Manage the consent</button>

The firs button works well. The second don't show nothing. I tried to read the klaro.js to understand how to pass the correct parameter on klaro.show or klaro.getManager but i failed!

I use klaro-no-css.js file

Can you suggest me something?

I like to intoduce a button like this also in my cosent page to adhere europen policy.

My second question

@queengab

Please consider this as just an example of what I have done:

onClick="window.klaro.getManager().resetConsents();klaro.show(klaroConfig)" instead of a location.reload().

The example of Fabian, you mentioned above, uses the hosted Klaro service.