Skip to content

fix(bridge): attribute analytics events to native SDK identity [NT-3855] - #408

Merged
Felipe Mamud (fmamud) merged 1 commit into
mainfrom
fix/nt-3855-mobile-sdk-library-attribution
Aug 4, 2026
Merged

fix(bridge): attribute analytics events to native SDK identity [NT-3855]#408
Felipe Mamud (fmamud) merged 1 commit into
mainfrom
fix/nt-3855-mobile-sdk-library-attribution

Conversation

@fmamud

Copy link
Copy Markdown
Contributor

Summary

  • Bridge UMD bundles stamp library.name as @contentful/optimization-ios / @contentful/optimization-android instead of the internal -bridge package identifier, so events surface as the customer-facing native SDKs in analytics.
  • React Native suffixes library.name with Platform.OS (e.g. @contentful/optimization-react-native-ios, -android), making RN-on-iOS and RN-on-Android distinguishable downstream.
  • Scope is deliberately limited to the analytics reporting layer — bundle filenames, Swift/Kotlin resource lookups, Gradle/SPM/xcscheme plumbing, and the @contentful/optimization-js-bridge package identity all keep -bridge since they are internal-only maintainer surfaces.

Ticket: https://contentful.atlassian.net/browse/NT-3855

Test plan

  • pnpm --filter @contentful/optimization-js-bridge typecheck
  • pnpm --filter @contentful/optimization-js-bridge test:unit (10/10)
  • pnpm --filter @contentful/optimization-react-native typecheck
  • pnpm --filter @contentful/optimization-react-native test:unit (99/99)
  • pnpm lint
  • pnpm format:check
  • Native iOS / Android / RN E2E — not run locally; rely on CI

Coordination note

Downstream analytics consumers keyed on the exact strings @contentful/optimization-ios-bridge, @contentful/optimization-android-bridge, or @contentful/optimization-react-native will need mapping updates. This is the intended outcome of the ticket, but it needs alignment with dashboard/event-mapping owners before release.

🤖 Generated with Claude Code

Bridge UMD bundles now stamp `library.name` as `@contentful/optimization-ios`
and `@contentful/optimization-android` instead of the internal `-bridge`
package identifier, so events surface as the customer-facing native SDKs.
React Native suffixes `library.name` with `Platform.OS`, making RN-on-iOS
and RN-on-Android distinguishable downstream.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@fmamud
Felipe Mamud (fmamud) merged commit f2c38ac into main Aug 4, 2026
42 checks passed
@fmamud
Felipe Mamud (fmamud) deleted the fix/nt-3855-mobile-sdk-library-attribution branch August 4, 2026 11:04
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