Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Wrong call of startTrackerWithId in ngCordova #1421

Open
daggeto opened this issue Mar 7, 2017 · 1 comment
Open

Wrong call of startTrackerWithId in ngCordova #1421

daggeto opened this issue Mar 7, 2017 · 1 comment

Comments

@daggeto
Copy link

daggeto commented Mar 7, 2017

Hi, just installed google analytics plugin and found issue with ID registration.
ngCordova.js calls analytics with id, success, error

startTrackerWithId: function (id) {
        var d = $q.defer();

        $window.analytics.startTrackerWithId(id, function (response) {
          d.resolve(response);
        }, function (error) {
          d.reject(error);
        });

        return d.promise;
      }

But google analytics have different params in this function id, dispatchPeriod, success, error:

niversalAnalyticsPlugin.prototype.startTrackerWithId = function(id, dispatchPeriod, success, error) {
  if (typeof dispatchPeriod === 'undefined' || dispatchPeriod === null) {
    dispatchPeriod = 30;
  }  
  cordova.exec(success, error, 'UniversalAnalytics', 'startTrackerWithId', [id, dispatchPeriod]);
};


Your system information:

Cordova CLI: 6.3.1
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic CLI Version: 2.1.1
Ionic App Lib Version: 2.1.1
ios-deploy version: 1.9.0
ios-sim version: 5.0.8
OS: Mac OS X Sierra
Node Version: v5.10.1
Xcode version: Xcode 8.2.1 Build version 8C1002


@daggeto daggeto changed the title Wrong call of startTrackerWithId in google analytics Wrong call of startTrackerWithId in ngCordova Mar 7, 2017
@victorsosa
Copy link

@daggeto yes you are right and there are others methods that changed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants