Universal Analytics (UA) is deprecated. For details, see #1096. Here's some of the code associated with the page feedback feature:
|
const sendFeedback = (value) => { |
|
if (typeof ga !== 'function') return; |
|
const args = { |
|
command: 'send', |
|
hitType: 'event', |
|
category: 'Helpful', |
|
action: 'click', |
|
label: window.location.pathname, |
|
value: value |
|
}; |
|
ga(args.command, args.hitType, args.category, args.action, args.label, args.value); |
|
}; |
|
yesButton.addEventListener('click', () => { |
|
yesResponse.classList.add('feedback--response__visible'); |
|
disableButtons(); |
|
sendFeedback(1); |
|
}); |
This still uses the analytics.js library's ga() function. Note that this code is incompatible with GA4 because of the library that is used and the event name, as is explained below.
Tasks
Notes:
- Interestingly, Kubernetes docs had switched to using
gtag.js in their override of layouts/partials/feedback.html already 4 years ago
- Indirectly related:
/cc @caniszczyk @nate-double-u
Universal Analytics (UA) is deprecated. For details, see #1096. Here's some of the code associated with the page feedback feature:
docsy/layouts/partials/feedback.html
Lines 37 to 53 in d9bf98b
This still uses the
analytics.jslibrary'sga()function. Note that this code is incompatible with GA4 because of the library that is used and the event name, as is explained below.Tasks
gtag- [GA4] Emitpage_helpfulevents for page feedback #1726page_helpfulevents are being emitted, with a default value of 100 for "yes" and 0 for "no" responses:page_helpfulevents for page feedback #1726Notes:
gtag.jsin their override of layouts/partials/feedback.html already 4 years ago/cc @caniszczyk @nate-double-u