Skip to content

Commit

Permalink
Merge pull request #1417 from gruntwork-io/chore/docsGTMUpdate
Browse files Browse the repository at this point in the history
chore: switch to new gtm container on docs site
  • Loading branch information
ZachGoldberg authored Jun 27, 2024
2 parents f1bec3b + fb3233e commit 891a37d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ github_api_url: https://raw.githubusercontent.com/gruntwork-io/terratest/master
# theme: minima
assets_base_url: '/assets/'

ga_tracker: UA-76462621-7
gtm_tracker: GTM-5TTJJGTL

theme: null

Expand Down
20 changes: 9 additions & 11 deletions docs/_includes/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,16 @@
{% endif %}

<!-- Add here more: Google Analytics etc. -->
{% if site.ga_tracker %}
{% if site.gtm_tracker %}

<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','{{ site.gtm_tracker }}');</script>
<!-- End Google Tag Manager -->

<script>
window.ga = window.ga || function () { (ga.q = ga.q || []).push(arguments) }; ga.l = +new Date;
ga('create', '{{ site.ga_tracker }}', 'auto');
ga('require', 'eventTracker');
ga('require', 'maxScrollTracker');
ga('require', 'outboundFormTracker');
ga('require', 'outboundLinkTracker');
ga('send', 'pageview');
</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
<script async src="https://cdnjs.cloudflare.com/ajax/libs/autotrack/2.4.1/autotrack.js"></script>

<script src="{{site.baseurl}}{{ site.assets_base_url }}js/cookie.js" async></script>
Expand Down

0 comments on commit 891a37d

Please sign in to comment.