Skip to content

Commit 2c1958e

Browse files
authored
fix(analytics)!: add missing reserved event names (#5630)
Updated list taken from https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Event BREAKING CHANGE: some reserved words that were accepted before will throw exceptions now that the list is complete - do not use reserved words for analytics events
1 parent 25e1d3d commit 2c1958e

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

docs/analytics/usage/index.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,19 @@ The Analytics package works out of the box, however a number of events are autom
109109
These event names are called as 'Reserved Events'. Attempting to send any custom event using the `logEvent` method
110110
with any of the following event names will throw an error.
111111

112-
| Reserved Events Names | | |
113-
| ---------------------- | ------------------------- | ------------------- |
114-
| `app_clear_data` | `app_uninstall` | `app_update` |
115-
| `error` | `first_open` | `first_visit` |
116-
| `first_open_time` | `first_visit_time` | `in_app_purchase` |
117-
| `notification_dismiss` | `notification_foreground` | `notification_open` |
118-
| `notification_receive` | `os_update` | `session_start` |
119-
| `screen_view` | `user_engagement` | `ad_impression` |
120-
| `ad_click` | `ad_query` | `ad_exposure` |
121-
| `adunit_exposure` | `ad_activeiew` |
112+
| Reserved Events Names | | |
113+
| -------------------------------- | ------------------------------ | ------------------------------- |
114+
| `ad_activeview` | `ad_click` | `ad_exposure` |
115+
| `ad_impression` | `ad_query` | `ad_reward` |
116+
| `adunit_exposure` | `app_background` | `app_clear_data` |
117+
| `app_remove` | `app_store_refund` | `app_store_subscription_cancel` |
118+
| `app_store_subscription_convert` | `app_store_subscription_renew` | `app_update` |
119+
| `app_upgrade` | `dynamic_link_app_open` | `dynamic_link_app_update` |
120+
| `dynamic_link_first_open` | `error` | `first_open` |
121+
| `first_visit` | `in_app_purchase` | `notification_dismiss` |
122+
| `notification_foreground` | `notification_open` | `notification_receive` |
123+
| `os_update` | `session_start` | `session_start_with_rollout` |
124+
| `user_engagement` |
122125

123126
## App instance id
124127

packages/analytics/lib/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,13 @@ import version from './version';
3737
import * as structs from './structs';
3838

3939
const ReservedEventNames = [
40+
'ad_activeview',
41+
'ad_click',
42+
'ad_exposure',
43+
'ad_impression',
44+
'ad_query',
4045
'ad_reward',
46+
'adunit_exposure',
4147
'app_background',
4248
'app_clear_data',
4349
// 'app_exception',
@@ -53,6 +59,7 @@ const ReservedEventNames = [
5359
'dynamic_link_first_open',
5460
'error',
5561
'first_open',
62+
'first_visit',
5663
'in_app_purchase',
5764
'notification_dismiss',
5865
'notification_foreground',

0 commit comments

Comments
 (0)