Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit b641168

Browse files
authored
Merge pull request #4871 from magento/yb_tag-manager
Add tag manager instead of Google Analytics
2 parents b6258f6 + 9c6d9f5 commit b641168

File tree

2 files changed

+8
-30
lines changed

2 files changed

+8
-30
lines changed

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ algolia:
180180
api_key: d2d0f33ab73e291ef8d88d8b565e754c
181181

182182
google:
183-
analytics: UA-66243208-1
183+
gtm: GTM-KRCLXBB
184184

185185
# Toggles the _plugin/html-check-hook.rb script that checks links in the generated HTML
186186
#

_includes/layout/header-scripts.html

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,13 @@
1010

1111
{% if site.environment == "public" %}
1212

13-
<!-- Google Analytics -->
14-
<style>.async-hide { opacity: 0 !important} </style>
15-
<script>(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date;
16-
h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')};
17-
(a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);h.timeout=c;
18-
})(window,document.documentElement,'async-hide','dataLayer',4000,
19-
{'GTM-ML6GZCH':true});</script>
20-
<script>
21-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
22-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
23-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
24-
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
25-
26-
ga('create', '{{ site.google.analytics }}', 'auto');
27-
ga('require', 'GTM-ML6GZCH');
28-
ga('send', 'pageview');
29-
</script>
30-
31-
<!-- Hotjar Tracking Code for http://devdocs.magento.com/ -->
32-
<script>
33-
(function(h,o,t,j,a,r){
34-
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
35-
h._hjSettings={hjid:806243,hjsv:6};
36-
a=o.getElementsByTagName('head')[0];
37-
r=o.createElement('script');r.async=1;
38-
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
39-
a.appendChild(r);
40-
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
41-
</script>
13+
<!-- Google Tag Manager -->
14+
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
15+
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
16+
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
17+
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
18+
})(window,document,'script','dataLayer','{{ site.google.gtm }}');</script>
19+
<!-- End Google Tag Manager -->
4220

4321
<script src="//assets.adobedtm.com/98fab992275ef6366cc65f57f86b1e895a66c912/satelliteLib-f90f1129109ea4b2101512675a2769865aa7ea5b.js"></script>
4422

0 commit comments

Comments
 (0)