-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Fix sendGAEvent function (for real?) #62192
Conversation
@@ -54,14 +54,14 @@ export function GoogleAnalytics(props: GAParams) { | |||
) | |||
} | |||
|
|||
export const sendGAEvent = (...args: Object[]) => { | |||
export function sendGAEvent(..._args: Object[]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Converted to a function
so that arguments
would be available.
Wasn't entirely sure of any other way to turn the args
into Arguments()
instead of Array()
, so I just prefixed it with _
to have the types at least. Not sure though.
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the gtag docs it does seem to not handle Array values specifically so using arguments seems good to me
Stats from current PRDefault BuildGeneral
Client Bundles (main, webpack)
Legacy Client Bundles (polyfills)
Client Pages
Client Build Manifests
Rendered Page Sizes
Edge SSR bundle Size
Middleware size
Next Runtimes
build cache
|
The recently merged PR - #62065, doesn't seem to fix the issue. As per the comment this seems to be related to
dataLayer
that does not like working with Arrays, but works with arguments object. Also, when using window.gtag(...) an Arguments() is pushed instead of Array().Fixes #61703