You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add method `getGoogleAnalyticsClientId()` to retrieve an unique identifier for a web client. This allows users to log purchase and other events from their backends using Google Analytics 4 Measurement Protocol and to have those events be connected to actions taken on the client within their Firebase web app. `getGoogleAnalyticsClientId()` will simplify this event recording process.
Implemented an optimization in the local cache synchronization logic that reduces the number of billed document reads when documents were deleted on the server while the client was not actively listening to the query (e.g. while the client was offline).
Copy file name to clipboardExpand all lines: README.md
+14-7
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ Please see [Environment Support](https://firebase.google.com/support/guides/envi
29
29
#### Node.js
30
30
31
31
Before you can start working on the Firebase JS SDK, you need to have Node.js
32
-
installed on your machine. The currently supported versions are `10.15.0`or greater.
32
+
installed on your machine. The currently supported versions are `10.15.0`through `16.6.0`.
33
33
34
34
To download Node.js visit https://nodejs.org/en/download/.
35
35
@@ -43,9 +43,14 @@ In addition to Node.js we use `yarn` to facilitate multi package development.
43
43
To install `yarn` follow the instructions listed on their website:
44
44
https://yarnpkg.com/en/docs/install
45
45
46
+
This repo currently supports building with yarn `1.x`. For instance, after installating yarn, run
47
+
```bash
48
+
$ yarn set version 1.22.11`
49
+
```
50
+
46
51
#### Java
47
52
48
-
The closure compiler requires a modern Java installation. Java 8+ should be installed: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
53
+
The closure compiler requires a modern Java installation. Java 11+ should be installed: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
49
54
50
55
#### Verify Prerequisites
51
56
@@ -57,8 +62,8 @@ $ yarn -v
57
62
$ java -version
58
63
```
59
64
60
-
Your Node.js version should be `10.15.0`or greater, your `yarn` version should
61
-
be `1.0.0`or greater, and your `java` version should be `1.8.0` or greater.
65
+
Your `node` version should be between `10.15.0`and `16.6.0`, your `yarn` version should
66
+
be between `1.0.0`and `1.22.11`, and your `java` version should be `11.0` or greater.
62
67
63
68
_NOTE: We will update the documentation as new versions are required, however
64
69
for continuing development on the SDK, staying up to date on the stable versions
@@ -109,7 +114,7 @@ will be overwritten below.
109
114
110
115
Visit the "Realtime Database" section of the console and create a realtime
111
116
database. When prompted to select the set of initial security rules, select
112
-
any option (e.g. "Start in Production Mode") since these permission settings
117
+
any option (e.g. "Start inLocked Mode") since these permission settings
113
118
will be overwritten below.
114
119
115
120
#### Storage Setup
@@ -127,8 +132,10 @@ order to run the tests, you will need to update your bucket's CORS rules.
127
132
}
128
133
]
129
134
```
130
-
2. Install `gsutil` from https://cloud.google.com/storage/docs/gsutil_install
131
-
3. Run `gsutil cors set cors.json gs://<your-cloud-storage-bucket>`
135
+
1. Install `gsutil` from https://cloud.google.com/storage/docs/gsutil_install
136
+
1. You will need to login if this is your first time using `gsutil`. Run `gcloud auth login`
137
+
and follow the instructions to login.
138
+
1. Run `gsutil cors set cors.json gs://<your-cloud-storage-bucket>`
132
139
133
140
For more information, visit https://firebase.google.com/docs/storage/web/download-files#cors_configuration
Copy file name to clipboardExpand all lines: docs-devsite/analytics.md
+21
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@ Firebase Analytics
20
20
|[getAnalytics(app)](./analytics.md#getanalytics)| Returns an [Analytics](./analytics.analytics.md#analytics_interface) instance for the given app. |
21
21
|[initializeAnalytics(app, options)](./analytics.md#initializeanalytics)| Returns an [Analytics](./analytics.analytics.md#analytics_interface) instance for the given app. |
22
22
| <b>function(analyticsInstance...)</b> |
23
+
|[getGoogleAnalyticsClientId(analyticsInstance)](./analytics.md#getgoogleanalyticsclientid)| Retrieves a unique Google Analytics identifier for the web client. See [client\_id](https://developers.google.com/analytics/devguides/collection/ga4/reference/config#client_id)<!---->. |
23
24
|[logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.md#logevent)| Sends a Google Analytics event with given <code>eventParams</code>. This method automatically associates this logged event with this Firebase web app instance on this device.<!---->List of recommended event parameters can be found in [the GA4 reference documentation](https://developers.google.com/gtagjs/reference/ga4-events)<!---->. |
24
25
|[logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.md#logevent)| Sends a Google Analytics event with given <code>eventParams</code>. This method automatically associates this logged event with this Firebase web app instance on this device.<!---->List of recommended event parameters can be found in [the GA4 reference documentation](https://developers.google.com/gtagjs/reference/ga4-events)<!---->. |
25
26
|[logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.md#logevent)| Sends a Google Analytics event with given <code>eventParams</code>. This method automatically associates this logged event with this Firebase web app instance on this device.<!---->See [Track Screenviews](https://firebase.google.com/docs/analytics/screenviews)<!---->. |
Retrieves a unique Google Analytics identifier for the web client. See [client\_id](https://developers.google.com/analytics/devguides/collection/ga4/reference/config#client_id)<!---->.
Sends a Google Analytics event with given `eventParams`<!---->. This method automatically associates this logged event with this Firebase web app instance on this device.
Copy file name to clipboardExpand all lines: docs-devsite/app-check.md
+25
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ Firebase App Check
19
19
| <b>function(app...)</b> |
20
20
|[initializeAppCheck(app, options)](./app-check.md#initializeappcheck)| Activate App Check for the given app. Can be called only once per app. |
21
21
| <b>function(appCheckInstance...)</b> |
22
+
|[getLimitedUseToken(appCheckInstance)](./app-check.md#getlimitedusetoken)| Requests a Firebase App Check token. This method should be used only if you need to authorize requests to a non-Firebase backend.<!---->Returns limited-use tokens that are intended for use with your non-Firebase backend endpoints that are protected with <ahref="https://firebase.google.com/docs/app-check/custom-resource-backend#replay-protection"> Replay Protection</a>. This method does not affect the token generation behavior of the \#getAppCheckToken() method. |
22
23
|[getToken(appCheckInstance, forceRefresh)](./app-check.md#gettoken)| Get the current App Check token. Attaches to the most recent in-flight request if one is present. Returns null if no token is present and no token requests are in-flight. |
23
24
|[onTokenChanged(appCheckInstance, observer)](./app-check.md#ontokenchanged)| Registers a listener to changes in the token state. There can be more than one listener registered at the same time for one or more App Check instances. The listeners call back on the UI thread whenever the current token associated with this App Check instance changes. |
24
25
|[onTokenChanged(appCheckInstance, onNext, onError, onCompletion)](./app-check.md#ontokenchanged)| Registers a listener to changes in the token state. There can be more than one listener registered at the same time for one or more App Check instances. The listeners call back on the UI thread whenever the current token associated with this App Check instance changes. |
Requests a Firebase App Check token. This method should be used only if you need to authorize requests to a non-Firebase backend.
76
+
77
+
Returns limited-use tokens that are intended for use with your non-Firebase backend endpoints that are protected with <ahref="https://firebase.google.com/docs/app-check/custom-resource-backend#replay-protection"> Replay Protection</a>. This method does not affect the token generation behavior of the \#getAppCheckToken() method.
Get the current App Check token. Attaches to the most recent in-flight request if one is present. Returns null if no token is present and no token requests are in-flight.
0 commit comments