Add an option to display a link to the privacy url

"privacyUrl":  "https://example.com/privacy-policy",
This commit is contained in:
Amauri CHAMPEAUX 2018-08-29 11:12:57 +02:00
parent af76f8415a
commit a31264e13d
13 changed files with 43 additions and 92 deletions

View File

@ -20,92 +20,6 @@ Bonus:
- Load service when user click on Allow (without reload of the page),
- Incorporate a fallback system (display a link instead of social button and a static banner instead of advertising).
## Supported services
* Advertising network
* Ad Up Technology (ads)
* Ad Up Technology (conversion)
* Ad Up Technology (retargeting)
* Amazon
* Clicmanager
* Criteo
* FERank (pub)
* Google Adsense
* Google Adsense Search (form)
* Google Adsense Search (result)
* Google Adwords (conversion)
* Google Adwords (remarketing)
* Pubdirecte
* Twenga
* vShop
* APIs
* Google jsapi
* Google Maps
* Google Tag Manager
* Timeline JS
* Typekit (adobe)
* Audience measurement
* Alexa
* Clicky
* Crazyegg
* FERank
* Get+
* Google Analytics (ga.js)
* Google Analytics (universal)
* StatCounter
* VisualRevenue
* Xiti
* Comment
* Disqus
* Facebook (commentaire)
* Marketing Automation & CRM
* Mautic
* Webmecanik Automation
* Koban
* Social network
* AddThis
* AddToAny (feed)
* AddToAny (share)
* eKomi
* Facebook
* Facebook (like box)
* Google+
* Google+ (badge)
* Linkedin
* Pinterest
* Shareaholic
* ShareThis
* Twitter
* Twitter (cards)
* Twitter (timelines)
* Support
* UserVoice
* Zopim
* Video
* Calameo
* Dailymotion
* Prezi
* SlideShare
* Vimeo
* YouTube
* Issuu
## Visitors outside the EU
In PHP for example, you can bypass all the script by setting this var `tarteaucitron.user.bypass = true;` if the visitor is not in the EU.
## Tested on
- IE 6+
- FF 3+
- Safari 4+
- Chrome 14+
- Opera 10+
# Installation guide
[Visit opt-out.ferank.eu](https://opt-out.ferank.eu/)
@ -129,6 +43,7 @@ tarteaucitron.init({
"removeCredit": false, /* supprimer le lien vers la source ? */
"handleBrowserDNTRequest": false, /* Répondre au DoNotTrack du navigateur ?*/
"moreInfoLink": true,
"privacyUrl": "",
//"cookieDomain": ".my-multisite-domaine.fr" /* Nom de domaine sur lequel sera posé le cookie - pour les multisites / sous-domaines - Facultatif */
});
</script>

View File

@ -448,7 +448,7 @@ h2#tarteaucitronCookiesNumberBis {
font-weight: 700;
}
#tarteaucitronAlertBig #tarteaucitronCloseAlert, #tarteaucitronAlertBig #tarteaucitronPersonalize {
#tarteaucitronAlertBig #tarteaucitronCloseAlert, #tarteaucitronAlertBig #tarteaucitronPersonalize, #tarteaucitronAlertBig #tarteaucitronPrivacyUrl {
background: #008300;
color: #fff;
cursor: pointer;
@ -459,7 +459,7 @@ h2#tarteaucitronCookiesNumberBis {
margin-left: 7px;
}
#tarteaucitronAlertBig #tarteaucitronCloseAlert {
#tarteaucitronAlertBig #tarteaucitronCloseAlert, #tarteaucitronAlertBig #tarteaucitronPrivacyUrl {
background: #fff;
color: #333;
font-size: 13px;

View File

@ -13,6 +13,8 @@ tarteaucitron.lang = {
"personalize": "Přizpůsobit",
"acceptAll": "OK, přijmout vše",
"close": "Zavřít",
"privacyUrl": "Zásady ochrany osobních údajů",
"all": "Nastavení všech služeb",

View File

@ -13,6 +13,8 @@ tarteaucitron.lang = {
"personalize": "Personalisieren",
"acceptAll": "OK, akzeptiere alles",
"close": "Beenden",
"privacyUrl": "Datenschutz-Bestimmungen",
"all": "Präferenz für alle Dienste",

View File

@ -13,6 +13,8 @@ tarteaucitron.lang = {
"personalize": "Personalize",
"acceptAll": "OK, accept all",
"close": "Close",
"privacyUrl": "Privacy policy",
"all": "Preference for all services",

View File

@ -13,6 +13,8 @@ tarteaucitron.lang = {
"personalize": "Personalizar",
"acceptAll": "OK, aceptar todas",
"close": "Cerrar",
"privacyUrl": "Política de privacidad",
"all": "Ajustes para todos los servicios",

View File

@ -14,6 +14,8 @@ tarteaucitron.lang = {
"personalize": "Personnaliser",
"close": "Fermer",
"privacyUrl": "Politique de confidentialité",
"all": "Préférence pour tous les services",
"info": "Protection de votre vie privée",

View File

@ -13,6 +13,8 @@ tarteaucitron.lang = {
"acceptAll": "Ok, accetta tutto",
"personalize": "Personalizza",
"close": "Chiudi",
"privacyUrl": "Politica sulla riservatezza",
"all": "Preferenze per tutti i servizi",

View File

@ -13,7 +13,9 @@ tarteaucitron.lang = {
"personalize": "Personaliseer",
"acceptAll": "OK, accepteer alle",
"close": "Sluit",
"privacyUrl": "Privacybeleid",
"all": "Voorkeur voor alle diensten",
"info": "Bescherming van uw privacy",

View File

@ -13,6 +13,8 @@ tarteaucitron.lang = {
"personalize": "Personalizacja",
"acceptAll": "OK, akceptuję wszystko",
"close": "zamknij",
"privacyUrl": "Polityka prywatności",
"all": "Preferencja dla wszystkich usług",

View File

@ -13,6 +13,9 @@ tarteaucitron.lang = {
"personalize": "Personalizar",
"acceptAll": "OK, aceitar tudo",
"close": "Fechar",
"privacyUrl": "Política de Privacidade",
"all": "Definições dos serviços",
"info": "Proteger sua privacidade",
"disclaimer": "Ao aceitar os serviços terceiros, você aceita o uso de cookies em conjunto de tecnologias de rastreamento que lhe são necessárias para funcionar",

View File

@ -13,6 +13,8 @@ tarteaucitron.lang = {
"personalize": "Персонализировать",
"acceptAll": "Ок, все активировать",
"close": "Закрыть",
"privacyUrl": "Политика конфиденциальности",
"all": "Преференция всем сервисам",

View File

@ -16,7 +16,7 @@ var scripts = document.getElementsByTagName('script'),
var tarteaucitron = {
"version": 20180828003,
"version": 20180829,
"cdn": cdn,
"user": {},
"lang": {},
@ -209,7 +209,8 @@ var tarteaucitron = {
"cookieslist": true,
"handleBrowserDNTRequest": false,
"AcceptAllCta" : false,
"moreInfoLink": true
"moreInfoLink": true,
"privacyUrl": ""
},
params = tarteaucitron.parameters;
@ -314,6 +315,13 @@ var tarteaucitron = {
html += ' <button id="tarteaucitronPersonalize" onclick="tarteaucitron.userInterface.openPanel();">';
html += ' ' + tarteaucitron.lang.personalize;
html += ' </button>';
if (tarteaucitron.parameters.privacyUrl !== "") {
html += ' <button id="tarteaucitronPrivacyUrl" onclick="document.location = tarteaucitron.parameters.privacyUrl">';
html += ' ' + tarteaucitron.lang.privacyUrl;
html += ' </button>';
}
html += '</div>';
} else {
html += '<div id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '">';
@ -326,6 +334,13 @@ var tarteaucitron = {
html += ' <button id="tarteaucitronCloseAlert" onclick="tarteaucitron.userInterface.openPanel();">';
html += ' ' + tarteaucitron.lang.personalize;
html += ' </button>';
if (tarteaucitron.parameters.privacyUrl !== "") {
html += ' <button id="tarteaucitronPrivacyUrl" onclick="document.location = tarteaucitron.parameters.privacyUrl">';
html += ' ' + tarteaucitron.lang.privacyUrl;
html += ' </button>';
}
html += '</div>';
html += '<div id="tarteaucitronPercentage"></div>';
}
@ -462,7 +477,7 @@ var tarteaucitron = {
cookie = tarteaucitron.cookie.read(),
hostname = document.location.hostname,
hostRef = document.referrer.split('/')[2],
isNavigating = (hostRef === hostname) ? true : false,
isNavigating = (hostRef === hostname && window.location.href !== tarteaucitron.parameters.privacyUrl) ? true : false,
isAutostart = (!service.needConsent) ? true : false,
isWaiting = (cookie.indexOf(service.key + '=wait') >= 0) ? true : false,
isDenied = (cookie.indexOf(service.key + '=false') >= 0) ? true : false,