Skip to content

[NT-2594] Add React Native tap tracking#158

Draft
Alex Freas (akfreas) wants to merge 1 commit intomainfrom
NT-2594-add-react-native-tap-tracking
Draft

[NT-2594] Add React Native tap tracking#158
Alex Freas (akfreas) wants to merge 1 commit intomainfrom
NT-2594-add-react-native-tap-tracking

Conversation

@akfreas
Copy link
Collaborator

@akfreas Alex Freas (akfreas) commented Mar 2, 2026

This PR adds:

  • onTap prop on <Personalization> and <Analytics> to enable tap tracking per entry
  • tapTracking prop on <OptimizationRoot>to enable tap tracking globally
  • useTapTracking hook for manual tap tracking
  • Tap detection via onTouchStart/onTouchEnd with a 10px movement threshold to separate taps from scrolls
  • Events sent as component_click through the existing Insights pipeline (trackComponentClick)

@akfreas Alex Freas (akfreas) force-pushed the NT-2594-add-react-native-tap-tracking branch from 7c4db5e to 036d4a8 Compare March 3, 2026 13:30
@akfreas Alex Freas (akfreas) changed the title Nt 2594 add react native tap tracking [NT-2594] Add React Native tap tracking Mar 3, 2026
@akfreas Alex Freas (akfreas) marked this pull request as ready for review March 3, 2026 13:32
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is tap tracking being routed through LiveUpdates? That seems a little odd to me. I also think that views and taps should both be configured similarly to how the Web SDK now configures it (sorry, it's all newly refactored to better handle multiple interaction types). The ./spec files that describe that functionality are fairly up-to-date.

@akfreas Alex Freas (akfreas) marked this pull request as draft March 3, 2026 16:20
@akfreas
Copy link
Collaborator Author

Why is tap tracking being routed through LiveUpdates? That seems a little odd to me. I also think that views and taps should both be configured similarly to how the Web SDK now configures it (sorry, it's all newly refactored to better handle multiple interaction types). The ./spec files that describe that functionality are fairly up-to-date.

Yes, sorry, it's out of place. Was testing something out and didn't remove. Putting this back into draft and fixing.

@akfreas Alex Freas (akfreas) force-pushed the NT-2594-add-react-native-tap-tracking branch from 2f546d8 to fae8e4b Compare March 4, 2026 22:32
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