google-analytics.ejs 535 B

1234567891011121314
  1. <% if (theme.google_analytics){ %>
  2. <!-- Google Analytics -->
  3. <script type="text/javascript">
  4. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  5. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  6. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  7. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  8. ga('create', '<%= theme.google_analytics %>', 'auto');
  9. ga('send', 'pageview');
  10. </script>
  11. <!-- End Google Analytics -->
  12. <% } %>