analytics.html 865 B

123456789101112131415161718192021222324252627
  1. {#-
  2. This file was automatically generated - do not edit
  3. -#}
  4. {% set analytics = config.google_analytics %}
  5. <script>
  6. window.ga = window.ga || function() {
  7. (ga.q = ga.q || []).push(arguments)
  8. }
  9. ga.l = +new Date
  10. /* Setup integration and send page view */
  11. ga("create", "{{ analytics[0] }}", "{{ analytics[1] }}")
  12. ga("set", "anonymizeIp", true)
  13. ga("send", "pageview")
  14. /* Register handler to log search on blur */
  15. document.addEventListener("DOMContentLoaded", () => {
  16. if (document.forms.search) {
  17. var query = document.forms.search.query
  18. query.addEventListener("blur", function() {
  19. if (this.value) {
  20. var path = document.location.pathname;
  21. ga("send", "pageview", path + "?q=" + this.value)
  22. }
  23. })
  24. }
  25. })
  26. </script>
  27. <script async src="https://www.google-analytics.com/analytics.js"></script>