Skip to content

Commit 953e499

Browse files
committed
Change fieldName from clientId
1 parent a585a16 commit 953e499

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/analytics/src/functions.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ describe('FirebaseAnalytics methods', () => {
248248
unused1: unknown,
249249
unused2: unknown,
250250
unused3: unknown,
251-
callBackStub: (fieldName: string) => {}
251+
callBackStub: (clientId: string) => {}
252252
): void {
253253
callBackStub('');
254254
} as Gtag,
@@ -263,7 +263,7 @@ describe('FirebaseAnalytics methods', () => {
263263
unused1: unknown,
264264
unused2: unknown,
265265
unused3: unknown,
266-
callBackStub: (fieldName: string) => {}
266+
callBackStub: (clientId: string) => {}
267267
): void {
268268
callBackStub(CLIENT_ID);
269269
} as Gtag,

packages/analytics/src/functions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,11 @@ export async function internalGetGoogleAnalyticsClientId(
156156
GtagCommand.GET,
157157
measurementId,
158158
'client_id',
159-
(fieldName: string) => {
160-
if (!fieldName) {
159+
(clientId: string) => {
160+
if (!clientId) {
161161
reject(ERROR_FACTORY.create(AnalyticsError.NO_CLIENT_ID));
162162
}
163-
resolve(fieldName);
163+
resolve(clientId);
164164
}
165165
);
166166
});

packages/analytics/src/helpers.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ describe('Gtag wrapping functions', () => {
276276
GtagCommand.GET,
277277
fakeMeasurementId,
278278
'client_id',
279-
fieldName => console.log(fieldName)
279+
clientId => console.log(clientId)
280280
);
281281
expect((window['dataLayer'] as DataLayer).length).to.equal(1);
282282
});

0 commit comments

Comments
 (0)