- Switched to Google Analytics 4

- Removed checkbox tracking events
This commit is contained in:
Stephen McNabb
2023-03-02 13:56:21 -08:00
parent ab408065f6
commit 20a116a52a
2 changed files with 5 additions and 14 deletions

View File

@@ -19,13 +19,12 @@
var profilesKey = 'ds2_profiles';
</script>
<script src="js/main.js"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-H2NJERJELT"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-35576868-2', 'smcnabb.github.io');
ga('send', 'pageview');
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-H2NJERJELT');
</script>
</head>
<body>

View File

@@ -29,7 +29,6 @@
$('input[type="checkbox"]').click(function() {
var id = $(this).attr('id');
var isChecked = profiles[profilesKey][profiles.current].checklistData[id] = $(this).prop('checked');
//_gaq.push(['_trackEvent', 'Checkbox', (isChecked ? 'Check' : 'Uncheck'), id]);
$(this).parent().parent().find('li > label > input[type="checkbox"]').each(function() {
var id = $(this).attr('id');
profiles[profilesKey][profiles.current].checklistData[id] = isChecked;
@@ -43,7 +42,6 @@
profiles.current = $(this).val();
$.jStorage.set(profilesKey, profiles);
populateChecklists();
//_gaq.push(['_trackEvent', 'Profile', 'Change', profiles.current]);
});
$('#profileAdd').click(function() {
@@ -53,7 +51,6 @@
$('#profileModalUpdate').hide();
$('#profileModalDelete').hide();
$('#profileModal').modal('show');
//_gaq.push(['_trackEvent', 'Profile', 'Add']);
});
$('#profileEdit').click(function() {
@@ -67,7 +64,6 @@
$('#profileModalDelete').hide();
}
$('#profileModal').modal('show');
//_gaq.push(['_trackEvent', 'Profile', 'Edit', profiles.current]);
});
$('#profileModalAdd').click(function(event) {
@@ -83,7 +79,6 @@
populateChecklists();
}
$('#profileModal').modal('hide');
//_gaq.push(['_trackEvent', 'Profile', 'Create', profile]);
});
$('#profileModalUpdate').click(function(event) {
@@ -97,7 +92,6 @@
populateProfiles();
}
$('#profileModal').modal('hide');
//_gaq.push(['_trackEvent', 'Profile', 'Update', profile]);
});
$('#profileModalDelete').click(function(event) {
@@ -114,13 +108,11 @@
populateProfiles();
populateChecklists();
$('#profileModal').modal('hide');
//_gaq.push(['_trackEvent', 'Profile', 'Delete']);
});
$('#profileModalClose').click(function(event) {
event.preventDefault();
$('#profileModal').modal('hide');
//_gaq.push(['_trackEvent', 'Profile', 'Close']);
});
calculateTotals();