Merge pull request #7321 from overleaf/ta-ga-fallback

Fix window-ga Fallback

GitOrigin-RevId: 56b192acbae5c8ba23c63f6d4a7d7334d13b8c73
This commit is contained in:
Jakob Ackermann
2022-04-05 10:23:33 +01:00
committed by Copybot
parent 2aa585f93c
commit 954c62ec1d

View File

@@ -44,7 +44,10 @@ if (typeof(ExposedSettings.gaTokenV4) != "undefined" || typeof(ExposedSettings.g
loadGA();
}
}
else
script(type="text/javascript", nonce=scriptNonce).
window.ga = function() { console.log("would send to GA", arguments) };
window.gtag = function() { console.log("would send to GA4", arguments) };
if typeof(ExposedSettings.gaTokenV4) === "undefined"
script(type="text/javascript", nonce=scriptNonce).
window.gtag = function() { console.log("would send to GA4", arguments) };
if typeof(ExposedSettings.gaToken) === "undefined"
script(type="text/javascript", nonce=scriptNonce).
window.ga = function() { console.log("would send to GA", arguments) };