File tree 2 files changed +24
-3
lines changed
packages/analytics/lib/modular
2 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,14 @@ export declare function initializeAnalytics(
23
23
options ?: FirebaseAnalyticsTypes . AnalyticsSettings ,
24
24
) : Analytics ;
25
25
26
+ /**
27
+ * Retrieves a unique Google Analytics identifier for the web client.
28
+ *
29
+ * @param analyticsInstance - Instance of analytics (web - only)
30
+ *
31
+ */
32
+ export declare function getGoogleAnalyticsClientId ( analyticsInstance : Analytics ) : Promise < string > ;
33
+
26
34
/**
27
35
* Log a custom event with optional params. Note that there are various limits that applied
28
36
* to event parameters (total parameter count, etc), but analytics applies the limits during
@@ -605,10 +613,14 @@ export function getAppInstanceId(analytics: Analytics): Promise<string | null>;
605
613
* Gives a user a unique identification.
606
614
*
607
615
* @param analytics Analytics instance.
608
- * @param id Set to null to remove a previously assigned ID from analytics
609
- * events
616
+ * @param id Set to null to remove a previously assigned ID from analytics events
617
+ * @param options Additional options that can be passed to Analytics method calls such as logEvent, etc.
610
618
*/
611
- export function setUserId ( analytics : Analytics , id : string | null ) : Promise < void > ;
619
+ export function setUserId (
620
+ analytics : Analytics ,
621
+ id : string | null ,
622
+ options ?: AnalyticsCallOptions ,
623
+ ) : Promise < void > ;
612
624
613
625
/**
614
626
* Sets a key/value pair of data on the current user. Each Firebase project can have up to 25 uniquely named (case-sensitive) user properties.
Original file line number Diff line number Diff line change @@ -64,6 +64,15 @@ export function initializeAnalytics(app, options) {
64
64
return getApp ( app . name ) . analytics ( ) ;
65
65
}
66
66
67
+ /**
68
+ * Retrieves a unique Google Analytics identifier for the web client.
69
+ *
70
+ * @param {AnalyticsInstance } analyticsInstance - Instance of analytics (web - only)
71
+ * @returns {string }
72
+ */
73
+ export function getGoogleAnalyticsClientId ( analyticsInstance ) {
74
+ throw new Error ( 'getGoogleAnalyticsClientId is only supported on Web' ) ;
75
+ }
67
76
/**
68
77
* Log a custom event with optional params.
69
78
* @param {FirebaseAnalytics } analytics - Analytics instance.
You can’t perform that action at this time.
0 commit comments