summaryrefslogtreecommitdiff
path: root/app/views/layouts/_google_analytics.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/layouts/_google_analytics.html.haml')
-rw-r--r--app/views/layouts/_google_analytics.html.haml20
1 files changed, 10 insertions, 10 deletions
diff --git a/app/views/layouts/_google_analytics.html.haml b/app/views/layouts/_google_analytics.html.haml
index 98ea96b0b77..e8a5359e791 100644
--- a/app/views/layouts/_google_analytics.html.haml
+++ b/app/views/layouts/_google_analytics.html.haml
@@ -1,11 +1,11 @@
--# haml-lint:disable InlineJavaScript
-:javascript
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', '#{extra_config.google_analytics_id}']);
- _gaq.push(['_trackPageview']);
+= javascript_tag nonce: true do
+ :plain
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', '#{extra_config.google_analytics_id}']);
+ _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);
- })();
+ (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);
+ })();