Repository navigation
events add --platform web: print trackEvent instead of a raw POST /v1/event - #9
Merged
Merged
Conversation
…f a raw POST /v1/event The web SDK now has trackEvent (strait-sdk-web#15, ADR 0002), so the web snippet uses the same call as every other platform; the SDK keeps the tap id itself (no localStorage code in the snippet). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JfkGWSV4ar1AEGgGnCbGzd
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JfkGWSV4ar1AEGgGnCbGzd
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.
Why
@straitlink/webnow hastrackEvent(strait-sdk-web#15, ADR 0002), the same call as the app SDKs. The web snippet was the only one printing a hand-written request and its ownlocalStoragetap-id code.What
src/events.mjs: web snippet =reportWebOpen(strait)on load +await trackEvent(strait, '<name>'), with the same revenue hint as React Native (value,currency,eventId).fetch(//v1/event/localStorage), then green. README, CHANGELOG Unreleased, ADR 0001 update note.Evidence
npm test: 89 pass, 0 fail, 2 skipped (existing).tsc --strictagainst the sdk-web branch; atrackEvnttypo control fails (TS2552).Release order
The snippet needs the web SDK release that adds
trackEvent: publish @straitlink/web first, then this CLI (both inops/run-1105/sdk-release-plan.md). Not published here.🤖 Generated with Claude Code
https://claude.ai/code/session_01JfkGWSV4ar1AEGgGnCbGzd