Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(analytics): Updated reserved event name list #5630

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions docs/analytics/usage/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,19 @@ The Analytics package works out of the box, however a number of events are autom
These event names are called as 'Reserved Events'. Attempting to send any custom event using the `logEvent` method
with any of the following event names will throw an error.

| Reserved Events Names | | |
| ---------------------- | ------------------------- | ------------------- |
| `app_clear_data` | `app_uninstall` | `app_update` |
| `error` | `first_open` | `first_visit` |
| `first_open_time` | `first_visit_time` | `in_app_purchase` |
| `notification_dismiss` | `notification_foreground` | `notification_open` |
| `notification_receive` | `os_update` | `session_start` |
| `screen_view` | `user_engagement` | `ad_impression` |
| `ad_click` | `ad_query` | `ad_exposure` |
| `adunit_exposure` | `ad_activeiew` |
| Reserved Events Names | | |
| -------------------------------- | ------------------------------ | ------------------------------- |
| `ad_activeview` | `ad_click` | `ad_exposure` |
| `ad_impression` | `ad_query` | `ad_reward` |
| `adunit_exposure` | `app_background` | `app_clear_data` |
| `app_remove` | `app_store_refund` | `app_store_subscription_cancel` |
| `app_store_subscription_convert` | `app_store_subscription_renew` | `app_update` |
| `app_upgrade` | `dynamic_link_app_open` | `dynamic_link_app_update` |
| `dynamic_link_first_open` | `error` | `first_open` |
| `first_visit` | `in_app_purchase` | `notification_dismiss` |
| `notification_foreground` | `notification_open` | `notification_receive` |
| `os_update` | `session_start` | `session_start_with_rollout` |
| `user_engagement` |

## App instance id

Expand Down
7 changes: 7 additions & 0 deletions packages/analytics/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ import version from './version';
import * as structs from './structs';

const ReservedEventNames = [
'ad_activeview',
'ad_click',
'ad_exposure',
'ad_impression',
'ad_query',
'ad_reward',
'adunit_exposure',
'app_background',
'app_clear_data',
// 'app_exception',
Expand All @@ -53,6 +59,7 @@ const ReservedEventNames = [
'dynamic_link_first_open',
'error',
'first_open',
'first_visit',
'in_app_purchase',
'notification_dismiss',
'notification_foreground',
Expand Down