Hi,
I have problem that trackingId removed when run production mode.
application info
- angular v6.0.6
- angular-gtag v1.0.3
set Import
# environment.prod.ts
{
.
.
GA_ID : process.env.GA_ID,
.
.
}
# app.module.ts
GtagModule.forRoot({ trackingId: environment.GA_ID, trackPageviews: true})
development mode
// in app.comonent.ts
console.log(Gtag)
> Gtag {router: Router, mergedConfig: {…}}
mergedConfig: {
trackPageview: true, trackingId: "UA-122xxx040-2"
production mode
// in app.comonent.ts
console.log(Gtag)
> Gtag {router: Router, mergedConfig: {…}}
mergedConfig: {
trackPageview: true, trackingId: null
Hi,
I have problem that trackingId removed when run production mode.
application info
set Import
development mode
production mode