Giter Site home page Giter Site logo

manucaralmo / glowcookies Goto Github PK

View Code? Open in Web Editor NEW
312.0 14.0 62.0 233 KB

GlowCookies ๐Ÿช - Powerful Cookie Consent Banner In JavaScript

Home Page: https://manucaralmo.github.io/glow-cookies-web/

License: GNU General Public License v3.0

CSS 19.06% JavaScript 80.94%
gdpr gdpr-cookie gdpr-consent gdpr-compliant cookies cookies-alert cookies-consent cookie-banner javascript google-analytics

glowcookies's Introduction

My Skills

๐Ÿ‘€ Checkout my repositories

๐ŸŒ Outside GitHub: Linkedin

glowcookies's People

Contributors

afbora avatar blaumaus avatar chrys-elrak avatar djlimix avatar dopiera avatar eduardorangell avatar emilfabian avatar haroldao avatar isaactopo avatar jurgenizer avatar kamieljv avatar manucaralmo avatar manuel-steinberg avatar masoo avatar mejans avatar nedkamburov avatar pashkash avatar pengjinning avatar ru-ka avatar scsskid avatar sk5s avatar smaxx1337 avatar ueen avatar wannaphong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

glowcookies's Issues

No cookie svg?

Not sure if it's default behaviour, but the little cookie icon in the "accept" button isn't appearing. I like that little touch! How can I get that working?

Other than this, perfect pop-up and very user friendly - thank you!

Dialog text is displayed for a second when page reloaded

Describe the bug
Dialog text is displayed for a second when page reloaded

To Reproduce
Steps to reproduce the behavior:

  1. reload the page (F5)

Expected behavior
The dialog isn't displayed when cookies already accepted

video

VID_20230526_130919.mp4

FB Noscript code correction

Discussed in #40

Originally posted by ellismp September 19, 2021
Hi unless I'm missing something I think lines 151++ should be something like this otherwise the IMG tag is missing

  let FacebookPixelNS = document.createElement('noscript');
  let FacebookPixel = document.createElement('img');
  FacebookPixel.setAttribute('height', `1`);
  FacebookPixel.setAttribute('width', `1`);
  FacebookPixel.setAttribute('style', `display:none`);
  FacebookPixel.setAttribute('src', `https://www.facebook.com/tr?id=${this.tracking.FacebookPixelCode}&ev=PageView&noscript=1`);
  FacebookPixelNS.appendChild(FacebookPixel);
  document.head.appendChild(FacebookPixelNS);

Best
Martin

[enhancement] neutral buttons

Looks great, easy to use, from a user perspective I would like the default to be two buttons of the same size and same color.
The current solution is way better than most implementations, but if you read the GDPR guidelines (or surfed the web recently) its pretty clear that above behavior is the best, in a way of legitimately getting consent and the easiest for the user.

Javascript error when language set to "pl"

Describe the bug
The widget with the informations about cookies does not display when the language is set to "pl". The web browser's console says:
Uncaught TypeError: this.banner is undefined
createDOMElements glowCookies.js:36
render glowCookies.js:22
start glowCookies.js:302
start glowCookies.js:302

To Reproduce

  1. Set the polish language in the javascript code: "glowCookies.start('pl', { ... }); "
  2. Load the page

Expected behavior
There should be a widget displayed in the bottom left corner of the page.

Setting custom JS doesn't work

Describe the bug
I have set GTM js into the custom script but clicking allow cookies doesn't activate GTM.

To Reproduce
Steps to reproduce the behavior:

  1. Set custom script as GTM
  2. Publish live site
  3. Click allow on live site
  4. GTM doesn't activate

Expected behavior
GTM should activate

Screenshots
image

Desktop (please complete the following information):

  • OS: [Windows 10]
  • Browser [Chrome and Firefox]
  • Version [Latest]

Smartphone (please complete the following information):

  • Device: [iPhone 8 plus]
  • OS: [14.4]
  • Browser [safari]

German spelling not correct

The German bannerDescription in glowCookies.js is
'Wir nutzen Eigene und Cookies Dritter um Inhalte zu personalisieren und Surfverhalten zu analysieren.'
but the correct spelling has to be
'Wir nutzen eigene und Cookies Dritter, um Inhalte zu personalisieren und Surfverhalten zu analysieren.'
See: "eigene" instead of "Eigene" and the comma before "um"

Adding data retention period for cookies

Is your feature request related to a problem? Please describe.
Will be amazing to have a place to define the data retention period for the cookies cookies (15 days, 2 months, 4 months, etc.)

Describe the solution you'd like
A field on the cookies banner configuration script where you can introduce the number of days for the data retention period

'sk' language not working and script reports error

Describe the bug
Setting language to 'sk' generates this error:

Uncaught TypeError: Cannot read properties of undefined (reading 'manageCookies')
    at GlowCookies.createDOMElements (glowCookies.min.js:7:663)
    at GlowCookies.render (glowCookies.min.js:7:162)
    at glowCookies.min.js:7:11536

And no banner is shown.

To Reproduce
Use default config template and change 'en' to 'sk' .

Expected behavior
Banner (cookie settings info) should appear in Slovak language.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser Google Chrome / Firefox
  • Version 99 / 98 (for firefox)

Create option to let banner disappear after user agrees / rejects

It would be cool to have an boolean option that the banner disappears, after the user rejects or accepts the cookies.

Constantly having a cookie banner on your left / right can be annoying.

A setting called disappearAfterAction = 'true' / 'false' would be enough. If true, maybe do display: none; on the button element.

Thank you very much!

"Watch Demo" button doesn't work

Describe the bug
"Watch Demo" button doesn't work. It links to a page that doesn't exists

To Reproduce
Steps to reproduce the behavior:

  1. Go to main repo page
  2. Click on 'Watch demo' button

Expected behavior
A live demo of the dialog

Functionality questions

Hi there, I have a couple of questions about how this plugin works. I can see in the settings details that you must add the Google Analytics tracking code in there as an option - my question is, does this mean I should not place the full tracking snippet that Analytics supplies onto the site itself? Does using this plugin with just the GA code add in the full tracking code if a user accepts?

My second question is regarding what happens once the cookies are accepted and the cookie bar disappears. This is the setup I use as it keeps the page clean, however my question is, what if the user wants to change their cookie preferences afterwards? If I were to include on the Cookie Policy page a checkbox which the user can untick, is there a way to use this to unset the preferences set in the plugin?

Thanks in advance!

No one difference between 1, 2 and 3 styles

Describe the bug
I can't able to see any difference BTW styles 1, 2 and 3

To Reproduce
Set 1, 2 and 3 into the style dialog.
The displayed dialog style is allways the same

Expected behavior
Any difference depending of the selected style ;)

Screenshots

1
2
3

With and height pop up size

The pop up is limited we can not add lot of text; It will be great if can have this feature
example : cdiscount.com

Can GlowCookies manage iframe cookies?

Currently trying to make my site GDPR compliant. We don't use any first-party cookies, but we use embedded YouTube videos and Google Forms (as iframe). Google appears to be collecting 3rd party cookies through both of these.

Adding the iframe src's in the custom script attribute doesn't seem to block them โ€“ is this currently supported by GlowCookies? Or is there a way to block the iframes from loading until after GlowCookies has received cookies permission from the pop-up?

[Feature request]

To comply with the european GDPR both buttons (accept/reject) should be the same size and color by default.

[enhancement] add rel="noreferrer noopener" to read__more link

Hi there!

To minimize XSS problem it's will be good to add rel="noreferrer noopener" to read__more link

after line 56 add rel="noreferrer noopener"

                                        <a 
                                            href="${this.banner.link}"
                                            target="_blank" 
                                            rel="noreferrer noopener"
                                            class="read__more"
                                            style="color: ${this.banner.color};"
                                        >

Thank you :)

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.