-
Notifications
You must be signed in to change notification settings - Fork 743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update KB helpful survey #6423
Update KB helpful survey #6423
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of htmx
and alpine.js
is pretty cool!
-
The GA4 tracking events are not being generated (see comments in code below).
-
When the user is not authenticated but has already voted anonymously, the voting form is still displayed when the article is viewed again, and if another vote is attempted, the response from the vote POST is a redirect to the KB article, which causes a strange article-within-an-article view of the page.
- The font size and weight of the
Yes
andNo
of the voting form should match those of itsWas this article helpful?
text.
- When the user is authenticated, the voting form is pushed way down on the page.
- The
Cancel
andSubmit
buttons of both the "yes" and "no" surveys are stacked instead of side-by-side.
- When submitting the survey, the response is
Thanks for making us better!
instead ofThanks for your feedback!
as the Figma indicates. Also, the text is not bold as is shown in Figma.
12cfa7b
to
b7b3117
Compare
I will have another look to make sure that it scales properly to different screen sizes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, I really like the GA4-event-related changes, and when I tested them locally, the GA4 events are generated properly (except for the first comment below). I have two comments:
- After submitting a survey response, a final pair of
survey_opened
andsurvey_closed
GA4 events are generated, becausesurvey_form.html
is rendered and returned for theresponse_message
ofThanks for your feedback!
. Both of those survey events include an emptysurvey_type
parameter. See the image below. I'm thinking we shouldn't generate survey events in this case, because it'll misleadingly inflate the GA4 survey events.
- For the survey events, maybe we should use
article_survey_...
instead ofsurvey_...
to distinguish these events from any possible future survey events?
<button type="submit" class="btn helpful-button" name="helpful" | ||
data-event-name="article_vote" | ||
data-event-parameters='{"vote": "helpful"}' | ||
>{{ _('Yes') }}👍</button> | ||
<button type="submit" class="btn not-helpful-button" name="not-helpful" | ||
data-event-name="article_vote" | ||
data-event-parameters='{"vote": "not-helpful"}' | ||
>{{ _('No') }}👎</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
b7b3117
to
0ab27e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The GA4 events look good now. Just an indentation nit, and there's still the issue of the text of the Yes👍
and No👎
buttons looking different than the Figma designs (but as you said, you can discuss that with Josh). Thanks @akatsoulas!
const surveyType = '{{ survey_type }}'.trim(); | ||
if (surveyType) { | ||
trackEvent('article_survey_opened', { survey_type: surveyType }); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit. The indentation is off.
0ab27e8
to
92bf480
Compare
No description provided.