| Current Path : /home/pteabiscqq/www/plugins/system/lab5_cookie_commander/analytics/ |
| Current File : /home/pteabiscqq/www/plugins/system/lab5_cookie_commander/analytics/code.google.donottrack.php |
<?php defined('_JEXEC') or die();
////////////////////////////////////////////////////////////////////////////////////////
/**
* Cookie Commander
*
* @author : Lab5 - Dennis Riegelsberger
* @authorUrl : https://lab5.ch
* @copyright : Copyright (C) 2018+ Lab5 - Dennis Riegelsberger. All rights reserved.
* @license : GNU/GPL General Public License version 2 or later
* @project : https://lab5.ch/cookie-commander
* @on JED : https://extensions.joomla.org/extensions/extension/site-management/cookie-control/lab5-cookie-commander/
*
* Built with <3
* Lab5
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
* @CHANGELOG :
* *
*/
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
if( !self::$xstor->cooco->donottrack ){
if(!isset( $anal_code )) $anal_code = '';
// Set to the same value as the web property used on the site
$anal_code .= "\n"." var gaProperty = '".self::$xstor->cooco->googleanalyticsUA."'; ";
// Prepare and store the propper cookie-name-string .
$anal_code .= "\n"." var gaDisableStr = 'ga-disable-' + gaProperty; ";
// Disable tracking if the opt-out cookie exists.
$anal_code .= "\n"." if (document.cookie.indexOf(gaDisableStr + '=true') > -1) {
window[gaDisableStr] = true;
} "."\n";
// Opt-out function
$anal_code .= "\n"."function gaOptout() {
document.cookie = gaDisableStr + '=true; expires=".date( "D, d M Y", strtotime("+".self::$xstor->cooco->expireDays." days"))." 23:59:59 UTC; path=/';
window[gaDisableStr] = true;
} "."\n";
}
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////