You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
👋 Hey, I'm Amauri, a french dev that build a GDPR friendly cookie manager.
9
+
10
+
tarteaucitron was initially a simple script for my personal blog (in 2013), a few months later, the Github repository is opened and tarteaucitron is now reliable and recognized.
7
11
8
-
# What is this script?
9
12
The european cookie law regulates the management of cookies and you should ask your visitors their consent before exposing them to third party services.
10
13
11
14
Clearly this script will:
12
15
- Disable all services by default,
13
16
- Display a banner on the first page view and a small one on other pages,
14
17
- Display a panel to allow or deny each services one by one,
15
-
- Activate services on the second page view if not denied,
16
18
- Store the consent in a cookie for 365 days.
17
19
18
20
Bonus:
19
21
- Load service when user click on Allow (without reload of the page),
20
22
- Incorporate a fallback system (display a link instead of social button and a static banner instead of advertising).
* (document) `{SERVICE_KEY}_added` for each enabled service
111
+
* (document) `{SERVICE_KEY}_loaded` for each enabled service
112
+
* (document) `{SERVICE_KEY}_allowed` for each service when allowed
113
+
* (document) `{SERVICE_KEY}_disallowed ` for each service when disallowed
114
+
115
+
* (window) `tac.root_available`: the root element with panel has been created, services will be loaded
116
+
* (window) `tac.open_alert`
117
+
* (window) `tac.close_alert`
118
+
* (window) `tac.open_panel`
119
+
* (window) `tac.close_panel`
120
+
121
+
## Customize text
122
+
123
+
To change a translation, use `tarteaucitronCustomText` variable. It will be merge with the translation shipping with TAC. This variable must be defined before the initialization. For example:
124
+
```js
125
+
tarteaucitronCustomText = {
126
+
'support': {
127
+
'title':'Support client',
128
+
},
129
+
'close':'Enregistrer et fermer',
130
+
};
131
+
tarteaucitron.init(...);
132
+
```
133
+
134
+
There is a special case for engagement text. By the default, the engagement text is _{SERVICE_NAME} is disabled._, however you can change it per service. For example:
0 commit comments