next.js
e71046b6 - Fix sendGAEvent function (#62065)

Commit
2 years ago
Fix sendGAEvent function (#62065) Previous implementation of `sendGAEvent` was pushing arguments to `dataLayer` via rest parameter syntax, resulting in an actual array, which GA doesn't seem to process correctly (resulting in the event not showing up in GA reports). This PR refactors it to a vanilla JS function passing data via the `arguments` array-like object, which is able to be processed correctly and results in the event showing up as expected. fixes [61703](https://github.com/vercel/next.js/issues/61703) Co-authored-by: JJ Kasper <jj@jjsweb.site>
Author
Parents
Loading