Skip to content

Commit

Permalink
Move ga to head section
Browse files Browse the repository at this point in the history
  • Loading branch information
reeze committed Apr 18, 2013
1 parent 2f05ccc commit f7db42b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
10 changes: 0 additions & 10 deletions web/templates/layout/_footer.php
Expand Up @@ -23,13 +23,3 @@
</div>
</div>
</div>

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-11029498-8', 'php-internals.com');
ga('send', 'pageview');
</script>
9 changes: 9 additions & 0 deletions web/templates/layout/_google_analytics.php
@@ -0,0 +1,9 @@
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-11029498-8', 'php-internals.com');
ga('send', 'pageview');
</script>
1 change: 1 addition & 0 deletions web/templates/layout/book.php
Expand Up @@ -11,6 +11,7 @@
<link rel="alternate" type="application/rss+xml" title="<?php echo SITE_NAME;?>" href="<?php echo url_for("/feed/"); ?>" />
<link rel="shortcut icon" href="<?php echo url_for("/favicon.ico"); ?>" type="image/vnd.microsoft.icon">
<!--[if IE]><?php echo stylesheet_include_tag('ie.css'); ?><![endif]-->
<?php SimpieView::include_partial("../templates/layout/_google_analytics.php"); ?>
</head>
<body id='book'>
<?php SimpieView::include_partial("../templates/layout/_header.php"); ?>
Expand Down
1 change: 1 addition & 0 deletions web/templates/layout/common_page.php
Expand Up @@ -14,6 +14,7 @@
<meta name="description" content="<?php echo SITE_DESC; ?>" />
<link rel="alternate" type="application/rss+xml" title="<?php echo SITE_NAME;?>" href="<?php echo url_for("/feed/"); ?>" />
<link rel="shortcut icon" href="<?php echo url_for("/favicon.ico"); ?>" type="image/vnd.microsoft.icon">
<?php SimpieView::include_partial("../templates/layout/_google_analytics.php"); ?>
</head>
<body<?php echo (isset($current_page) ? " id=\"{$current_page}\"" : ''); ?>>
<?php SimpieView::include_partial("../templates/layout/_header.php"); ?>
Expand Down
2 changes: 1 addition & 1 deletion web/templates/layout/main.php
Expand Up @@ -9,7 +9,7 @@
<meta name="description" content="<?php echo SITE_DESC; ?>" />
<link rel="alternate" type="application/rss+xml" title="<?php echo SITE_NAME;?>" href="<?php echo url_for("/feed/"); ?>" />
<link rel="shortcut icon" href="<?php echo url_for("/favicon.ico"); ?>" type="image/vnd.microsoft.icon">
<meta name="google-site-verification" content="9MdZyBbYUlKcd9zfedQJEKhB66PngS1UUGHZ3NbZw70" />
<?php SimpieView::include_partial("templates/layout/_google_analytics.php"); ?>
</head>
<body id="home">
<?php SimpieView::include_partial("templates/layout/_header.php"); ?>
Expand Down

0 comments on commit f7db42b

Please sign in to comment.