Close #758 - Update to Google Universal Analytics
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
### HEAD
|
### HEAD
|
||||||
|
* Update to Google Universal Analytics
|
||||||
* Remove post tags from templates
|
* Remove post tags from templates
|
||||||
* Remove TinyMCE valid elements tweaks (no longer necessary)
|
* Remove TinyMCE valid elements tweaks (no longer necessary)
|
||||||
* Remove additional widget classes
|
* Remove additional widget classes
|
||||||
|
|||||||
@@ -65,11 +65,14 @@ function roots_jquery_local_fallback($src, $handle) {
|
|||||||
|
|
||||||
function roots_google_analytics() { ?>
|
function roots_google_analytics() { ?>
|
||||||
<script>
|
<script>
|
||||||
var _gaq=[['_setAccount','<?php echo GOOGLE_ANALYTICS_ID; ?>'],['_trackPageview']];
|
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
|
||||||
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
|
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
|
||||||
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
|
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
|
||||||
s.parentNode.insertBefore(g,s)}(document,'script'));
|
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>
|
</script>
|
||||||
|
|
||||||
<?php }
|
<?php }
|
||||||
if (GOOGLE_ANALYTICS_ID) {
|
if (GOOGLE_ANALYTICS_ID) {
|
||||||
add_action('wp_footer', 'roots_google_analytics', 20);
|
add_action('wp_footer', 'roots_google_analytics', 20);
|
||||||
|
|||||||
Reference in New Issue
Block a user