Commit c2c58d4
authored
##### Description of Change
The gtag.js library expects `Arguments` objects in the `dataLayer`, not
arrays. Our implementation used rest params (`...args`) which pushed
arrays — gtag loaded but never sent data to Google.
Fix: switch to the canonical `function() { dataLayer.push(arguments); }`
pattern that Google's own snippet uses.
**Before:** gtag.js loaded (200 OK), zero `/g/collect` requests sent
**After:** gtag.js loaded, collection requests sent to Google Analytics
##### Related Issues
Follow-up fix for the GA4 instrumentation in #875
##### Type of Change
- [x] Bug fix (non-breaking change which fixes an issue)
##### Project Area(s) Affected
- [x] frontends/
##### Testing
- [x] Manual testing performed (Playwright verified `/g/collect`
requests)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
2 files changed
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
0 commit comments