Added Google Analytics as a site level configuration variable
This commit is contained in:
parent
521deddc44
commit
7660ddc768
2 changed files with 14 additions and 2 deletions
|
@ -45,8 +45,8 @@ $config = array(
|
|||
),
|
||||
|
||||
'site' => array(
|
||||
'name' => 'PICKLES Bootstrap',
|
||||
|
||||
'name' => 'PICKLES Bootstrap',
|
||||
'analytics' => 'UA-########-#',
|
||||
),
|
||||
);
|
||||
|
||||
|
|
|
@ -65,5 +65,17 @@
|
|||
<script src="<?php echo $__dynamic->js('/js/bootstrap.js'); ?>"></script>
|
||||
<script src="<?php echo $__dynamic->js('/js/pickles.js'); ?>"></script>
|
||||
<script src="<?php echo $__dynamic->js('/js/core.js'); ?>"></script>
|
||||
|
||||
<script>
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', '<?php echo $__config->site['analytics']; ?>']);
|
||||
_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>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue