Merge pull request #77 from radiorabe/feature/disable-google-tracking

Disable all google tracking per default
This commit is contained in:
Robb 2017-03-13 14:50:26 -04:00 committed by GitHub
commit f52f0e7ff0
5 changed files with 13 additions and 15 deletions

View File

@ -9,6 +9,9 @@ class Application_Common_GoogleAnalytics
public static function generateGoogleTagManagerDataLayerJavaScript()
{
$code = "";
if (LIBRETIME_ENABLE_GOOGLE_ANALYTICS !== true) {
return $code;
}
try {
$clientId = Application_Model_Preference::GetClientId();
@ -55,6 +58,11 @@ class Application_Common_GoogleAnalytics
/** Generate the JavaScript snippet that logs a trial to paid conversion */
public static function generateConversionTrackingJavaScript()
{
$code = "";
if (LIBRETIME_ENABLE_GOOGLE_ANALYTICS !== true) {
return $code;
}
$newPlan = Application_Model_Preference::GetPlanLevel();
$oldPlan = Application_Model_Preference::GetOldPlanLevel();

View File

@ -104,6 +104,9 @@ define('UI_PLAYLISTCONTROLLER_OBJ_SESSNAME', 'PLAYLISTCONTROLLER_OBJ');
/*define('UI_PLAYLIST_SESSNAME', 'PLAYLIST');
define('UI_BLOCK_SESSNAME', 'BLOCK');*/
// Google Analytics integration
define('LIBRETIME_ENABLE_GOOGLE_ANALYTICS', false);
//WHMCS integration
define('LIBRETIME_ENABLE_WHMCS', false);
define('WHMCS_PASSWORD_RESET_URL', 'https://account.example.com/pwreset.php');

View File

@ -240,11 +240,6 @@ class PageLayoutInitPlugin extends Zend_Controller_Plugin_Abstract
$view->headScript()->appendFile($baseUrl . 'js/airtime/common/livechat.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
}
}
/*
if (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1) {
$view->headScript()->appendFile($baseUrl.'js/libs/google-analytics.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
}*/
}
protected function _initViewHelpers()

View File

@ -9,6 +9,7 @@
<?php $baseUrl = Application_Common_OsPath::getBaseDir(); ?>
</head>
<body>
<?php if (LIBRETIME_ENABLE_GOOGLE_ANALYTICS === true): ?>
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-55N6NH"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
@ -18,7 +19,7 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-55N6NH');</script>
<!-- End Google Tag Manager -->
<?php endif; ?>
<?php echo $this->partial('partialviews/trialBox.phtml', array("is_trial"=>$this->isTrial(), "trial_remain"=> $this->trialRemaining())) ?>
<div id="Panel" class="sticky">

View File

@ -1,9 +0,0 @@
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-28765064-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();