Skip to content

feat: add analytics logging bridge#340

Draft
OnurVar wants to merge 1 commit intoov/feat/componentsfrom
ov/feat/analytics-logging-bridge
Draft

feat: add analytics logging bridge#340
OnurVar wants to merge 1 commit intoov/feat/componentsfrom
ov/feat/analytics-logging-bridge

Conversation

@OnurVar
Copy link
Copy Markdown
Contributor

@OnurVar OnurVar commented Apr 8, 2026

Summary

  • Add setupAnalyticsLoggingBridge, trackAnalyticsEvent, and sendLog TurboModule bridge methods across iOS and Android (old/new arch)
  • Add PrimerAnalytics public API with setup, trackEvent, and sendLog methods
  • Add ComponentsAnalyticsLoggingBridge integration on iOS (self-contained) and Android (DI-based via headless flow)
  • Add analytics debug screen in example app for manual bridge testing
  • iOS setup awaits bridge initialization before resolving promise
  • Android setup rejects promise on failure instead of silently swallowing

Jira

ACC-6493

Test plan

  • npx tsc --noEmit passes
  • npm test — 21/21 tests pass
  • iOS builds successfully against local SDK
  • Android builds successfully against local SDK
  • Manual verification: iOS — setup bridge, track event, send log all work
  • Manual verification: Android — setup bridge, track event, send log all work via headless DI flow
  • Manual verification: debug screen shows correct status for each action

@OnurVar OnurVar self-assigned this Apr 8, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

Fails
🚫

🙁 Found 2 SwiftLint violations.

Warnings
⚠️ This PR doesn't seem to contain any updated Unit Test for Swift 🤔. Please consider double checking it 🙏
⚠️

ios/Sources/RNTPrimer.swift#L423 - Line should be 120 characters or less: currently 123 characters (line_length)

⚠️

ios/Sources/RNTPrimer.swift#L578 - Line should be 120 characters or less: currently 130 characters (line_length)

Generated by 🚫 Danger Swift against f86cc88

@OnurVar OnurVar added the wip label Apr 8, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

Fails
🚫

🙁 Found 2 detekt violations.

Warnings
⚠️ This PR doesn't seem to contain any updated Unit Test for Kotlin 🤔. Please consider double checking it 🙏
⚠️

/home/runner/work/primer-sdk-react-native/primer-sdk-react-native/android/src/main/java/com/primerioreactnative/DefaultNativePrimerModule.kt#L3 -
Detekt: Imports must be ordered in lexicographic order without any empty lines in-between with "java", "javax", "kotlin" and aliases in the end
Rule: detekt.ImportOrdering

⚠️

/home/runner/work/primer-sdk-react-native/primer-sdk-react-native/android/src/main/java/com/primerioreactnative/DefaultNativePrimerModule.kt#L274 -
Detekt: Function parameter clientToken is unused.
Rule: detekt.UnusedParameter

Generated by 🚫 Danger Kotlin against f86cc88

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

Warnings
⚠️ PR is classed as Work in Progress
Messages
📖 ✅ No ESLint violations found.

Generated by 🚫 dangerJS against f86cc88

@OnurVar OnurVar force-pushed the ov/feat/components branch from 5e1d136 to 695afe8 Compare April 20, 2026 14:28
@OnurVar OnurVar force-pushed the ov/feat/analytics-logging-bridge branch from ec9ae17 to 42578a1 Compare April 20, 2026 14:29
@OnurVar OnurVar force-pushed the ov/feat/components branch from f69fdb6 to 09ef1a0 Compare April 23, 2026 23:28
@OnurVar OnurVar force-pushed the ov/feat/analytics-logging-bridge branch from 42578a1 to 262fc13 Compare April 23, 2026 23:39
@OnurVar OnurVar force-pushed the ov/feat/analytics-logging-bridge branch from 262fc13 to 81747a5 Compare April 27, 2026 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants