Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

Ionic Analytics - failed to include into app

$
0
0

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:

  1. I see the app created at my account at ionic.io with app id and app
    key
  2. The same app id and app key are added to a file .io-config.json to my project
  3. 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


Viewing all articles
Browse latest Browse all 228595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>