Last active
April 10, 2021 11:06
-
-
Save shirokoweb/c4f5f64a2d15f0f8f9dd8dff57ab329a to your computer and use it in GitHub Desktop.
MU-USE tarteauciron.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// securiser l'accès au fichier | |
if ( ! defined( 'ABSPATH' ) ) exit; | |
// Chargement TAC | |
add_action( 'wp_enqueue_scripts', 'webplus_tac_load' ); | |
function webplus_tac_load() { | |
wp_enqueue_script( 'tarteaucitron', 'https://cdn.jsdelivr.net/gh/AmauriC/tarteaucitron.js@1.3/tarteaucitron.min.js' ); | |
} | |
// Initialisation TAC | |
add_action( 'wp_head', 'webplus_tac_init' ); | |
function webplus_tac_init() { | |
?> | |
<script type="text/javascript"> | |
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 */ | |
"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 multisite */ | |
"readmoreLink": "/cookiespolicy" /* Change the default readmore link */ | |
}), | |
tarteaucitron.user.analyticsUa = 'UA-XXXXXXX-XX'; | |
tarteaucitron.user.analyticsMore = function () { /* add here your optionnal ga.push() */ }; | |
(tarteaucitron.job = tarteaucitron.job || []).push('analytics'); | |
</script> | |
<?php } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment