Merge pull request #35935 from ClickHouse/Fix_GA_not_reporting_events

Fixed GA not reporting events.
This commit is contained in:
Alexey Milovidov 2022-04-04 21:35:12 +03:00 committed by GitHub
commit 132c36d4a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,12 +67,9 @@
}); });
} }
(function (d, w, c) {
(w[c] = w[c] || []).push(function() {
var is_single_page = $('html').attr('data-single-page') === 'true'; var is_single_page = $('html').attr('data-single-page') === 'true';
if (!is_single_page) { if (!is_single_page) {
$('head').each(function(_, element) { $('head').each(function (_, element) {
$(element).append( $(element).append(
'<script async src="https://www.googletagmanager.com/gtag/js?id=G-KF1LLRTQ5Q"></script><script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag(\'js\', new Date());gtag(\'config\', \'G-KF1LLRTQ5Q\');</script>' '<script async src="https://www.googletagmanager.com/gtag/js?id=G-KF1LLRTQ5Q"></script><script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag(\'js\', new Date());gtag(\'config\', \'G-KF1LLRTQ5Q\');</script>'
); );
@ -81,8 +78,6 @@
); );
}); });
} }
});
})(document, window, "");
var beforePrint = function() { var beforePrint = function() {
var details = document.getElementsByTagName("details"); var details = document.getElementsByTagName("details");