Hi folks,
I'm trying to add Ionic Analytics service to my app and get the following error while trying in in the browser:
Uncaught Error: You must provide an app id and api key to identify your app before tracking analytics data.
Before that I did the following (in the folder of my app):
$ sudo npm install -g cordova ionic
$ ionic upload
$ bower install ionic-service-core --save
$ bower install ionic-service-analytics --save
While debugging the issue I've checked the following things:
- I see the app created at my account at ionic.io with app id and app
key - The same app id and app key are added to a file .io-config.json to my project
- My module contains the following new code:
angular.module('main', [ 'ionic', 'ionic.service.core', 'ionic.service.analytics', ...
I run "gulp watch" and see the error: "Uncaught Error: You must provide an app id and api key to identify your app before tracking analytics data." which leads to ionic-analytics.js. In case I remove 'ionic.service.analytics', from module pre-requisites the app works fine.
I didn't find any suggestions how to specify my app key and app id in any way in the ionic doc. It seem like it's assumed that if I did "ionic upload" correctly it should work out of box (apparently it's not).
Could somebody point me out to my problem?
Thanks,
Shamil