Skip to content

feat(ask-ai): Add Contact support button to Kapa answers - #20865

Merged
sfanahata merged 2 commits into
masterfrom
feat/kapa-contact-support-cta
Nov 18, 2026
Merged

sfanahata merged 2 commits into
masterfrom
feat/kapa-contact-support-cta

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

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:

  • A Plausible event, Ask AI Contact Support Click, with the page path as page. A document-level click listener registers once Kapa loads and uses composedPath() to see clicks inside Kapa's shadow root.
  • The button links to the help center with 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?

  • Urgent deadline (GA date, etc.): YYYY-MM-DD
  • Other deadline: YYYY-MM-DD
  • 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

via shannon.anahata.

--

View Session [Sentry]

@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
develop-docs Ready Ready Preview Nov 17, 2026 8:51pm UTC
sentry-docs Ready Ready Preview Nov 17, 2026 8:51pm UTC

Request Review

@cursor

cursor Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
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.

Status Service Environment
⚪ Not deployed yet develop-docs
⚪ Not deployed yet sentry-docs

Mention @rollout in a comment to update the plan.

@sfanahata
sfanahata merged commit 748bdf3 into master Nov 18, 2026
31 checks passed
@sfanahata
sfanahata deleted the feat/kapa-contact-support-cta branch November 18, 2026 17:14
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

2 active deployments
Preview – sentry-docs — 51899d58 Deployed Nov 17, 2026 by vercel[bot]
Preview – develop-docs — 51899d58 Deployed Nov 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Normal Docs review has no urgent deadline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants