Close #758 - Update to Google Universal Analytics

This commit is contained in:
Ben Word
2013-06-03 17:44:16 -05:00
parent 72a9ffa305
commit 66ac187564
2 changed files with 8 additions and 4 deletions

View File

@@ -1,4 +1,5 @@
### HEAD
* Update to Google Universal Analytics
* Remove post tags from templates
* Remove TinyMCE valid elements tweaks (no longer necessary)
* Remove additional widget classes

View File

@@ -65,11 +65,14 @@ function roots_jquery_local_fallback($src, $handle) {
function roots_google_analytics() { ?>
<script>
var _gaq=[['_setAccount','<?php echo GOOGLE_ANALYTICS_ID; ?>'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
e.src='//www.google-analytics.com/analytics.js';
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
ga('create','<?php echo GOOGLE_ANALYTICS_ID; ?>');ga('send','pageview');
</script>
<?php }
if (GOOGLE_ANALYTICS_ID) {
add_action('wp_footer', 'roots_google_analytics', 20);