Initial commit.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<?
|
||||
$ga_id = config('GOOGLE_ANALYTICS_ID');
|
||||
if (! $is_admin && $ga_id) { ?>
|
||||
<script type="text/javascript">
|
||||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
||||
var script = document.createElement( 'script' );
|
||||
script.src = unescape(gaJsHost + "google-analytics.com/ga.js");
|
||||
script.type = "text/javascript";
|
||||
var head = document.getElementsByTagName('head')[0];
|
||||
head.appendChild ( script );
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var pageTracker = _gat._getTracker(<?= json_encode($ga_id, JSON_HEX_TAG) ?>);
|
||||
pageTracker._initData();
|
||||
pageTracker._trackPageview();
|
||||
</script>
|
||||
<? } ?>
|
||||
Reference in New Issue
Block a user