chore(analytics-browser): update staging video analytics - #1955
Open
daniel-graham-amplitude wants to merge 1 commit into
Open
chore(analytics-browser): update staging video analytics#1955daniel-graham-amplitude wants to merge 1 commit into
daniel-graham-amplitude wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Staging API key env var missing
- Added VITE_AMPLITUDE_STAGING_API_KEY to .env.example so the documented local setup supplies the staging key that track-html-video.html now reads.
Or push these changes by commenting:
@cursor push c7841a9bf7
Preview (c7841a9bf7)
diff --git a/.env.example b/.env.example
--- a/.env.example
+++ b/.env.example
@@ -1,4 +1,5 @@
# Copy and paste this file to .env and fill in the values
VITE_AMPLITUDE_API_KEY=<MY_AMPLITUDE_API_KEY>
+VITE_AMPLITUDE_STAGING_API_KEY=<MY_AMPLITUDE_STAGING_API_KEY>
VITE_AMPLITUDE_USER_ID=<MY_AMPLITUDE_USER_ID>
VITE_GTM_CONTAINER_ID=<MY_GTM_CONTAINER_ID>You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit 169c364. Configure here.
| amplitude.setUserId(userId); | ||
| amplitude.init(import.meta.env.VITE_AMPLITUDE_API_KEY, { | ||
| delayedEventsServerUrl: `${location.origin}/2/httpapi/delayed`, | ||
| amplitude.init(import.meta.env.VITE_AMPLITUDE_STAGING_API_KEY, { |
There was a problem hiding this comment.
Staging API key env var missing
Medium Severity
amplitude.init now reads VITE_AMPLITUDE_STAGING_API_KEY, which is not defined in .env.example or anywhere else in the repo. Vite substitutes undefined, so the SDK initializes with an empty API key and staging video events are dropped.
Reviewed by Cursor Bugbot for commit 169c364. Configure here.
size-limit report 📦
|
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.



Summary
Checklist