Don't specify scheme when loading GA4 script (#18194)

This commit is contained in:
Josh Puetz 2022-07-21 15:12:48 -05:00 committed by GitHub
parent 49eb3da8b5
commit 2b23d4f6ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,7 +42,7 @@ function trackGoogleAnalytics4() {
if (!addedGA4) {
<%# Dynamically add the Google Analytics 4 script tag %>
var script = document.createElement('script');
script.src = "http://www.googletagmanager.com/gtag/js?id=" + ga4MeasurementCode;
script.src = "//www.googletagmanager.com/gtag/js?id=" + ga4MeasurementCode;
script.async = true;
document.head.appendChild(script);
}