Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 058bf79

Browse files
Documented firebase.analytics.setScreenName
1 parent 082d022 commit 058bf79

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

docs/ANALYTICS.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,20 @@ _Beware that your Analytics events in the Firebase console dashboards are update
88

99
## Functions
1010

11+
### analytics.setScreenName
12+
By default Firebase will log the classname, but since all your NativeScript screens run inside the same `UIViewController` (iOS) / `Activity` (Android),
13+
the screenlogs won't be of much use. That's where this function comes in. Simply call `setScreenName` on every page your app routes to.
14+
15+
```js
16+
firebase.analytics.setScreenName({
17+
screenName: "User settings"
18+
}).then(
19+
function () {
20+
console.log("Screen name set");
21+
}
22+
);
23+
```
24+
1125
### analytics.logEvent
1226
Events can be used to analyze what is happening in your app, such as user actions, system events, or errors.
1327

0 commit comments

Comments
 (0)