Code Monkey home page Code Monkey logo

Comments (11)

maddovr avatar maddovr commented on July 23, 2024

I don't know where cookies are used in this theme, but I think the first easily solvable issue should be adding an option to Google Analytics to anonymize IPs @kitian616

from jekyll-text-theme.

maddovr avatar maddovr commented on July 23, 2024

So in order for a website to be GDPR compliant, aside from merging #63 there isn't really anything which should be done I the project itself. However I have a question(two actually). According to https://cookieconsent.insites.com (which I used for my banner) you need to add the banner before and I did so in the base.html layout, however nothing showed up. What am I doing wrong? Another thing is that GDPR requires cookie opt-ins and the possibility to revoke the consent, which means first load should disable all cookies, the above mentioned website gives a code block here but I have no idea where I should put it. Ideas?

from jekyll-text-theme.

kitian616 avatar kitian616 commented on July 23, 2024

Add code like this?

<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"></script>
<script>
window.addEventListener("load", function(){
  ...
});
</script>

If so, maybe because the load event emitted before you use addEventListener to bind the handler function.

from jekyll-text-theme.

maddovr avatar maddovr commented on July 23, 2024

Yea I managed to get the banner working, however for callback hook to actually block cookies, I have no clue. Any ideas?

from jekyll-text-theme.

kitian616 avatar kitian616 commented on July 23, 2024

You can just try to remove the addEventListener if you put this code at the bottom of the <body> block, eg:

(function() {
  ...
})();

And also, you can use window.pageLoad to handle the callback, even the load event has been emitted, the callback would still working:

window.pageLoad.then(function() {
  ...
});

You can see the source here

from jekyll-text-theme.

maddovr avatar maddovr commented on July 23, 2024

So basically I should put this inside utils.js?

  var type = this.options.type;
  var didConsent = this.hasConsented();
  if (type == 'opt-in' && didConsent) {
    // enable cookies
  }
  if (type == 'opt-out' && !didConsent) {
    // disable cookies
  }
},
 
onStatusChange: function(status, chosenBefore) {
  var type = this.options.type;
  var didConsent = this.hasConsented();
  if (type == 'opt-in' && didConsent) {
    // enable cookies
  }
  if (type == 'opt-out' && !didConsent) {
    // disable cookies
  }
},
 
onRevokeChoice: function() {
  var type = this.options.type;
  if (type == 'opt-in') {
    // disable cookies
  }
  if (type == 'opt-out') {
    // enable cookies
  }
},

Like I said I've no clue on this.

from jekyll-text-theme.

kitian616 avatar kitian616 commented on July 23, 2024

You can put it in utils.js, and you can also put it in common. https://github.com/kitian616/jekyll-TeXt-theme/blob/master/_includes/scripts/common.js

from jekyll-text-theme.

maddovr avatar maddovr commented on July 23, 2024

Mmm, how do I specify Disqus cookie? The only one that needs prior consent is Disqus if you set IP anonymization in google analytics.

from jekyll-text-theme.

maddovr avatar maddovr commented on July 23, 2024

Fixed the problem thank you! So long as #63 (the one in the comment tho) is merged this issue can be closed as it's the only one modification that truly needs to be added to the code itself.

from jekyll-text-theme.

kitian616 avatar kitian616 commented on July 23, 2024

errr.. why you want to specify Disqus cookie, something to do with the banner?

so it's almost May 25th, I'll merge it tonight.

from jekyll-text-theme.

maddovr avatar maddovr commented on July 23, 2024

Well you need to disable Disqus entirely until the users click "Agree" on the banner, and you also need to disable Disqus once again if the users ever revoke their choice. Welcome to EU Laws

from jekyll-text-theme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.