first commit
This commit is contained in:
45
plugins/CookieNoticePro/cookies.php
Normal file
45
plugins/CookieNoticePro/cookies.php
Normal file
@@ -0,0 +1,45 @@
|
||||
|
||||
<script type="text/javascript" src="/libraries/jquery/jquery-2.1.3.min.js"></script>
|
||||
<script src="/plugins/CookieNoticePro/cookienoticepro.script.js"></script>
|
||||
<link rel="stylesheet" href="/plugins/CookieNoticePro/cookienoticepro.style.css">
|
||||
<script type="text/javascript">
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag( 'consent', 'default', {
|
||||
'ad_storage': 'denied',
|
||||
'ad_user_data': 'denied',
|
||||
'ad_personalization': 'denied',
|
||||
'analytics_storage': 'denied',
|
||||
'personalization_storage': 'granted',
|
||||
'security_storage': 'granted',
|
||||
'functionality_storage': 'granted',
|
||||
} );
|
||||
|
||||
$( document ).ready(function() {
|
||||
cookieNoticePro.init();
|
||||
});
|
||||
|
||||
var injectScripts = function injectScripts(){
|
||||
// Example: Google Analytics
|
||||
if (cookieNoticePro.isPreferenceAccepted("analytics") === true) {
|
||||
console.log("Analytics Scripts Running....");
|
||||
}
|
||||
// Example: Google Adwords cookie, DoubleClick, Remarketing pixels, Social Media cookies
|
||||
if (cookieNoticePro.isPreferenceAccepted("marketing") === true) {
|
||||
gtag( 'consent', 'update', {
|
||||
'ad_storage': 'granted',
|
||||
'ad_user_data': 'granted',
|
||||
'ad_personalization': 'granted',
|
||||
'analytics_storage': 'granted',
|
||||
'personalization_storage': 'granted',
|
||||
'security_storage': 'granted',
|
||||
'functionality_storage': 'granted',
|
||||
} );
|
||||
}
|
||||
|
||||
// Example: Remember password, language, etc
|
||||
if (cookieNoticePro.isPreferenceAccepted("preferences") === true) {
|
||||
console.log("Preferences Scripts Running....");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user