maxandriani / ngx-google-analytics

An easy way to use and configure Google Analytics on Angular 6+ applications
MIT License
120 stars 49 forks source link

Debug mode of Google Analytics #93

Open simplis-jourdan opened 2 years ago

simplis-jourdan commented 2 years ago

Hi,

Is there a way to configure the debug mode of Google Analytics with NgxGoogleAnalytics? To be clear, I'm talking about this: https://support.google.com/analytics/answer/7201382?hl=en&utm_id=ad

Thank you Best,

Jourdan

Chernetcov commented 2 months ago

You can run config command in initialization.

NgxGoogleAnalyticsModule.forRoot('trackingCode', [{command: 'config', values: ['trackingCode', {debug_mode: true}]}])

will be similar to

gtag('config', 'G-12345ABCDE', { 'debug_mode':true });