Skip to content

Commit a3758f1

Browse files
authored
docs(firebase-analytics): update (#194)
* docs(firebase-analytics): update * chore: update * chore: update * chore: update * chore: update * docs(firebase-analytics): update
1 parent 129de8f commit a3758f1

File tree

1 file changed

+26
-17
lines changed

1 file changed

+26
-17
lines changed

packages/firebase-analytics/README.md

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# @nativescript/firebase-analytics
22

3+
* [Intro](#intro)
4+
* [Installation](#installation)
5+
* [Use @nativescript/firebase-analytics](#use-nativescriptfirebase-analytics)
6+
* [Log custom events](#log-custom-events)
7+
* [Log Predefined Events](#log-predefined-events)
8+
* [Reserved Events](#reserved-events)
9+
* [Get the app instance id](#get-the-appinstance-id)
10+
* [Disable Ad Id usage on iOS](#disable-ad-id-usage-on-ios)
11+
* [Demo app](#demo-app)
12+
* [Analytics class](#analytics-class)
13+
* [Properties](#properties)
14+
* [Methods](#Methods)
15+
* [License](#License)
16+
17+
## Intro
18+
319
This plugin allows you to add [Google Analytics for Firebase](https://firebase.google.com/docs/analytics)
420
to your app.
521

@@ -13,18 +29,6 @@ Analytics collects usage and behavior data for your app. Its two primary concern
1329

1430
[![image](https://img.youtube.com/vi/8iZpH7O6zXo/hqdefault.jpg)](https://www.youtube.com/watch?v=8iZpH7O6zXo)
1531

16-
* [Installation](#installation)
17-
* [Use @nativescript/firebase-analytics](#use-nativescriptfirebase-analytics)
18-
* [Log custom events](#log-custom-events)
19-
* [Log Predefined Events](#log-predefined-events)
20-
* [Reserved Events](#reserved-events)
21-
* [Get the app instance id](#get-the-appinstance-id)
22-
* [Disable Ad Id usage on iOS](#disable-ad-id-usage-on-ios)
23-
* [Analytics class API](#analytics-class-api)
24-
* [Properties](#properties)
25-
* [Methods](#Methods)
26-
* [License](#License)
27-
2832
## Installation
2933
Install the plugin by running the following command in the root directory of your project.
3034

@@ -39,7 +43,8 @@ The examples below show you how to use `@nativescript/firebase-analytics` to log
3943
### Log custom events
4044

4145
Analytics also allows developers to log custom events. If you're already familiar with Google Analytics, this method is equivalent to using the event command in [gtag.js](https://developers.google.com/gtagjs/).
42-
To log a custom event to Analytics, call the `logEvent` method on an instance of the `Analytics` class passing it the name of the custom event as the first argument and the event data object as the second argument.
46+
47+
To log a custom event to Analytics, call the `logEvent` method on an instance of the [Analytics](#analytics-class) class passing it the name of the custom event as the first argument and the event data object as the second argument.
4348

4449
Please be aware that primitive data types or arrays of primitive data types are logged in your Firebase Analytics console.
4550

@@ -105,9 +110,9 @@ import { firebase } from '@nativescript/firebase-core';
105110
const appInstanceId = firebase().analytics().getAppInstanceId();
106111
```
107112

108-
### Disable Ad Id usage on iOS
113+
### Disable Identifier for Advertisers usage with analytics on iOS
109114

110-
Apple strictly bans an app from being in the Kids category if the app accesses IDFA iOS symbols.
115+
Apple strictly bans an app from being in the Kids category if the app accesses Identifier for Advertisers(IDFA) iOS symbols.
111116

112117
Additionally, if an app accesses IDFA iOS symbols, it must implement Apple's [App Tracking Transparency](https://developer.apple.com/documentation/apptrackingtransparency)(or `ATT`). However, if an app does not use IDFA and otherwise handles data in an ATT-compatible way, it eliminates this ATT requirement.
113118

@@ -119,9 +124,13 @@ $NSFirebaseAnalyticsWithoutAdIdSupport = true
119124

120125
During pod install, using that variable installs a new `Analytics With No Ad Ids` pod that the firebase-ios-sdk team created, and allows both the use of Firebase Analytics in Kids Category apps and Firebase Analytics without needing the App Tracking Transparency handling (assuming no other parts of your app handles data in a way that requires ATT)
121126

122-
Note that for obvious reasons, configuring Firebase Analytics for use without IDFA is incompatible with AdMob.
127+
>**Note** that configuring Firebase Analytics for use without IDFA is incompatible with AdMob.
128+
129+
### Demo app
130+
131+
You can find the demo app [here](https://stackblitz.com/edit/nativescript-stackblitz-templates-j2k32w?file=app/firebase-analytics-page.ts).
123132

124-
## Analytics class API
133+
## Analytics class
125134

126135
The plugin offers you the Analytics class through which you can manage Firebase Analytics.
127136
The Analytics class has the following properties and methods.

0 commit comments

Comments
 (0)