Cookies - modal opens every time

3 replies · opened Mar 17, 2021

RRed99Mar 17, 2021

Guys, this is my 2nd purchase of your brill template, really happy with it. Great work.

I'm working on my local TEST site at moment only..

I'm confused about how the gdpr/cookie file works and I can't seem to stop the Modal window appearing every visit. I may not be implementing it correctly so apologises. Also sorry if this is done before but I can't find answer, not in your docs and I believe you say your docs will be updated with cookie/gdpr instructions soon but not yet !

My Code block on page..
<div class="gdpr-settings gdpr-settings-sm dark">
<div class="container-fluid">
<div class="row align-items-center">
<div class="col-12 mb-5 text-center">
<p class="lead mb-0">We use cookies on this website for navigation purposes only. No personal data is stored at all. Read about how we use cookies and how you can control them by clicking the "Privacy Policy" button below otherwise Accept and Close.</p>
</div>
<div class="col-12 text-center">
<button class="btn btn-lg btn-outline-warning gdpr-accept">Accept & Close</button><br>
Privacy Policy
</div>
</div>
</div>
</div>
...
this at bottom of page..
<script src="js/jquery.js"></script>
<script src="js/plugins-cookie.js"></script>
<script src="js/functions.js"></script>
...
In plugins-cookie.js file I have edit to set 'date-expire' to 7 (days)

All I want to do is allow the visitor to

  1. Accept & Close and create the cookie for 7 days

  2. They can also visit our Privacy page for reading if they wish

  3. I do not wish to call the 'gdpr-preferences' modal window but just set/create the cookie after Accept&Close button clicked.

  4. I do not want my modal Accept & Close window to reappear if they have set cookie.

Q. Can you advise if this is possible and how to get it working ?

Thanks in advance.

SSemicolon WebSTAFFMar 18, 2021

Hello,

Thank You so much for the Kind Words! :)

Apologies for the Kind Words! :) By Default, the GDPR Notifications should not appear after the Accept & Close button has been clicked. Please check if you have the data-persistent="true" Attribute added, and remove it.

The Script at the bottom of the Page should be:
[ch_pre][/ch_pre]

Regarding your Questions:

  1. To make the GDPR Cookie Settings expire after 7 Days, use the data-expire="7" Attribute on the .gdpr-settings DIV.

  2. You can add a Custom Link anywhere in the Panel according to your needs.

  3. A Cookie is set by default when clicking the Accept & Close Button.

  4. The GDPR Settings Notification does not appear by default when the cookie is set.

Hope this Helps! We will be adding more related documentation on this shortly.

Let us know if we can help you with anything else or if you find any further issues.

RRed99Mar 18, 2021

OK I had an error within the cookie.js file, reset to base copy.
Added data-expire to div and now sorted.
Thank you...all good now.

Great support !

SSemicolon WebSTAFFMar 18, 2021

Hello,

Glad that the issue was resolved! Very Happy to Help! :)

Do let us know if we can help you with anything else.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard