# ga4-event-tracking

Published articles for ga4-event-tracking.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## A One-Line JavaScript Bug Broke My GA4 Tracking for Five Months

DevFeed: [A One-Line JavaScript Bug Broke My GA4 Tracking for Five Months](<https://devfeed.tech/articles/a-one-line-javascript-bug-broke-my-ga4-tracking-for-five-months-116231.md>)

Original publisher: [Read original article](<https://hackernoon.com/a-one-line-javascript-bug-broke-my-ga4-tracking-for-five-months?source=rss>)

Author: Muhaymin Bin Mehmood

Published: 2026-11-04T09:15:03Z

Content type: tutorial

Language: en

Sources: [HackerNoon](<https://devfeed.tech/sources/hackernoon.md>)

Topics: [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>), [ESLint](<https://devfeed.tech/topics/eslint.md>)

Tags: [2](<https://devfeed.tech/tags/2.md>), [3](<https://devfeed.tech/tags/3.md>), [about](<https://devfeed.tech/tags/about.md>), [added](<https://devfeed.tech/tags/added.md>), [admin](<https://devfeed.tech/tags/admin.md>), [bug](<https://devfeed.tech/tags/bug.md>), [conversion](<https://devfeed.tech/tags/conversion.md>), [conversion-tracking](<https://devfeed.tech/tags/conversion-tracking.md>), [data](<https://devfeed.tech/tags/data.md>), [events](<https://devfeed.tech/tags/events.md>), [funnel-analysis](<https://devfeed.tech/tags/funnel-analysis.md>), [ga4](<https://devfeed.tech/tags/ga4.md>), [ga4-debugging](<https://devfeed.tech/tags/ga4-debugging.md>), [ga4-event-tracking](<https://devfeed.tech/tags/ga4-event-tracking.md>), [google-analytics](<https://devfeed.tech/tags/google-analytics.md>), [google-tag-manager](<https://devfeed.tech/tags/google-tag-manager.md>), [gtag-js](<https://devfeed.tech/tags/gtag-js.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [learn](<https://devfeed.tech/tags/learn.md>), [learn-how-to](<https://devfeed.tech/tags/learn-how-to.md>), [my](<https://devfeed.tech/tags/my.md>), [one](<https://devfeed.tech/tags/one.md>), [tracking](<https://devfeed.tech/tags/tracking.md>), [verify](<https://devfeed.tech/tags/verify.md>)

### AI overview

A GA4 wrapper silently dropped custom events because it pushed a rest-parameter array into `dataLayer`; the author reports that `gtag.js` acted on an `Arguments` object with the same values but not the array. The fix is to push `arguments` (or call `window.gtag` directly), with a test guarding the object type. To verify tracking, trigger a custom event and check its type in `dataLayer`, a `g/collect` request, and GA4 Realtime or DebugView; standard reports can lag. A separate reporting issue arose because completed events were not marked as key events in GA4 Admin. Marking them is not retroactive, so the change date matters. After both issues were corrected, the excerpt's small-site data showed most visitors left before adding a file, while nearly all who added one finished.

### Source excerpt

one-line JavaScript bug silently broke GA4 conversion tracking for five months. Learn how to detect missing events, fix gtag.js, and verify your data.