Skip to content
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

feat: add analytics for Inkeep #2845

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

feat: add analytics for Inkeep #2845

wants to merge 2 commits into from

Conversation

saimonkat
Copy link
Collaborator

@saimonkat saimonkat commented Jan 29, 2025

This PR adds analytics for Inkeep:

  • Search: search_query_submitted
  • Chat: chat_message_submitted

Steps to test

  • Use Docs search or AI Chat with console.logs for events:
    image
    image

Preview

Copy link

vercel bot commented Jan 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
neon-next ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 29, 2025 11:32am

@danieltprice danieltprice self-requested a review January 29, 2025 16:39
Copy link
Collaborator

@danieltprice danieltprice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@saimonkat
Copy link
Collaborator Author

@danieltprice have you got a chance to check new events in the analytics dahboard?

@saimonkat saimonkat marked this pull request as ready for review January 31, 2025 14:26
logEventCallback: (event) => {
const { eventName, properties } = event;
if (eventName === 'chat_message_submitted') {
sendGtagEvent(eventName, { text: properties.content });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sendGtagEvent(eventName, { text: properties.content });
sendGtagEvent('AI Chat Message Submitted', { text: properties.content });

logEventCallback: (event) => {
const { eventName, properties } = event;
if (eventName === 'search_query_submitted') {
sendGtagEvent(eventName, { text: properties.query });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sendGtagEvent(eventName, { text: properties.query });
sendGtagEvent('Search Query Submitted', { text: properties.query });

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@saimonkat Trying to standardize on this format for event names, otherwise LGTM

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.

4 participants