Repository navigation
Add a "Did this help you find food?" answer to opened Kingston listings - #20
Merged
Merged
Conversation
An opened listing on the home directory ends with "Did this help you find food?" and two buttons, Yes and Not this time. An answer sends one fixed aggregate event (feedback_yes or feedback_no) through the existing analytics path, without the listing, labels or any identifier. One answer is sent per page load. The question appears only where a deployment configures both payloads and collection is allowed. Kingston maps the answers to help_feedback with event_value yes or not_this_time and the disclosure names them. Brockville is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before: an opened listing on the Kingston directory ends with its weekly hours and action buttons.
After: the opened details end with one line, "Did this help you find food?", and two buttons, Yes and Not this time. After an answer, every listing shows "Thanks for letting us know." until the page reloads. There is no popup and no text box.
An answer sends one fixed aggregate event through the existing analytics path. Kingston sends
{"event_name":"help_feedback","event_value":"yes"}or"not_this_time"with its usual v3 constants. It carries no listing, no outreach labels and no identifier, since provider identity must never enter analytics.How: two optional event kinds,
feedback_yesandfeedback_no, follow the pattern ofresource_openand the install-prompt kinds. A deployment must configure both payloads or neither. The emitter sends at most one answer per page load. The question is added by script only on the home directory, only while collection is allowed, and only where both payloads are configured, so Brockville, the static pages and no-JavaScript visitors see no change. The Kingston disclosure,ANALYTICS.mdand docs name the new answers. The Kingston contract test pins the new wire format and the one-answer limit.Lighthouse must accept
help_feedbackbefore a Kingston release that includes this. Merging publishes nothing.