Google tag enabled also on mobile
This commit is contained in:
parent
00db7e16ec
commit
9676b83574
@ -920,7 +920,7 @@ function dol_escape_js($stringtoescape, $mode=0, $noescapebackslashn=0)
|
|||||||
*
|
*
|
||||||
* @param string $stringtoescape String to escape
|
* @param string $stringtoescape String to escape
|
||||||
* @param int $keepb 1=Preserve b tags (otherwise, remove them)
|
* @param int $keepb 1=Preserve b tags (otherwise, remove them)
|
||||||
* @param int $keepn 1=Preserve \r\n strings (otherwise, remove them)
|
* @param int $keepn 1=Preserve \r\n strings (otherwise, replace them with escaped value)
|
||||||
* @return string Escaped string
|
* @return string Escaped string
|
||||||
* @see dol_string_nohtmltag
|
* @see dol_string_nohtmltag
|
||||||
*/
|
*/
|
||||||
@ -6375,21 +6375,18 @@ function printCommonFooter($zone='private')
|
|||||||
// Google Analytics (need Google module)
|
// Google Analytics (need Google module)
|
||||||
if (! empty($conf->google->enabled) && ! empty($conf->global->MAIN_GOOGLE_AN_ID))
|
if (! empty($conf->google->enabled) && ! empty($conf->global->MAIN_GOOGLE_AN_ID))
|
||||||
{
|
{
|
||||||
if (($conf->dol_use_jmobile != 4))
|
print "\n";
|
||||||
{
|
print '<script type="text/javascript">'."\n";
|
||||||
print "\n";
|
print ' var _gaq = _gaq || [];'."\n";
|
||||||
print '<script type="text/javascript">'."\n";
|
print ' _gaq.push([\'_setAccount\', \''.$conf->global->MAIN_GOOGLE_AN_ID.'\']);'."\n";
|
||||||
print ' var _gaq = _gaq || [];'."\n";
|
print ' _gaq.push([\'_trackPageview\']);'."\n";
|
||||||
print ' _gaq.push([\'_setAccount\', \''.$conf->global->MAIN_GOOGLE_AN_ID.'\']);'."\n";
|
print ''."\n";
|
||||||
print ' _gaq.push([\'_trackPageview\']);'."\n";
|
print ' (function() {'."\n";
|
||||||
print ''."\n";
|
print ' var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;'."\n";
|
||||||
print ' (function() {'."\n";
|
print ' ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';'."\n";
|
||||||
print ' var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;'."\n";
|
print ' var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);'."\n";
|
||||||
print ' ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';'."\n";
|
print ' })();'."\n";
|
||||||
print ' var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);'."\n";
|
print '</script>'."\n";
|
||||||
print ' })();'."\n";
|
|
||||||
print '</script>'."\n";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// End of tuning
|
// End of tuning
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user