• Resolved johnpeat

    (@johnpeat)


    I like what this plugin does and how it does it – but I’ve found a slight problem.

    I have a situation where I’d like to set a cookie to a certain value if the user ‘Rejected’ (e.g. it’s the necessary cookie) – this is done by another plugin right now

    I’d like to set the SAME cookie a different value if the user Accepted (e.g. it’s a non-necessary cookie) – I do that via the ‘Non-Necessary Cookie HEAD script box.

    It’s entirely possible that the “Non-necessary cookie” script will run BEFORE the plugin script tho – so the Necessary Value will overwrite the Non-Necessary one!

    Suggestion: Add a ‘Necessary Cookie’ HEAD/BODY script box to your plugin – so that only one or the other is included in the page??

    or is this possible another way??

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WebToffee

    (@webtoffee)

    Hi @johnpeat,

    We are glad that you like our plugin.

    The GDPR Cookie Consent plugin itself sets a cookie named viewed_cookie_policy that sets the value ‘yes’ when the user clicks on Accept and sets the value ‘no’ when the user clicks on reject.

    Currently, the GDPR plugin only helps to block the scripts of the non-necessary cookies that have been added through the plugin. Since the necessary plugins are essential for the proper functioning of the website.
    So for the users to be able to block the scripts of the necessary cookies as well, you have to add the scripts of the cookies through the plugin.

    Also, could you please clarify what you mean by this statement “It’s entirely possible that the “Non-necessary cookie” script will run BEFORE the plugin script tho – so the Necessary Value will overwrite the Non-Necessary one!” ?

    Thread Starter johnpeat

    (@johnpeat)

    Let’s assume I have a cookie which must be set – but it’s value will be different depending on whether the user ‘accepted’ or not.

    For users who don’t “Accept” it needs to be set to one value
    If a user has “Accepted” it needs a different value.

    Right now I have set that cookie in the HEAD of the page
    I can then set it through the plugin for users who ‘Accept’

    What I can’t control is whether my setting of the cookie happens before or after the plugin code runs as they’re both in HEAD???

    This is why I suggested having a section for running scripts if a user DOESN’T accept – that way, this plugin can solve that issue

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Necessary Cookie alternative’ is closed to new replies.