enabled ga code

This commit is contained in:
Parziphal 2013-11-13 15:18:22 -05:00
parent fd1b89bace
commit 41acd01798
2 changed files with 17 additions and 0 deletions

14
app/views/layouts/_ga.php Executable file
View File

@ -0,0 +1,14 @@
<script type="text/javascript">
window.google_analytics_uacct = '<?= CONFIG()->ga_tracking_id ?>';
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '<?= CONFIG()->ga_tracking_id ?>']);
_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);
})();
</script>

View File

@ -254,6 +254,9 @@ abstract class DefaultConfig
# Default language.
public $default_locale = 'en';
# Use this config to enable Google Analytics. Fill in the GA Tracking ID (like 'UA-XXXXX-X')
public $ga_tracking_id = '';
/**
* *******************************
* MyImouto-specific configuration