Sha256: 7176184dd45f429ce0f22012ada9f1ed8bb09f884b3a0b9ce841b17f0c14c493

Contents?: true

Size: 1.71 KB

Versions: 1

Compression:

Stored size: 1.71 KB

Contents

{% if jekyll.environment == 'production' and site.production_google_analytics %}
{%- assign GA_ID = site.production_google_analytics -%}
<script async src="https://www.googletagmanager.com/gtag/js?id={{ GA_ID }}"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag() { dataLayer.push(arguments); }
  gtag('js', new Date());

  gtag('config', '{{ GA_ID }}');

  (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', '{{ GA_ID }}', 'auto')
  ga('send', 'pageview')

</script>
{% endif %}

{% if jekyll.environment == 'development' and site.development_google_analytics %}
{%- assign GA_ID = site.development_google_analytics -%}
<script async src="https://www.googletagmanager.com/gtag/js?id={{ GA_ID }}"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag() { dataLayer.push(arguments); }
  gtag('js', new Date());

  gtag('config', '{{ GA_ID }}');

  (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', '{{ GA_ID }}', 'auto')
  ga('send', 'pageview')
</script>

{% endif %}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
word-games-theme-1.1.9 _includes/google-analytics.html