Repository navigation
feat(ask-ai): Add Contact support button to Kapa answers - #20865
Merged
Merged
Conversation
Co-Authored-By: Shannon Anahata <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
sfanahata
marked this pull request as ready for review
November 17, 2026 20:29
Contributor
|
Services awaiting deployment · Rollout details Warning Rollouts can't watch this change after it deploys: every data source for this team needs to be signed in again, so a check has no telemetry to read. Sign in to your data sources, or ask a team admin to.
Mention |
Co-Authored-By: Shannon Anahata <[email protected]>
KyleTryon
approved these changes
Nov 18, 2026
1 of 6 tasks
sfanahata
added a commit
that referenced
this pull request
Nov 18, 2026
## DESCRIBE YOUR PR This follows up #20865, which added a **Contact support** button under Ask AI answers and counted clicks on it in Plausible. Each click now also sends a Sentry counter metric, `docs.ask_ai.contact_support`, through `DocMetrics`, like the other docs metrics (`docs.copy_page`, `docs.snippet_copy` and others). Its `page_path` attribute holds the first 3 segments of the path, the same truncation those metrics use. The metric fires in the same click handler as the Plausible event, so the two counts should match. ## IS YOUR CHANGE URGENT? - [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD - [ ] Other deadline: YYYY-MM-DD - [x] No deadline: Not urgent, can wait up to 1 week+ ## PRE-MERGE CHECKLIST - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) <!-- junior-request-attribution:start --> via **shannon.anahata**. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:slack%3AD0BB8KQT6MU%3A1794943960.458059 --> -- [View Session](https://junior-prod.sentry.dev/conversations/slack%3AD0BB8KQT6MU%3A1794943960.458059) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AD0BB8KQT6MU%3A1794943960.458059/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Shannon Anahata <[email protected]>
This branch was successfully deployed
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.
DESCRIBE YOUR PR
Turns on Kapa's answer CTA button in the Ask AI widget. A Contact support button now appears under each AI answer and links to the Sentry help center (https://www.sentry.help/en/), so people who don't get what they need from the bot have a clear next step.
The button shows on every answer. Kapa has no option to show it only on some answers. If we want escalation only when the bot is unsure or an answer gets a thumbs-down, Kapa's handoff button can do that.
Click tracking. Kapa's dashboard doesn't count clicks on this button, and its widget fires no JavaScript event for it: in the widget bundle the button is a plain link with no click handler. So we count clicks ourselves:
Ask AI Contact Support Click, with the page path aspage. A document-level click listener registers once Kapa loads and usescomposedPath()to see clicks inside Kapa's shadow root.utm_source=docs&utm_medium=ask-ai&utm_content=contact-support. That makes the link unique, so links to the help center inside AI answers don't count as button clicks, and the help center's own analytics can attribute the visits too.Note: Kapa only serves answers to
docs.sentry.io, so on Vercel previews Ask AI fails with "Network error while fetching answer" and the button never appears. This happens on every preview, not just this PR's.IS YOUR CHANGE URGENT?
PRE-MERGE CHECKLIST
via shannon.anahata.
--
View Session [Sentry]