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

[Gen ai] Log level path instead of level id on Amplitude/Statsig #58459

Merged
merged 2 commits into from
May 8, 2024

Conversation

fisher-alice
Copy link
Contributor

@fisher-alice fisher-alice commented May 7, 2024

This PR logs the level path instead of level id when sending an event to Amplitude/Statsig. This was requested by @samantha-code .

Screenshot 2024-05-07 at 4 14 51 PM

Links

Testing story

Deployment strategy

Follow-up work

Privacy

Security

Caching

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@fisher-alice fisher-alice marked this pull request as ready for review May 7, 2024 21:15
@fisher-alice fisher-alice requested a review from a team May 7, 2024 21:15
dispatch
);
}
);

const getLevelPath = (progress: ProgressState) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason not to just grab the URL (something like window.location.pathname)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh cool! I don't think so. I'll go ahead and use window.location.pathname instead. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI - when I added level url to Dance AI analytics, I added currentScriptLevelUrl. #55531
But now I see I could've used window.location.pathname instead. Wonder if I should remove this seemingly unnecessary property.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah that seems redundant to me, but I could be missing something :)

@fisher-alice fisher-alice merged commit 9f16967 into staging May 8, 2024
2 checks passed
@fisher-alice fisher-alice deleted the alice/add-pathurl branch May 8, 2024 19: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.

None yet

2 participants