Close #758 - Update to Google Universal Analytics
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user