Commit e840861
P-2069 unify mobile screen events as page type (#12)
* feat: unify mobile screen events as page type for Tinybird compatibility
Screen events from the React Native SDK now send type="page" instead of
type="screen", with screen name mapped to page_title, page_path, and
page_url context fields. This allows Tinybird's process_sessions and
process_sources materializations (which filter on type='page') to include
mobile screen views. The channel="mobile" field distinguishes mobile from
web traffic.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: let user-supplied context override default page fields in screen events
User-provided context values for page_title, page_path, and page_url
were being silently discarded because the defaults were spread after the
user context. Reversed the spread order so user values take precedence,
consistent with how generateContext() handles merging.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor: remove redundant page_path from screen event context
Tinybird derives page_path from page_url via path(), so setting it
in the SDK is redundant and never read.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 8b97141 commit e840861
1 file changed
+15
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
375 | | - | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
376 | 379 | | |
377 | 380 | | |
378 | 381 | | |
| |||
382 | 385 | | |
383 | 386 | | |
384 | 387 | | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
385 | 397 | | |
386 | 398 | | |
387 | | - | |
| 399 | + | |
388 | 400 | | |
389 | 401 | | |
390 | | - | |
| 402 | + | |
391 | 403 | | |
392 | 404 | | |
393 | 405 | | |
| |||
0 commit comments