Skip to content

Commit f718a14

Browse files
DharmishthaVPatelGitHub Copilot
andauthored
Remove all Universal Analytics (UA) code and event calls (#7842)
* Remove all Universal Analytics (UA) code and event calls * Fixed Indentation --------- Co-authored-by: GitHub Copilot <[email protected]>
1 parent 897604b commit f718a14

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

tutorials/quickstart/Solution/ClientUI/wwwroot/Content/app.js

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
//Google Universal Analytics initialization
2-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
3-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
4-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
5-
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
6-
ga('create', 'UA-20451773-2');
7-
ga('set', 'allowAdFeatures', false);
8-
1+

92
//Google GA4 initialization
103
window.dataLayer = window.dataLayer || [];
114
function gtag(){dataLayer.push(arguments);}
@@ -77,18 +70,11 @@ _kms('//scripts.kissmetrics.io/' + _kmk + '.2.js');
7770

7871
$(function () {
7972

80-
var gaEvt = function (category, action, label) {
81-
console.log('GA', category, action, label);
82-
window.ga('send', 'event', category, action, label);
83-
};
84-
8573
GA4.quickStartRunning();
86-
gaEvt('QuickStart', 'Running', SOLUTION_VERSION);
8774
_kmq.push(['record', 'QuickStart-Running-Control']);
8875

8976
window.sentMessage = function () {
9077
GA4.quickStartMessageSent();
91-
gaEvt('QuickStart', 'SentMessage', SOLUTION_VERSION);
9278
_kmq.push(['record', 'QuickStart-SentMessage-Control']);
9379
};
9480

@@ -99,11 +85,9 @@ _kms('//scripts.kissmetrics.io/' + _kmk + '.2.js');
9985
}
10086

10187
GA4.quickStartDisplayedLicenseButton();
102-
gaEvt('QuickStart', 'DisplayedLicenseButton', SOLUTION_VERSION);
10388

10489
licenseBtn.attr('href', 'https://particular.net/license/nservicebus?v=' + window.NSB_VERSION + '&t=0').click(function (e) {
10590
GA4.quickStartClickedLicenseButton();
106-
gaEvt('QuickStart', 'ClickedLicenseButton', SOLUTION_VERSION);
10791
});
10892

10993
});

tutorials/quickstart/tutorial-extending-the-system.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ You also implemented an additional event subscriber, showing how to decouple ind
154154
$('#tweet-completion').on('click', function (e) {
155155
e.preventDefault();
156156
gtag('event','quick_start_tweet_completion_click', { 'send_to': 'G-GMZ1FS541B' });
157-
window.ga && window.ga('send', 'event', 'QuickStart', 'TweetCompletionClick');
158157
window.open('https://twitter.com/intent/tweet?text=' + encodeURIComponent('I just completed the #NServiceBus Quick Start tutorial at docs.particular.net/tutorials/quickstart'));
159158
});
160159
});

0 commit comments

Comments
 (0)