js_google_analytics

NAML documentation   Watch a video
   Usages of this macro
... in configuration.naml
1
2
3
4
5
6
7
8
<override_macro name="js_google_analytics">
                    <script type="text/javascript">
                      var _gaq = _gaq || [];
                      _gaq.push(['_setAccount', 'UA-20233261-4']);
                      _gaq.push(['_trackPageview']);
                    </script>
                    <n.overridden/>
                </override_macro>
Overrides default macro
... in utilities.naml
110
111
112
113
114
115
116
117
118
119
120
121
122
<macro name="js_google_analytics">
    <!-- Start Google Analytics -->
    <script>
        (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
        })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
        
        ga('create', 'UA-91855-9', 'auto', 'nabble');
        ga('nabble.send', 'pageview');
    </script>
    <!-- End Google Analytics -->
</macro>