Skip to content

Commit

Permalink
Fix links and update event typings (#5206)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsubox76 committed Jul 29, 2021
1 parent 2493c17 commit bd50d83
Show file tree
Hide file tree
Showing 7 changed files with 231 additions and 269 deletions.
7 changes: 7 additions & 0 deletions .changeset/wise-forks-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@firebase/analytics-interop-types': minor
'@firebase/analytics-types': minor
'firebase': minor
---

Fix formatting of links in comments and update some event typings to correctly match GA4 specs.
109 changes: 50 additions & 59 deletions packages-exp/analytics-exp/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ export function setAnalyticsCollectionEnabled(
* app instance on this device.
* @public
* List of recommended event parameters can be found in
* {@link https://developers.google.com/gtagjs/reference/event
* | the gtag.js reference documentation}.
* {@link https://developers.google.com/gtagjs/reference/ga4-events
* | the GA4 reference documentation}.
*/
export function logEvent(
analyticsInstance: Analytics,
Expand All @@ -244,8 +244,8 @@ export function logEvent(
* app instance on this device.
* @public
* List of recommended event parameters can be found in
* {@link https://developers.google.com/gtagjs/reference/event
* | the gtag.js reference documentation}.
* {@link https://developers.google.com/gtagjs/reference/ga4-events
* | the GA4 reference documentation}.
*/
export function logEvent(
analyticsInstance: Analytics,
Expand All @@ -267,8 +267,8 @@ export function logEvent(
* app instance on this device.
* @public
* List of recommended event parameters can be found in
* {@link https://developers.google.com/gtagjs/reference/event
* | the gtag.js reference documentation}.
* {@link https://developers.google.com/gtagjs/reference/ga4-events
* | the GA4 reference documentation}.
*/
export function logEvent(
analyticsInstance: Analytics,
Expand All @@ -288,8 +288,8 @@ export function logEvent(
* app instance on this device.
* @public
* List of recommended event parameters can be found in
* {@link https://developers.google.com/gtagjs/reference/event
* | the gtag.js reference documentation}.
* {@link https://developers.google.com/gtagjs/reference/ga4-events
* | the GA4 reference documentation}.
*/
export function logEvent(
analyticsInstance: Analytics,
Expand All @@ -310,8 +310,8 @@ export function logEvent(
* app instance on this device.
* @public
* List of recommended event parameters can be found in
* {@link https://developers.google.com/gtagjs/reference/event
* | the gtag.js reference documentation}.
* {@link https://developers.google.com/gtagjs/reference/ga4-events
* | the GA4 reference documentation}.
*/
export function logEvent(
analyticsInstance: Analytics,
Expand All @@ -333,9 +333,9 @@ export function logEvent(
* automatically associates this logged event with this Firebase web
* app instance on this device.
* @public
* List of recommended event parameters can be found in
* {@link https://developers.google.com/gtagjs/reference/event
* | the gtag.js reference documentation}.
* See
* {@link https://developers.google.com/analytics/devguides/collection/ga4/exceptions
* | Measure exceptions}.
*/
export function logEvent(
analyticsInstance: Analytics,
Expand All @@ -354,16 +354,15 @@ export function logEvent(
* app instance on this device.
* @public
* List of recommended event parameters can be found in
* {@link https://developers.google.com/gtagjs/reference/event
* | the gtag.js reference documentation}.
* {@link https://developers.google.com/gtagjs/reference/ga4-events
* | the GA4 reference documentation}.
*/
export function logEvent(
analyticsInstance: Analytics,
eventName: 'generate_lead',
eventParams?: {
value?: EventParams['value'];
currency?: EventParams['currency'];
transaction_id?: EventParams['transaction_id'];
[key: string]: any;
},
options?: AnalyticsCallOptions
Expand All @@ -375,8 +374,8 @@ export function logEvent(
* app instance on this device.
* @public
* List of recommended event parameters can be found in
* {@link https://developers.google.com/gtagjs/reference/event
* | the gtag.js reference documentation}.
* {@link https://developers.google.com/gtagjs/reference/ga4-events
* | the GA4 reference documentation}.
*/
export function logEvent(
analyticsInstance: Analytics,
Expand All @@ -393,9 +392,9 @@ export function logEvent(
* automatically associates this logged event with this Firebase web
* app instance on this device.
* @public
* List of recommended event parameters can be found in
* {@link https://developers.google.com/gtagjs/reference/event
* | the gtag.js reference documentation}.
* See
* {@link https://developers.google.com/analytics/devguides/collection/ga4/page-view
* | Page views}.
*/
export function logEvent(
analyticsInstance: Analytics,
Expand All @@ -415,8 +414,8 @@ export function logEvent(
* app instance on this device.
* @public
* List of recommended event parameters can be found in
* {@link https://developers.google.com/gtagjs/reference/event
* | the gtag.js reference documentation}.
* {@link https://developers.google.com/gtagjs/reference/ga4-events
* | the GA4 reference documentation}.
*/
export function logEvent(
analyticsInstance: Analytics,
Expand All @@ -440,21 +439,15 @@ export function logEvent(
* automatically associates this logged event with this Firebase web
* app instance on this device.
* @public
* List of recommended event parameters can be found in
* {@link https://developers.google.com/gtagjs/reference/event
* | the gtag.js reference documentation}.
* See {@link https://firebase.google.com/docs/analytics/screenviews
* | Track Screenviews}.
*/
export function logEvent(
analyticsInstance: Analytics,
eventName: 'screen_view',
eventParams?: {
app_name: string;
screen_name: EventParams['screen_name'];
firebase_screen: EventParams['firebase_screen'];
firebase_screen_class: EventParams['firebase_screen_class'];
app_id?: string;
app_version?: string;
app_installer_id?: string;
[key: string]: any;
},
options?: AnalyticsCallOptions
Expand All @@ -466,8 +459,8 @@ export function logEvent(
* app instance on this device.
* @public
* List of recommended event parameters can be found in
* {@link https://developers.google.com/gtagjs/reference/event
* | the gtag.js reference documentation}.
* {@link https://developers.google.com/gtagjs/reference/ga4-events
* | the GA4 reference documentation}.
*/
export function logEvent(
analyticsInstance: Analytics,
Expand All @@ -485,17 +478,15 @@ export function logEvent(
* app instance on this device.
* @public
* List of recommended event parameters can be found in
* {@link https://developers.google.com/gtagjs/reference/event
* | the gtag.js reference documentation}.
* {@link https://developers.google.com/gtagjs/reference/ga4-events
* | the GA4 reference documentation}.
*/
export function logEvent(
analyticsInstance: Analytics,
eventName: 'select_content',
eventParams?: {
items?: EventParams['items'];
promotions?: EventParams['promotions'];
content_type?: EventParams['content_type'];
content_id?: EventParams['content_id'];
item_id?: EventParams['item_id'];
[key: string]: any;
},
options?: AnalyticsCallOptions
Expand All @@ -507,8 +498,8 @@ export function logEvent(
* app instance on this device.
* @public
* List of recommended event parameters can be found in
* {@link https://developers.google.com/gtagjs/reference/event
* | the gtag.js reference documentation}.
* {@link https://developers.google.com/gtagjs/reference/ga4-events
* | the GA4 reference documentation}.
*/
export function logEvent(
analyticsInstance: Analytics,
Expand All @@ -528,8 +519,8 @@ export function logEvent(
* app instance on this device.
* @public
* List of recommended event parameters can be found in
* {@link https://developers.google.com/gtagjs/reference/event
* | the gtag.js reference documentation}.
* {@link https://developers.google.com/gtagjs/reference/ga4-events
* | the GA4 reference documentation}.
*/
export function logEvent(
analyticsInstance: Analytics,
Expand All @@ -549,8 +540,8 @@ export function logEvent(
* app instance on this device.
* @public
* List of recommended event parameters can be found in
* {@link https://developers.google.com/gtagjs/reference/event
* | the gtag.js reference documentation}.
* {@link https://developers.google.com/gtagjs/reference/ga4-events
* | the GA4 reference documentation}.
*/
export function logEvent(
analyticsInstance: Analytics,
Expand All @@ -569,16 +560,16 @@ export function logEvent(
* app instance on this device.
* @public
* List of recommended event parameters can be found in
* {@link https://developers.google.com/gtagjs/reference/event
* | the gtag.js reference documentation}.
* {@link https://developers.google.com/gtagjs/reference/ga4-events
* | the GA4 reference documentation}.
*/
export function logEvent(
analyticsInstance: Analytics,
eventName: 'share',
eventParams?: {
method?: EventParams['method'];
content_type?: EventParams['content_type'];
content_id?: EventParams['content_id'];
item_id?: EventParams['item_id'];
[key: string]: any;
},
options?: AnalyticsCallOptions
Expand All @@ -590,8 +581,8 @@ export function logEvent(
* app instance on this device.
* @public
* List of recommended event parameters can be found in
* {@link https://developers.google.com/gtagjs/reference/event
* | the gtag.js reference documentation}.
* {@link https://developers.google.com/gtagjs/reference/ga4-events
* | the GA4 reference documentation}.
*/
export function logEvent(
analyticsInstance: Analytics,
Expand All @@ -609,8 +600,8 @@ export function logEvent(
* app instance on this device.
* @public
* List of recommended event parameters can be found in
* {@link https://developers.google.com/gtagjs/reference/event
* | the gtag.js reference documentation}.
* {@link https://developers.google.com/gtagjs/reference/ga4-events
* | the GA4 reference documentation}.
*/
export function logEvent(
analyticsInstance: Analytics,
Expand All @@ -631,8 +622,8 @@ export function logEvent(
* app instance on this device.
* @public
* List of recommended event parameters can be found in
* {@link https://developers.google.com/gtagjs/reference/event
* | the gtag.js reference documentation}.
* {@link https://developers.google.com/gtagjs/reference/ga4-events
* | the GA4 reference documentation}.
*/
export function logEvent(
analyticsInstance: Analytics,
Expand All @@ -652,8 +643,8 @@ export function logEvent(
* app instance on this device.
* @public
* List of recommended event parameters can be found in
* {@link https://developers.google.com/gtagjs/reference/event
* | the gtag.js reference documentation}.
* {@link https://developers.google.com/gtagjs/reference/ga4-events
* | the GA4 reference documentation}.
*/
export function logEvent(
analyticsInstance: Analytics,
Expand All @@ -673,8 +664,8 @@ export function logEvent(
* app instance on this device.
* @public
* List of recommended event parameters can be found in
* {@link https://developers.google.com/gtagjs/reference/event
* | the gtag.js reference documentation}.
* {@link https://developers.google.com/gtagjs/reference/ga4-events
* | the GA4 reference documentation}.
*/
export function logEvent<T extends string>(
analyticsInstance: Analytics,
Expand All @@ -689,8 +680,8 @@ export function logEvent<T extends string>(
* app instance on this device.
* List of official event parameters can be found in the gtag.js
* reference documentation:
* {@link https://developers.google.com/gtagjs/reference/event
* | the gtag.js reference documentation}.
* {@link https://developers.google.com/gtagjs/reference/ga4-events
* | the GA4 reference documentation}.
*
* @public
*/
Expand Down

0 comments on commit bd50d83

Please sign in to comment.