I’m trying to setup Google Analytics on my app. I can see when user open the app, but the events isn’t working.
This is my code:
ionViewDidLoad() {
this.ga.startTrackerWithId('UA-XXXXX-X')
.then(() => {
console.log('Google analytics is ready now');
this.ga.trackView('My Page');
this.ga.setAllowIDFACollection(true);
})
.catch(e => console.log('Error starting GoogleAnalytics', e));
}
goToPage() {
this.ga.trackEvent('Navigate', 'PageView', 'Info')
.then(() => {
console.log('Track Event ok');
})
.....
}
I’m receiving the log “Track Event ok” but I can’t see the event on Google Analytics Console.
Did I forget something?
Thanks!