cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: svn commit: r1405709 - /cayenne/site/cms/trunk/templates/skeleton.html
Date Mon, 05 Nov 2012 08:13:49 GMT
> Move to the async Google tracking code which needs to be in the head to make webmaster
tools work.

I actually thought that Google considers it the best practice to keep GA code in the bottom
of the page, as it ensures that your HTML can render even if GA is sluggish/unavailable? 

So it seems like the old approach was right?

Andrus


On Nov 5, 2012, at 11:09 AM, amaniatis@apache.org wrote:
> Author: amaniatis
> Date: Mon Nov  5 08:09:26 2012
> New Revision: 1405709
> 
> URL: http://svn.apache.org/viewvc?rev=1405709&view=rev
> Log:
> Move to the async Google tracking code which needs to be in the head to make webmaster
tools work.
> 
> Modified:
>    cayenne/site/cms/trunk/templates/skeleton.html
> 
> Modified: cayenne/site/cms/trunk/templates/skeleton.html
> URL: http://svn.apache.org/viewvc/cayenne/site/cms/trunk/templates/skeleton.html?rev=1405709&r1=1405708&r2=1405709&view=diff
> ==============================================================================
> --- cayenne/site/cms/trunk/templates/skeleton.html (original)
> +++ cayenne/site/cms/trunk/templates/skeleton.html Mon Nov  5 08:09:26 2012
> @@ -9,6 +9,16 @@
> <link rel="stylesheet" type="text/css" media="print" href="/css/print.css">
> <link rel="shortcut icon" href="/img/favicon.ico" type="image/ico">
> <script type="text/javascript" src="/js/scripts.js"></script>
> +<script type="text/javascript">
> +  var _gaq = _gaq || [];
> +  _gaq.push(['_setAccount', 'UA-7036673-1']);
> +  _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>
> </head>
> <body>
> <div id="wrap"><div id="wrap-inner">
> @@ -31,14 +41,5 @@
> </div>
> 
> </div></div>
> -<script type="text/javascript">
> -var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
> -document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js'
type='text/javascript'%3E%3C/script%3E"));
> -</script>
> -<script type="text/javascript">
> -try {
> -var pageTracker = _gat._getTracker("UA-7036673-1");
> -pageTracker._trackPageview();
> -} catch(err) {}</script>
> </body>
> </html>
> 
> 
> 


Mime
View raw message