Drupal lab
Drupal Themes and SEO
Drupal Themes and SEO
Mon, 26 Apr, 2010
New Google analytics code loads asynchronously allowing your page to load faster. It is easy to migrate from old code snippet to asynchronous tracking code.
Asynchronous tracking is an improved way to track website visitors with Google Analytics. Unlike a traditional installation, asynchronous tracking optimizes how browsers load ga.js so its impact on user experience is minimized. It also allows you to put your Analytics snippet higher in the page without delaying subsequent content from rendering.
The new tracking snippet offers the following benefits:
You can move to new code by remove old code to new by the following template (from Google)
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-X']);
_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>
I don't know why "Average Time on Site" at my website reduces after using new tracking code!
Links:
Recent comments
2 years 29 weeks ago
3 years 6 weeks ago
3 years 7 weeks ago
3 years 7 weeks ago
3 years 7 weeks ago
3 years 7 weeks ago
3 years 7 weeks ago
3 years 7 weeks ago
3 years 7 weeks ago
3 years 7 weeks ago