From f17b79f9be7571721fddcb4e718083f3431017b2 Mon Sep 17 00:00:00 2001 From: Ben Word Date: Sun, 14 Aug 2011 18:53:29 -0600 Subject: [PATCH] h5bp update - google analytics is now loaded with Modernizr.load, see https://github.com/paulirish/html5-boilerplate/commit/d9cc711ea1b29fcea97942d0d6aa2105866c034e --- inc/roots-actions.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/inc/roots-actions.php b/inc/roots-actions.php index 2c61eff..cac05f4 100644 --- a/inc/roots-actions.php +++ b/inc/roots-actions.php @@ -15,13 +15,13 @@ function roots_google_analytics() { global $roots_options; $roots_google_analytics_id = $roots_options['google_analytics_id']; $get_roots_google_analytics_id = esc_attr($roots_options['google_analytics_id']); - if ($roots_google_analytics_id !== '') { + if ($roots_google_analytics_id !== '') { echo "\n\t\n"; + echo "\t\twindow._gaq = [['_setAccount','$get_roots_google_analytics_id'],['_trackPageview'],['_trackPageLoadTime']];\n"; + echo "\t\tModernizr.load({\n"; + echo "\t\t\tload: ('https:' == location.protocol ? '//ssl' : '//www') + '.google-analytics.com/ga.js'\n"; + echo "\t\t});\n"; + echo "\t\n"; } }