Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
e139a87
Add Thai language
wannaphong Mar 21, 2021
770c849
Update glowCookies.js
ueen Apr 1, 2021
a723157
Merge pull request #11 from wannaphong/master
manucaralmo Apr 1, 2021
054d823
Merge branch 'master' into master
manucaralmo Apr 1, 2021
8a70735
Merge pull request #14 from ueen/master
manucaralmo Apr 1, 2021
edd8548
updated language related infos
ueen Apr 1, 2021
7e2710f
Merge branch 'v3.1'
manucaralmo Apr 1, 2021
cce4a7f
Delete .DS_Store
manucaralmo Apr 1, 2021
94d6666
Update README.md
manucaralmo Apr 1, 2021
5605de3
Merge pull request #15 from ueen/patch-2
manucaralmo Apr 1, 2021
be17d0e
Update README.md
manucaralmo Apr 1, 2021
79f422b
Update README.md
manucaralmo Apr 1, 2021
0003186
Update README.md
ueen Apr 1, 2021
3041b2a
Merge pull request #17 from ueen/patch-3
manucaralmo Apr 1, 2021
f23a182
Add French Translation
haroldao Apr 8, 2021
082c54c
Add French
haroldao Apr 8, 2021
e6e6c5d
Added Slovak translation
djlimix Apr 9, 2021
1106c1a
Added Slovak
djlimix Apr 9, 2021
fe56d2d
Merge pull request #18 from haroldao/master
manucaralmo Apr 9, 2021
d3cd252
Merge pull request #19 from djlimix/patch-1
manucaralmo Apr 9, 2021
a82ab9f
Update glowCookies.js
manucaralmo Apr 9, 2021
cb1d7f3
Update glowCookies.js
manucaralmo Apr 9, 2021
305155f
Update README.md
manucaralmo Apr 9, 2021
35bde66
Update README.md
manucaralmo Apr 12, 2021
e8b370a
Update glowCookies.js
eduardorangell May 24, 2021
3dba3f4
Merge pull request #22 from eduardorangell/patch-1
manucaralmo May 25, 2021
e2d2163
Added Brazilian portuguese
manucaralmo Jun 5, 2021
d898c30
adding bulgarian and dutch locales and reordering the languages alpha…
nedkamburov Jun 7, 2021
9eb98fd
Merge pull request #26 from nedkamburov/master
manucaralmo Jun 7, 2021
728c634
Added Turkish translations
afbora Jun 10, 2021
c2fa356
Merge pull request #27 from afbora/patch-1
manucaralmo Jun 10, 2021
9b91a61
Update README.md
manucaralmo Jul 4, 2021
ab38140
Update README.md
manucaralmo Jul 4, 2021
3acee33
add japanese translations.
masoo Jul 5, 2021
59c89cc
Merge pull request #28 from masoo/add_japanese_translations
manucaralmo Jul 5, 2021
ee8bde7
Release 3.1.3
manucaralmo Jul 6, 2021
8046f63
Adds Occitan language
Mejans Jul 22, 2021
d6e3e5f
Merge pull request #29 from Mejans/master
manucaralmo Jul 23, 2021
1f715e6
Adds Italian language
ru-ka Jul 25, 2021
feda7c0
Merge pull request #30 from ru-ka/master
manucaralmo Jul 25, 2021
9451e03
Update README.md
manucaralmo Jul 25, 2021
e8bbbc2
Updated .gitignore for .DS_Store
jurgenizer Aug 16, 2021
9d78ab7
Afrikaans language translations added
jurgenizer Aug 16, 2021
d57853a
Readme.md updated to include all languages
jurgenizer Aug 18, 2021
8ecfd44
All languages added to README
jurgenizer Aug 18, 2021
4f76b32
Delete .DS_Store
jurgenizer Aug 19, 2021
32fe1a8
Merge pull request #33 from jurgenizer/afrikaans
manucaralmo Aug 19, 2021
023d6cb
:globe_with_meridians: Add Malagasy language
chrys-elrak Aug 20, 2021
36d5905
Merge pull request #34 from chrys-elrak/master
manucaralmo Aug 20, 2021
592c71b
add ru lang
pashkash Aug 22, 2021
09c9c96
Updated glowCookies.js
emilfabian Nov 11, 2021
83c8d78
Update README.md
emilfabian Nov 24, 2021
f2af402
Merge pull request #45 from emilfabian/patch-1
manucaralmo Nov 24, 2021
32590e8
Update README.md
manucaralmo Nov 24, 2021
356f312
Update glowCookies.js
pashkash Dec 6, 2021
f4c4db8
Update README.md
pashkash Dec 6, 2021
6149db3
Merge pull request #36 from pashkash/patch-1
manucaralmo Dec 7, 2021
6875918
Update README.md
manucaralmo Dec 7, 2021
53ae638
add zh_TW translation
sk5s Dec 13, 2021
2669caa
Merge pull request #47 from gopenso/master
manucaralmo Dec 16, 2021
4a9c730
Update README.md
manucaralmo Dec 16, 2021
4b7c035
improve german translation
scsskid Jan 7, 2022
ca966ef
Merge pull request #49 from scsskid/master
manucaralmo Jan 10, 2022
34ecb5a
Add Polish translation.
dopiera Feb 9, 2022
22e53ae
Improve Dutch translation
Kamieljv Feb 11, 2022
3181bf0
Spelling error in Dutch reject
Kamieljv Feb 11, 2022
ec3f375
Merge pull request #54 from Kamieljv/master
manucaralmo Feb 13, 2022
2cf4bfd
Merge pull request #53 from dopiera/pl
manucaralmo Feb 13, 2022
a6cf172
added Chinese Simple
pengjinning Feb 15, 2022
a291219
Update README.md
pengjinning Feb 15, 2022
458e29f
Added Ukrainian translation
Blaumaus Mar 31, 2022
05e32b8
Update README.md
Blaumaus Mar 31, 2022
a0bbc61
fix key duplicate
Blaumaus Mar 31, 2022
f0e21f0
Merge pull request #59 from Blaumaus/patch-1
manucaralmo Apr 5, 2022
669c81b
Merge pull request #55 from pengjinning/master
manucaralmo Apr 5, 2022
087da64
Update README.md
manucaralmo Apr 5, 2022
1315f54
Added Catalan Language
isaactopo May 8, 2023
6b022ce
Added Catalan Language (ca)
isaactopo May 8, 2023
6ed3758
Merge pull request #75 from isaactopo/master
manucaralmo May 10, 2023
48d7905
Update readme version
manucaralmo May 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
Binary file removed .github/.DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ignore Mac system files
.DS_store
138 changes: 93 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<img src="https://cdn.glowmedia.es/upload/uploads/d53f37cookies-preview.png" data-canonical-src="https://cdn.glowmedia.es/upload/uploads/d53f37cookies-preview.png" width="100%" />
<img src="https://cabas.b-cdn.net/glowcookies/glowcookies.png" data-canonical-src="https://cabas.b-cdn.net/glowcookies/glowcookies.png" width="100%" />

![Badge-glow](https://img.shields.io/badge/GlowCookies-v.3.1.8-blue?style=flat-square) ![jsDelivr hits (GitHub)](https://img.shields.io/jsdelivr/gh/hm/manucaralmo/GlowCookies?style=flat-square) [![GitHub contributors](https://img.shields.io/github/contributors/manucaralmo/GlowCookies?style=flat-square)](https://github.com/AmauriC/tarteaucitron.js/graphs/contributors) ![GitHub Repo stars](https://img.shields.io/github/stars/manucaralmo/GlowCookies?style=social)

![Badge-glow](https://img.shields.io/badge/GlowCookies-v.3.0.1-blue?style=flat-square) ![jsDelivr hits (GitHub)](https://img.shields.io/jsdelivr/gh/hm/manucaralmo/GlowCookies?style=flat-square) ![GitHub repo size](https://img.shields.io/github/repo-size/manucaralmo/GlowCookies?style=flat-square) ![GitHub Repo stars](https://img.shields.io/github/stars/manucaralmo/GlowCookies?style=social)

# GlowCookies - Cookie Consent Banner In JavaScript for Google Analytics, Facebook Pixel & more
# GlowCookies 🍪 - Powerful Cookie Consent Banner In JavaScript
Simple and full automated cookies banner for any website. Complies with the new European regulations with GlowCookies. Activate and deactivate Google Analytics, Facebook Pixel, Hotjar (and coming soon) cookies whenever the user wishes, with just 1 click.

[![Foo](https://cdn.glowmedia.es/upload/uploads/ed1952btn.svg)](https://manucaralmo.github.io/glow-cookies-web/)
Expand All @@ -18,69 +17,102 @@ You just have to install the code. When the user clicks on accept cookies, the g
## How to use
Add this code to your html `<head>` or `<body>` tag.
```html
<script src="https://cdn.jsdelivr.net/gh/manucaralmo/GlowCookies@3.0.1/src/glowCookies.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/manucaralmo/GlowCookies@3.1.8/src/glowCookies.min.js"></script>
<script>
glowCookies.start('en', {
analytics: 'G-FH87DE17XF',
glowCookies.start('en', {
style: 1,
analytics: 'G-FH87DE17XF',
facebookPixel: '990955817632355',
policyLink: 'https://google.es'
policyLink: 'https://link-to-your-policy.com'
});
</script>
```

## Languages `New`
Now you can choose between two available languages: English and Spanish.
In the first parameter of the start() method add `'es'` for Spanish or `'en'` for English.
## Banner styles
Now you can choose between these available banner styles:
- Style `1`, `2` or `3`

Set style in config object `glowCookies.start('en', { style: 3 })`

## Languages
Now you can choose between these available languages:
- Afrikaans (`af`)
- Brazilian portugese (`pt_BR`)
- Bulgarian (`bg`)
- Catalan (`ca`)
- Chinese Simple (`zh`)
- Chinese Traditional (`zh_TW`)
- Danish (`da`)
- Dutch (`nl`)
- English (`en`)
- French (`fr`)
- German (`de`)
- Italian (`it`)
- Japanese (`ja`)
- Malagasy (`mg`)
- Norwegian (`no`)
- Occitan (`oc`)
- Polish (`pl`)
- Russian (`ru`)
- Slovak (`sk`)
- Spanish (`es`)
- Swedish (`sv`)
- Thai (`th`)
- Turkish (`tr`)
- Ukrainian (`uk`)

Set language in the first parameter of `glowCookies.start('en', { })` method.

## Tracking options
These are the parameters that you can modify to add your tracking codes or custom scripts.

| Parameter | Type | Values |
| ------------- | ------------- | ------------- |
| `analytics` | String | Example: `"G-FH87DE17XF"` (Analytics tracking code) |
| `facebookPixel` | String | Example: `"990955817632355"` (Facebook Pixel code) |
| `HotjarTrackingCode` | String | Example: `"990955817632355"` (Hotjar tracking code) |
| `customScript` (Inline) | Object | Example: `[{ type: 'custom', position: 'body', content: 'console.log('custom script');' }]` |
| `customScript` (src) | Object | Example: `[{ type: 'src', position: 'head', content: 'https://www.googletagmanager.com/gtag/js?id=G-FH87DE17XF' }]` |
| Parameter | Type | Values |
| ----------------------- | ------ | ------------------------------------------------------------------------------------------------------------------- |
| `analytics` | String | Example: `"G-FH87DE17XF"` (Analytics tracking code) |
| `facebookPixel` | String | Example: `"990955817632355"` (Facebook Pixel code) |
| `HotjarTrackingCode` | String | Example: `"990955817632355"` (Hotjar tracking code) |
| `customScript` (Inline) | Object | Example: `[{ type: 'custom', position: 'body', content: 'console.log('custom script');' }]` |
| `customScript` (src) | Object | Example: `[{ type: 'src', position: 'head', content: 'https://www.googletagmanager.com/gtag/js?id=G-FH87DE17XF' }]` |

## Config Banner
These are the parameters that you can modify to change certain banner options

| Parameter | Type | Values |
| ------------- | ------------- | ------------- |
| `policyLink` | String | Example: `"https://yourlink.com"` (Your cookies policy link) |
| `hideAfterClick` | Boolean | (`true` or `false`) Default: `true` (Hide banner after Accept or Reject cookies) |
| Parameter | Type | Values |
| ---------------- | ------- | -------------------------------------------------------------------------------- |
| `policyLink` | String | Example: `"https://yourlink.com"` (Your cookies policy link) |
| `hideAfterClick` | Boolean | (`true` or `false`) Default: `true` (Hide banner after Accept or Reject cookies) |


## Customize Banner
Now there are certain parameters that you can change to customize your banner.

| Parameter | Type | Values |
| ------------- | ------------- | ------------- |
| `border` | String | (`"border"` or `"none"`) Default: `"border"` |
| `position` | String | (`"left"` or `"right"`) Default: `"left"` |
| `bannerDescription` | String | Example: `"We use our own and third-party cookies to personalize content and to analyze web traffic."` |
| `bannerLinkText` | String | Example: `"Read more about cookies"` |
| `bannerBackground` | String | Example: `"#FAFAFA"` Example: `"lightblue"` |
| `bannerColor` | String | Example: `"#000"` Example: `"blue"` |
| `bannerHeading` | String | Example: `"Use of cookies"` Default: None |
| `acceptBtnText` | String | Example: `"Accept cookies"` |
| `acceptBtnColor` | String | Example: `"#000"` Example: `"blue"` |
| `acceptBtnBackground` | String | Example: `"#fff"` Example: `"white"` |
| `rejectBtnText` | String | Example: `"Reject"` |
| `rejectBtnBackground` | String | Example: `"#000"` Example: `"blue"` |
| `rejectBtnColor` | String | Example: `"#fff"` Example: `"white"` |
| `manageColor` | String | Example: `"#fff"` Example: `"white"` |
| `manageBackground` | String | Example: `"#f2f2f2"` Example: `"blue"` |
| `manageText` | String | Example: `"Manage cookies"` |
| Parameter | Type | Values |
| --------------------- | ------ | ------------------------------------------------------------------------------------------------------ |
| `border` | String | (`"border"` or `"none"`) Default: `"border"` |
| `position` | String | (`"left"` or `"right"`) Default: `"left"` |
| `bannerDescription` | String | Example: `"We use our own and third-party cookies to personalize content and to analyze web traffic."` |
| `bannerLinkText` | String | Example: `"Read more about cookies"` |
| `bannerBackground` | String | Example: `"#FAFAFA"` Example: `"lightblue"` |
| `bannerColor` | String | Example: `"#000"` Example: `"blue"` |
| `bannerHeading` | String | Example: `"Use of cookies"` Default: None |
| `acceptBtnText` | String | Example: `"Accept cookies"` |
| `acceptBtnColor` | String | Example: `"#000"` Example: `"blue"` |
| `acceptBtnBackground` | String | Example: `"#fff"` Example: `"white"` |
| `rejectBtnText` | String | Example: `"Reject"` |
| `rejectBtnBackground` | String | Example: `"#000"` Example: `"blue"` |
| `rejectBtnColor` | String | Example: `"#fff"` Example: `"white"` |
| `manageColor` | String | Example: `"#fff"` Example: `"white"` |
| `manageBackground` | String | Example: `"#f2f2f2"` Example: `"blue"` |
| `manageText` | String | Example: `"Manage cookies"` |


## Fully customized banner
```html
<script src="https://cdn.jsdelivr.net/gh/manucaralmo/GlowCookies@3.0.1/src/glowCookies.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/manucaralmo/GlowCookies@3.1.8/src/glowCookies.min.js"></script>
<script>
glowCookies.start('en', {
analytics: 'G-FH87DE17XF',
glowCookies.start('en', {
style: 2,
analytics: 'G-FH87DE17XF',
facebookPixel: '990955817632355',
hideAfterClick: true,
border: 'none',
Expand All @@ -105,10 +137,26 @@ Now there are certain parameters that you can change to customize your banner.
</script>
```

## Contribute
If you know any other language, please help translate.
- Update the `arrLang` of the `LanguageGC` class in glowCookies.js (Add an entry in this fashion.)
- Update language documentation in README.md
- Create a pull request
```
en: {
'bannerHeading': 'We use cookies',
'bannerDescription' : 'We use our own and third-party cookies to personalize content and to analyze web traffic.',
'bannerLinkText' : 'Read more about cookies',
'acceptBtnText' : 'Accept cookies',
'rejectBtnText' : 'Reject',
'manageText' : 'Manage cookies'
}
```
Thanks for your help! 🎉

## Next steps
- [ ] Advanced cookies management
- [ ] Banner templates
- [ ] Custom cookies icon
- [ ] Cookie settings

### Request features
info@glowmedia.es
Loading