Ionic.io analytics with Ionic2


#1

Hi,

I’m trying to make the ionic.io analytics work with ionic2 but so far not working, although I feel I’m almost there. I was able to install the ionic-platform-web-client (Push notifications with Ionic2), start the analytics and log some events. I used this code:

Ionic.IO();
this.analytics = new Ionic.Analytics();
this.analytics.track('Login', {});

From the console I can read the following events:

Ionic Analytics: enqueuing event to send later
Ionic Analytics: Login
Ionic Analytics: Object {_user: Object, _app: Object}
... (30 seconds later)
Ionic Analytics: sent events
Ionic Analytics: Object {Login: Array[1]}

But when I go to the ionic.io dashboard I keep getting Looks like you haven't sent any data.. Apparently everything is being sent from the ionic2 app, but why is it not showing in the dashboard? Any ideas?

Thank you!


#2

Maybe someone experienced a similar problem?


#3

i’m using a cordova plugin to analytics, works fine

and u can use like that

platform.ready().then(() => {
window.analytics.startTrackerWithId('UA-XXXX-YY')
});

#4

@fefelegal did you manage to figure this out? No one form Ionic.io seems to be responding to this issue.