removed sendFeedback function and it's call because we need to do it from GTM ui, not programmatically (#550)

This commit is contained in:
trean
2024-01-24 17:28:50 +01:00
committed by GitHub
parent 682f1866d2
commit 6a250e1f89
2 changed files with 0 additions and 12 deletions
-1
View File
@@ -83,7 +83,6 @@ keywords = "search engine, vector database, neural network, matching, filter, Sa
[params.feedback]
enable = true
max_value = 100
title = "Feedback"
question = "Was this page helpful?"
positive = "Yes"
@@ -23,24 +23,13 @@
yesButton.disabled = true;
noButton.disabled = true;
};
const sendFeedback = (value) => {
if (typeof gtag !== 'function') return;
gtag('event', 'page_helpful', {
'event_category': 'Helpful',
'event_label': window.location.pathname,
'value': value
});
};
yesButton.addEventListener('click', () => {
yesResponse.classList.add('feedback__response_visible');
disableButtons();
{{ $maxValue := .Site.Params.feedback.max_value | default 100 -}}
sendFeedback({{ $maxValue }});
});
noButton.addEventListener('click', () => {
noResponse.classList.add('feedback__response_visible');
disableButtons();
sendFeedback(0);
});
</script>