Skip to content

Fix links and update event typings #5206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading