Skip to content

Commit 6fda149

Browse files
authored
Fix google analytics bug (#344)
Fixes a critical issue where the version selector was unusable. The issue is caused by a Google Analytics event that we have been sending to track clicks in the version selector. This worked fine until today, and may be related in some way to recent changes in the web site build. It's very difficult to completely verify exact cause, though.
1 parent bd9781d commit 6fda149

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/js/01-nav.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,16 @@
5757
versionSelector.addEventListener('change', function (e) {
5858
const target = e.target
5959

60-
const current = target.dataset.current
61-
const next = target.selectedOptions[0].dataset.version
60+
// const current = target.dataset.current
61+
// const next = target.selectedOptions[0].dataset.version
6262

6363
const url = target.value
6464

65-
if (window.ga) {
66-
window.ga('send', 'event', 'version-select', 'From: ' + current + ';To:' + next + ';')
67-
}
65+
// temporarily disable analytics for selector-versions
66+
// because it is now broken
67+
// if (window.ga) {
68+
// window.ga('send', 'event', 'version-select', 'From: ' + current + ';To:' + next + ';')
69+
// }
6870

6971
document.location.assign(url)
7072
})

0 commit comments

Comments
 (0)