Skip to content

Conversation

@aatuvai
Copy link
Contributor

@aatuvai aatuvai commented Oct 24, 2025

This PR adds several events to be tracked in Google Analytics:

  1. Link clicks in Inkeep search/AI chat with the events:
    1.1. inkeep_search_result_clicked
    1.2. inkeep_assistant_source_item_clicked
    1.3. inkeep_assistant_message_inline_link_opened
  2. Sidebar link clicks with sidebar_link_click
  3. Navbar link clicks with navbar_link_click
  4. Breadcrumbs link clicks with breadcrumbs_link_click
  5. Table of contents link clicks with toc_link_click
  6. Link clicks in the markdown content of the viewed page with active_page_link_click
  7. User messages to Inkeep AI chat with inkeep_user_message_submitted
  8. User search queries submitted to Inkeep search with search
  9. Inkeep AI chat negative/positive feedback submitted with inkeep_assistant_negative_feedback_submittedand inkeep_assistant_positive_feedback_submitted
  10. Inkeep AI chat message copied with inkeep_assistant_message_copied
  11. Inkeep AI chat code block copied with inkeep_assistant_code_block_copied

In order to create explorations for these events, the following parameters are expected to be registered as custom dimensions (dimension name followed by event parameter name):

  • Clicked link URL clicked_link_url
  • Latest user message latest_user_message
  • Total search results total_results
  • Latest user message latest_user_message
  • Latest AI assistant message latest_assistant_message
  • AI chat user feedback labels feedback_reason_labels
  • AI chat user feedback details feedback_reason_details
  • Copied code value code_value

InkeepSearch.tsx and InlineSearch.tsx are edited to not include the message as their value. Also, their onChange callback is removed. These lines serve no purpose, as the Inkeep search is opened in a self-contained modal when the input is clicked.

The handleChange function in useInkeepSearch is split to two functions, handleSearchChange and handleChatChange. Previously entering a message in the Ask AI chat caused the search to trigger too, because they used the same event callback.

@github-actions
Copy link

github-actions bot commented Oct 24, 2025

Amplify deployment status

Branch Commit Job ID Status Preview Updated (UTC)
aatuvai/10-24-2025-add-analytics-events 8d945c1 9 ✅SUCCEED aatuvai-10-24-2025-add-analytics-events 2025-10-30 13:10:12

@aatuvai aatuvai requested review from ptgott and rodgtr1 October 30, 2025 13:08
@aatuvai aatuvai marked this pull request as ready for review October 30, 2025 13:08
@aatuvai
Copy link
Contributor Author

aatuvai commented Nov 4, 2025

Let me know if you think some of these events are unnecessary to track. For example, I am not sure how extensively the built-in Inkeep analytics is used.

@aatuvai aatuvai requested a review from roraback November 4, 2025 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants