HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/buyercall_forms/buyercall/buyercall/templates/macros/layout/analytics.jinja2
{# Render Google Analytics. #}
{%- macro google_ua() -%}
  {% if config['ANALYTICS_GOOGLE_UA'] %}
      <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', '//www.google-analytics.com/analytics.js', 'ga');

          ga('create', '{{ config['ANALYTICS_GOOGLE_UA'] }}', 'auto');
          ga('require', 'linkid', 'linkid.js');
          ga('send', 'pageview');
      </script>
  {% endif %}
{%- endmacro -%}