Skip to content

Commit 859a245

Browse files
authored
Revert duplicate Google Analytics (alshedivat#3287)
This reverts PR alshedivat#2962. The inline script here is exactly the same as the `/assets/js/google-analytics-setup.js` sourced on the following line, so Google Analytics is being triggered twice. It seems that alshedivat#2962 originally added this because liquid templating of the setup script didn't work (alshedivat#3095). However, this was then properly fixed in alshedivat#3117.
1 parent cf8e02f commit 859a245

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

_includes/scripts.liquid

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -227,15 +227,6 @@
227227
<!-- Analytics -->
228228
<!-- Global site tag (gtag.js) - Google Analytics -->
229229
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
230-
<script>
231-
window.dataLayer = window.dataLayer || [];
232-
function gtag() {
233-
dataLayer.push(arguments);
234-
}
235-
gtag('js', new Date());
236-
237-
gtag('config', '{{ site.google_analytics }}');
238-
</script>
239230
<script defer src="{{ '/assets/js/google-analytics-setup.js' | relative_url }}"></script>
240231
{% endif %}
241232

0 commit comments

Comments
 (0)