We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 00d94c2 commit bd25a23Copy full SHA for bd25a23
app/views/layouts/decidim/_head_extra.html.erb
@@ -0,0 +1,11 @@
1
+_<% if tag_id = ENV.fetch("GOOGLE_TAG_MANAGER", nil) %>
2
+ <!-- Global site tag (gtag.js) - Google Analytics -->
3
+ <script type="text/plain" data-consent="marketing" async src="https://www.googletagmanager.com/gtag/js?id=<%= tag_id %>"></script>
4
+ <script type="text/plain" data-consent="marketing">
5
+ window.dataLayer = window.dataLayer || [];
6
+ function gtag(){dataLayer.push(arguments);}
7
+ gtag('js', new Date());
8
+
9
+ gtag('config', '<%= tag_id %>');
10
+ </script>
11
+<% end %>
0 commit comments