Skip to content

Commit 98f29a8

Browse files
committed
Fix links for Analytics
1 parent 16958be commit 98f29a8

File tree

6 files changed

+218
-249
lines changed

6 files changed

+218
-249
lines changed

packages-exp/analytics-exp/src/api.ts

Lines changed: 51 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@ export function setAnalyticsCollectionEnabled(
221221
* app instance on this device.
222222
* @public
223223
* List of recommended event parameters can be found in
224-
* {@link https://developers.google.com/gtagjs/reference/event
225-
* | the gtag.js reference documentation}.
224+
* {@link https://developers.google.com/gtagjs/reference/ga4-events
225+
* | the GA4 reference documentation}.
226226
*/
227227
export function logEvent(
228228
analyticsInstance: Analytics,
@@ -244,8 +244,8 @@ export function logEvent(
244244
* app instance on this device.
245245
* @public
246246
* List of recommended event parameters can be found in
247-
* {@link https://developers.google.com/gtagjs/reference/event
248-
* | the gtag.js reference documentation}.
247+
* {@link https://developers.google.com/gtagjs/reference/ga4-events
248+
* | the GA4 reference documentation}.
249249
*/
250250
export function logEvent(
251251
analyticsInstance: Analytics,
@@ -267,8 +267,8 @@ export function logEvent(
267267
* app instance on this device.
268268
* @public
269269
* List of recommended event parameters can be found in
270-
* {@link https://developers.google.com/gtagjs/reference/event
271-
* | the gtag.js reference documentation}.
270+
* {@link https://developers.google.com/gtagjs/reference/ga4-events
271+
* | the GA4 reference documentation}.
272272
*/
273273
export function logEvent(
274274
analyticsInstance: Analytics,
@@ -288,8 +288,8 @@ export function logEvent(
288288
* app instance on this device.
289289
* @public
290290
* List of recommended event parameters can be found in
291-
* {@link https://developers.google.com/gtagjs/reference/event
292-
* | the gtag.js reference documentation}.
291+
* {@link https://developers.google.com/gtagjs/reference/ga4-events
292+
* | the GA4 reference documentation}.
293293
*/
294294
export function logEvent(
295295
analyticsInstance: Analytics,
@@ -310,8 +310,8 @@ export function logEvent(
310310
* app instance on this device.
311311
* @public
312312
* List of recommended event parameters can be found in
313-
* {@link https://developers.google.com/gtagjs/reference/event
314-
* | the gtag.js reference documentation}.
313+
* {@link https://developers.google.com/gtagjs/reference/ga4-events
314+
* | the GA4 reference documentation}.
315315
*/
316316
export function logEvent(
317317
analyticsInstance: Analytics,
@@ -333,9 +333,9 @@ export function logEvent(
333333
* automatically associates this logged event with this Firebase web
334334
* app instance on this device.
335335
* @public
336-
* List of recommended event parameters can be found in
337-
* {@link https://developers.google.com/gtagjs/reference/event
338-
* | the gtag.js reference documentation}.
336+
* See
337+
* {@link https://developers.google.com/analytics/devguides/collection/ga4/exceptions
338+
* | Measure exceptions}.
339339
*/
340340
export function logEvent(
341341
analyticsInstance: Analytics,
@@ -354,16 +354,15 @@ export function logEvent(
354354
* app instance on this device.
355355
* @public
356356
* List of recommended event parameters can be found in
357-
* {@link https://developers.google.com/gtagjs/reference/event
358-
* | the gtag.js reference documentation}.
357+
* {@link https://developers.google.com/gtagjs/reference/ga4-events
358+
* | the GA4 reference documentation}.
359359
*/
360360
export function logEvent(
361361
analyticsInstance: Analytics,
362362
eventName: 'generate_lead',
363363
eventParams?: {
364364
value?: EventParams['value'];
365365
currency?: EventParams['currency'];
366-
transaction_id?: EventParams['transaction_id'];
367366
[key: string]: any;
368367
},
369368
options?: AnalyticsCallOptions
@@ -375,8 +374,8 @@ export function logEvent(
375374
* app instance on this device.
376375
* @public
377376
* List of recommended event parameters can be found in
378-
* {@link https://developers.google.com/gtagjs/reference/event
379-
* | the gtag.js reference documentation}.
377+
* {@link https://developers.google.com/gtagjs/reference/ga4-events
378+
* | the GA4 reference documentation}.
380379
*/
381380
export function logEvent(
382381
analyticsInstance: Analytics,
@@ -393,9 +392,9 @@ export function logEvent(
393392
* automatically associates this logged event with this Firebase web
394393
* app instance on this device.
395394
* @public
396-
* List of recommended event parameters can be found in
397-
* {@link https://developers.google.com/gtagjs/reference/event
398-
* | the gtag.js reference documentation}.
395+
* See
396+
* {@link https://developers.google.com/analytics/devguides/collection/ga4/page-view
397+
* | Page views}.
399398
*/
400399
export function logEvent(
401400
analyticsInstance: Analytics,
@@ -415,8 +414,8 @@ export function logEvent(
415414
* app instance on this device.
416415
* @public
417416
* List of recommended event parameters can be found in
418-
* {@link https://developers.google.com/gtagjs/reference/event
419-
* | the gtag.js reference documentation}.
417+
* {@link https://developers.google.com/gtagjs/reference/ga4-events
418+
* | the GA4 reference documentation}.
420419
*/
421420
export function logEvent(
422421
analyticsInstance: Analytics,
@@ -440,9 +439,9 @@ export function logEvent(
440439
* automatically associates this logged event with this Firebase web
441440
* app instance on this device.
442441
* @public
443-
* List of recommended event parameters can be found in
444-
* {@link https://developers.google.com/gtagjs/reference/event
445-
* | the gtag.js reference documentation}.
442+
* See
443+
* {@link https://developers.google.com/analytics/devguides/collection/ga4/screen-view
444+
* | Screen views}.
446445
*/
447446
export function logEvent(
448447
analyticsInstance: Analytics,
@@ -466,8 +465,8 @@ export function logEvent(
466465
* app instance on this device.
467466
* @public
468467
* List of recommended event parameters can be found in
469-
* {@link https://developers.google.com/gtagjs/reference/event
470-
* | the gtag.js reference documentation}.
468+
* {@link https://developers.google.com/gtagjs/reference/ga4-events
469+
* | the GA4 reference documentation}.
471470
*/
472471
export function logEvent(
473472
analyticsInstance: Analytics,
@@ -485,17 +484,15 @@ export function logEvent(
485484
* app instance on this device.
486485
* @public
487486
* List of recommended event parameters can be found in
488-
* {@link https://developers.google.com/gtagjs/reference/event
489-
* | the gtag.js reference documentation}.
487+
* {@link https://developers.google.com/gtagjs/reference/ga4-events
488+
* | the GA4 reference documentation}.
490489
*/
491490
export function logEvent(
492491
analyticsInstance: Analytics,
493492
eventName: 'select_content',
494493
eventParams?: {
495-
items?: EventParams['items'];
496-
promotions?: EventParams['promotions'];
497494
content_type?: EventParams['content_type'];
498-
content_id?: EventParams['content_id'];
495+
item_id?: EventParams['item_id'];
499496
[key: string]: any;
500497
},
501498
options?: AnalyticsCallOptions
@@ -507,8 +504,8 @@ export function logEvent(
507504
* app instance on this device.
508505
* @public
509506
* List of recommended event parameters can be found in
510-
* {@link https://developers.google.com/gtagjs/reference/event
511-
* | the gtag.js reference documentation}.
507+
* {@link https://developers.google.com/gtagjs/reference/ga4-events
508+
* | the GA4 reference documentation}.
512509
*/
513510
export function logEvent(
514511
analyticsInstance: Analytics,
@@ -528,8 +525,8 @@ export function logEvent(
528525
* app instance on this device.
529526
* @public
530527
* List of recommended event parameters can be found in
531-
* {@link https://developers.google.com/gtagjs/reference/event
532-
* | the gtag.js reference documentation}.
528+
* {@link https://developers.google.com/gtagjs/reference/ga4-events
529+
* | the GA4 reference documentation}.
533530
*/
534531
export function logEvent(
535532
analyticsInstance: Analytics,
@@ -549,8 +546,8 @@ export function logEvent(
549546
* app instance on this device.
550547
* @public
551548
* List of recommended event parameters can be found in
552-
* {@link https://developers.google.com/gtagjs/reference/event
553-
* | the gtag.js reference documentation}.
549+
* {@link https://developers.google.com/gtagjs/reference/ga4-events
550+
* | the GA4 reference documentation}.
554551
*/
555552
export function logEvent(
556553
analyticsInstance: Analytics,
@@ -569,16 +566,16 @@ export function logEvent(
569566
* app instance on this device.
570567
* @public
571568
* List of recommended event parameters can be found in
572-
* {@link https://developers.google.com/gtagjs/reference/event
573-
* | the gtag.js reference documentation}.
569+
* {@link https://developers.google.com/gtagjs/reference/ga4-events
570+
* | the GA4 reference documentation}.
574571
*/
575572
export function logEvent(
576573
analyticsInstance: Analytics,
577574
eventName: 'share',
578575
eventParams?: {
579576
method?: EventParams['method'];
580577
content_type?: EventParams['content_type'];
581-
content_id?: EventParams['content_id'];
578+
item_id?: EventParams['item_id'];
582579
[key: string]: any;
583580
},
584581
options?: AnalyticsCallOptions
@@ -590,8 +587,8 @@ export function logEvent(
590587
* app instance on this device.
591588
* @public
592589
* List of recommended event parameters can be found in
593-
* {@link https://developers.google.com/gtagjs/reference/event
594-
* | the gtag.js reference documentation}.
590+
* {@link https://developers.google.com/gtagjs/reference/ga4-events
591+
* | the GA4 reference documentation}.
595592
*/
596593
export function logEvent(
597594
analyticsInstance: Analytics,
@@ -609,8 +606,8 @@ export function logEvent(
609606
* app instance on this device.
610607
* @public
611608
* List of recommended event parameters can be found in
612-
* {@link https://developers.google.com/gtagjs/reference/event
613-
* | the gtag.js reference documentation}.
609+
* {@link https://developers.google.com/gtagjs/reference/ga4-events
610+
* | the GA4 reference documentation}.
614611
*/
615612
export function logEvent(
616613
analyticsInstance: Analytics,
@@ -631,8 +628,8 @@ export function logEvent(
631628
* app instance on this device.
632629
* @public
633630
* List of recommended event parameters can be found in
634-
* {@link https://developers.google.com/gtagjs/reference/event
635-
* | the gtag.js reference documentation}.
631+
* {@link https://developers.google.com/gtagjs/reference/ga4-events
632+
* | the GA4 reference documentation}.
636633
*/
637634
export function logEvent(
638635
analyticsInstance: Analytics,
@@ -652,8 +649,8 @@ export function logEvent(
652649
* app instance on this device.
653650
* @public
654651
* List of recommended event parameters can be found in
655-
* {@link https://developers.google.com/gtagjs/reference/event
656-
* | the gtag.js reference documentation}.
652+
* {@link https://developers.google.com/gtagjs/reference/ga4-events
653+
* | the GA4 reference documentation}.
657654
*/
658655
export function logEvent(
659656
analyticsInstance: Analytics,
@@ -673,8 +670,8 @@ export function logEvent(
673670
* app instance on this device.
674671
* @public
675672
* List of recommended event parameters can be found in
676-
* {@link https://developers.google.com/gtagjs/reference/event
677-
* | the gtag.js reference documentation}.
673+
* {@link https://developers.google.com/gtagjs/reference/ga4-events
674+
* | the GA4 reference documentation}.
678675
*/
679676
export function logEvent<T extends string>(
680677
analyticsInstance: Analytics,
@@ -689,8 +686,8 @@ export function logEvent<T extends string>(
689686
* app instance on this device.
690687
* List of official event parameters can be found in the gtag.js
691688
* reference documentation:
692-
* {@link https://developers.google.com/gtagjs/reference/event
693-
* | the gtag.js reference documentation}.
689+
* {@link https://developers.google.com/gtagjs/reference/ga4-events
690+
* | the GA4 reference documentation}.
694691
*
695692
* @public
696693
*/

packages-exp/analytics-exp/src/public-types.ts

Lines changed: 15 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -27,74 +27,55 @@ export interface GtagConfigParams {
2727
* Whether or not a page view should be sent.
2828
* If set to true (default), a page view is automatically sent upon initialization
2929
* of analytics.
30-
* See https://developers.google.com/analytics/devguides/collection/gtagjs/pages
30+
* See {@link https://developers.google.com/analytics/devguides/collection/ga4/page-view | Page views }
3131
*/
3232
'send_page_view'?: boolean;
3333
/**
3434
* The title of the page.
35-
* See https://developers.google.com/analytics/devguides/collection/gtagjs/pages
35+
* See {@link https://developers.google.com/analytics/devguides/collection/ga4/page-view | Page views }
3636
*/
3737
'page_title'?: string;
38-
/**
39-
* The path to the page. If overridden, this value must start with a / character.
40-
* See https://developers.google.com/analytics/devguides/collection/gtagjs/pages
41-
*/
42-
'page_path'?: string;
4338
/**
4439
* The URL of the page.
45-
* See https://developers.google.com/analytics/devguides/collection/gtagjs/pages
40+
* See {@link https://developers.google.com/analytics/devguides/collection/ga4/page-view | Page views }
4641
*/
4742
'page_location'?: string;
4843
/**
4944
* Defaults to `auto`.
50-
* See https://developers.google.com/analytics/devguides/collection/gtagjs/cookies-user-id
45+
* See {@link https://developers.google.com/analytics/devguides/collection/ga4/cookies-user-id | Cookies and user identification }
5146
*/
5247
'cookie_domain'?: string;
5348
/**
5449
* Defaults to 63072000 (two years, in seconds).
55-
* See https://developers.google.com/analytics/devguides/collection/gtagjs/cookies-user-id
50+
* See {@link https://developers.google.com/analytics/devguides/collection/ga4/cookies-user-id | Cookies and user identification }
5651
*/
5752
'cookie_expires'?: number;
5853
/**
5954
* Defaults to `_ga`.
60-
* See https://developers.google.com/analytics/devguides/collection/gtagjs/cookies-user-id
55+
* See {@link https://developers.google.com/analytics/devguides/collection/ga4/cookies-user-id | Cookies and user identification }
6156
*/
6257
'cookie_prefix'?: string;
6358
/**
6459
* If set to true, will update cookies on each page load.
6560
* Defaults to true.
66-
* See https://developers.google.com/analytics/devguides/collection/gtagjs/cookies-user-id
61+
* See {@link https://developers.google.com/analytics/devguides/collection/ga4/cookies-user-id | Cookies and user identification }
6762
*/
6863
'cookie_update'?: boolean;
6964
/**
7065
* Appends additional flags to the cookie when set.
71-
* See https://developers.google.com/analytics/devguides/collection/gtagjs/cookies-user-id
66+
* See {@link https://developers.google.com/analytics/devguides/collection/ga4/cookies-user-id | Cookies and user identification }
7267
*/
7368
'cookie_flags'?: string;
7469
/**
7570
* If set to false, disables all advertising features with gtag.js.
76-
* See https://developers.google.com/analytics/devguides/collection/gtagjs/display-features
71+
* See {@link https://developers.google.com/analytics/devguides/collection/ga4/display-features | Disable advertising features }
7772
*/
7873
'allow_google_signals?': boolean;
7974
/**
8075
* If set to false, disables all advertising personalization with gtag.js.
81-
* See https://developers.google.com/analytics/devguides/collection/gtagjs/display-features
76+
* See {@link https://developers.google.com/analytics/devguides/collection/ga4/display-features | Disable advertising features }
8277
*/
8378
'allow_ad_personalization_signals'?: boolean;
84-
/**
85-
* See https://developers.google.com/analytics/devguides/collection/gtagjs/enhanced-link-attribution
86-
*/
87-
'link_attribution'?: boolean;
88-
/**
89-
* If set to true, anonymizes IP addresses for all events.
90-
* See https://developers.google.com/analytics/devguides/collection/gtagjs/ip-anonymization
91-
*/
92-
'anonymize_ip'?: boolean;
93-
/**
94-
* Custom dimensions and metrics.
95-
* See https://developers.google.com/analytics/devguides/collection/gtagjs/custom-dims-mets
96-
*/
97-
'custom_map'?: { [key: string]: unknown };
9879
[key: string]: unknown;
9980
}
10081

@@ -246,8 +227,8 @@ export interface Promotion {
246227
/**
247228
* Standard gtag.js control parameters.
248229
* For more information, see
249-
* {@link https://developers.google.com/gtagjs/reference/parameter
250-
* | the gtag.js documentation on parameters}.
230+
* {@link https://developers.google.com/gtagjs/reference/ga4-events
231+
* the GA4 reference documentation}.
251232
* @public
252233
*/
253234
export interface ControlParams {
@@ -260,14 +241,14 @@ export interface ControlParams {
260241
/**
261242
* Standard gtag.js event parameters.
262243
* For more information, see
263-
* {@link https://developers.google.com/gtagjs/reference/parameter
264-
* | the gtag.js documentation on parameters}.
244+
* {@link https://developers.google.com/gtagjs/reference/ga4-events
245+
* the GA4 reference documentation}.
265246
* @public
266247
*/
267248
export interface EventParams {
268249
checkout_option?: string;
269250
checkout_step?: number;
270-
content_id?: string;
251+
item_id?: string;
271252
content_type?: string;
272253
coupon?: string;
273254
currency?: string;

0 commit comments

Comments
 (0)