~xdavidwu/xdavidwu.link

85276d1917b06d230817d8899d73162c28d964f0 — Michael Rose 6 years ago 11c8a62 + 0ff9dcc
Merge branch 'master' of https://github.com/mmistakes/minimal-mistakes
3 files changed, 12 insertions(+), 1 deletions(-)

M _config.yml
A _includes/analytics-providers/google-gtag.html
M _includes/analytics.html
M _config.yml => _config.yml +1 -1
@@ 83,7 83,7 @@ social:

# Analytics
analytics:
  provider               : false # false (default), "google", "google-universal", "custom"
  provider               : false # false (default), "google", "google-universal", "google-gtag", "custom"
  google:
    tracking_id          :


A _includes/analytics-providers/google-gtag.html => _includes/analytics-providers/google-gtag.html +9 -0
@@ 0,0 1,9 @@
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.analytics.google.tracking_id }}"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', '{{ site.analytics.google.tracking_id }}');
</script>

M _includes/analytics.html => _includes/analytics.html +2 -0
@@ 5,6 5,8 @@
  {% include /analytics-providers/google.html %}
{% when "google-universal" %}
  {% include /analytics-providers/google-universal.html %}
{% when "google-gtag" %}
  {% include /analytics-providers/google-gtag.html %}
{% when "custom" %}
  {% include /analytics-providers/custom.html %}
{% endcase %}