measurementId property
The unique Google-assigned identifier of the Google Analytics web stream
associated with the WebApp
.
Firebase SDKs use this ID to interact with Google Analytics APIs. This
field is only present if the WebApp
is linked to a web stream in a
Google Analytics App + Web property. Learn more about this ID and Google
Analytics web streams in the
Analytics documentation.
To generate a measurementId
and link the WebApp
with a Google
Analytics web stream, call
[AddGoogleAnalytics
](../../v1beta1/projects/addGoogleAnalytics). For
apps using the Firebase JavaScript SDK v7.20.0 and later, Firebase
dynamically fetches the measurementId
when your app initializes
Analytics. Having this ID in your config object is optional, but it does
serve as a fallback in the rare case that the dynamic fetch fails.
Implementation
core.String? measurementId;