Enable debug mode for GA
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 383
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 77
Description
## Feature Description
To monitor events in GA DebugView, you have to enable debug mode either through Tag Manager if the G-Tag is added there or by adding `debug_mode` to `gtag.js`. If you don't use GTM, the former is not an option. The latter gets added by Site Kit already. It would be helpful to have a toggle to enable this.
See: https://support.google.com/analytics/answer/7201382
All events: `gtag('config', 'G-12345ABCDE', { 'debug_mode':true });`
Some events: `gtag('event', 'xyz', { 'debug_mode':true });`
To disable debug mode, exclude the 'debug_mode' parameter; setting the parameter to false doesn't disable debug mode.
---------------
_Do not alter or remove anything below. The following sections will be managed by moderators only._
## Acceptance criteria
*
## Implementation Brief
* [ ]
### Test Coverage
*
## QA Brief
*
## Changelog entry
*
Contributor guide
Research direction
Start by tracing how Site Kit adds the existing debug_mode parameter to gtag.js and review the Google Analytics DebugView guidance linked in the issue. Determine where a user-facing toggle would belong and whether it should affect all events or only selected events. Done means the toggle reliably enables debug mode and omits the parameter when disabled, with coverage for both states.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- analytics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100