-
-
Notifications
You must be signed in to change notification settings - Fork 369
Initialization EN
Nicolas edited this page Oct 8, 2020
·
1 revision
Now that tarteaucitron is installed, it will have to be initialized in order to be able to use it.
To do this, create a new js file (tarteaucitronInit.js for the example) and called it just after the tarteaucitron.js file:
If you have used github :
<script type="text/javascript" src="/assets/tarteaucitron.js-(version)/tarteaucitron.js"></script>
<script type="text/javascript" src="/assets/js/tarteaucitronInit.js"></script>
And if you used the CDN :
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/AmauriC/tarteaucitron.js@20200910/tarteaucitron.min.js"></script>
<script type="text/javascript" src="/assets/js/tarteaucitronInit.js"></script>
The initialization will be done in the new file which has just been created, for its purposes, copy / paste the following code :
tarteaucitron.init({
"privacyUrl": "", /* Privacy policy url */
"hashtag": "#tarteaucitron", /* Open the panel with this hashtag */
"cookieName": "tarteaucitron", /* Cookie name */
"orientation": "middle", /* Banner position (top - bottom) */
"showAlertSmall": true, /* Show the small banner on bottom right */
"cookieslist": true, /* Show the cookie list */
"adblocker": false, /* Show a Warning if an adblocker is detected */
"DenyAllCta" : true, /* Show the deny all button */
"AcceptAllCta" : true, /* Show the accept all button when highPrivacy on */
"highPrivacy": true, /* Disable auto consent */
"handleBrowserDNTRequest": false, /* If Do Not Track == 1, disallow all */
"removeCredit": false, /* Remove credit link */
"moreInfoLink": true, /* Show more info link */
"useExternalCss": false, /* If false, the tarteaucitron.css file will be loaded */
//"cookieDomain": ".my-multisite-domaine.fr", /* Shared cookie for subdomain website */
"readmoreLink": "/cookiespolicy", /* Change the default readmore link pointing to tarteaucitron.io */
"mandatory": false /* Show a message about mandatory cookies */
});
There you go, tarteaucitron is initialized !
If you do not see any interface on your site it is normal, by default tarteaucitron is not displayed if no service is indicated to it to manage.