enabled ga code
This commit is contained in:
parent
fd1b89bace
commit
41acd01798
14
app/views/layouts/_ga.php
Executable file
14
app/views/layouts/_ga.php
Executable 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>
|
@ -254,6 +254,9 @@ abstract class DefaultConfig
|
|||||||
# Default language.
|
# Default language.
|
||||||
public $default_locale = 'en';
|
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
|
* MyImouto-specific configuration
|
||||||
|
Reference in New Issue
Block a user