diff --git a/src/js/controllers/backup.js b/src/js/controllers/backup.js index 437d8f66e..a8da1225c 100644 --- a/src/js/controllers/backup.js +++ b/src/js/controllers/backup.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('backupController', - function($scope, $timeout, $log, $state, $stateParams, $ionicHistory, lodash, profileService, bwcService, walletService, ongoingProcess, popupService, gettextCatalog, $ionicModal) { + function($scope, $timeout, $log, $state, $stateParams, $ionicHistory, lodash, profileService, bwcService, walletService, ongoingProcess, popupService, gettextCatalog, $ionicModal, firebaseEventsService) { $scope.wallet = profileService.getWallet($stateParams.walletId); $scope.viewTitle = $scope.wallet.name || $scope.wallet.credentials.walletName; $scope.n = $scope.wallet.n; @@ -78,6 +78,7 @@ angular.module('copayApp.controllers').controller('backupController', $scope.setFlow(2); }) } else { + firebaseEventsService.logEvent('backed_up_wallet'); openConfirmBackupModal(); } }; diff --git a/src/js/controllers/confirm.js b/src/js/controllers/confirm.js index 286c90bf8..cb2d10ef0 100644 --- a/src/js/controllers/confirm.js +++ b/src/js/controllers/confirm.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $interval, $filter, $timeout, $ionicScrollDelegate, gettextCatalog, walletService, platformInfo, lodash, configService, $stateParams, $window, $state, $log, profileService, bitcore, bitcoreCash, txFormatService, ongoingProcess, $ionicModal, popupService, $ionicHistory, $ionicConfig, payproService, feeService, bwcError, txConfirmNotification, externalLinkService) { +angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $interval, $filter, $timeout, $ionicScrollDelegate, gettextCatalog, walletService, platformInfo, lodash, configService, $stateParams, $window, $state, $log, profileService, bitcore, bitcoreCash, txFormatService, ongoingProcess, $ionicModal, popupService, $ionicHistory, $ionicConfig, payproService, feeService, bwcError, txConfirmNotification, externalLinkService, firebaseEventsService) { var countDown = null; var CONFIRM_LIMIT_USD = 20; @@ -139,7 +139,7 @@ angular.module('copayApp.controllers').controller('confirmController', function( $ionicHistory.clearHistory(); if (!back) { var url = 'https://support.bitpay.com/hc/en-us/articles/115004671663'; - externalLinkService.open(url); + externalLinkService.open(url); } }); }); @@ -594,6 +594,7 @@ angular.module('copayApp.controllers').controller('confirmController', function( (processName == 'sendingTx' && !$scope.wallet.canSign() && !$scope.wallet.isPrivKeyExternal()) ) && !isOn) { $scope.sendStatus = 'success'; + firebaseEventsService.logEvent('sent_bitcoin'); $timeout(function() { $scope.$digest(); }, 100); diff --git a/src/js/controllers/create.js b/src/js/controllers/create.js index b11906fea..f10e1ae2e 100644 --- a/src/js/controllers/create.js +++ b/src/js/controllers/create.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('createController', - function($scope, $rootScope, $timeout, $log, lodash, $state, $ionicScrollDelegate, $ionicHistory, profileService, configService, gettextCatalog, ledger, trezor, intelTEE, derivationPathHelper, ongoingProcess, walletService, storageService, popupService, appConfigService, pushNotificationsService) { + function($scope, $rootScope, $timeout, $log, lodash, $state, $ionicScrollDelegate, $ionicHistory, profileService, configService, gettextCatalog, ledger, trezor, intelTEE, derivationPathHelper, ongoingProcess, walletService, storageService, popupService, appConfigService, pushNotificationsService, firebaseEventsService) { /* For compressed keys, m*73 + n*34 <= 496 */ var COPAYER_PAIR_LIMITS = { @@ -261,7 +261,11 @@ angular.module('copayApp.controllers').controller('createController', walletId: client.credentials.walletId }); }, 100); - } else $state.go('tabs.home'); + } + else { + firebaseEventsService.logEvent('wallet_created', { coin: opts.coin }); + $state.go('tabs.home'); + } }); }, 300); } diff --git a/src/js/controllers/onboarding/disclaimer.js b/src/js/controllers/onboarding/disclaimer.js index ab5c7774b..de4f23387 100644 --- a/src/js/controllers/onboarding/disclaimer.js +++ b/src/js/controllers/onboarding/disclaimer.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('disclaimerController', function($scope, $timeout, $state, $log, $ionicModal, $ionicConfig, profileService, uxLanguage, externalLinkService, storageService, $stateParams, startupService, $rootScope) { +angular.module('copayApp.controllers').controller('disclaimerController', function($scope, $timeout, $state, $log, $ionicModal, $ionicConfig, profileService, uxLanguage, externalLinkService, storageService, $stateParams, startupService, $rootScope, firebaseEventsService) { $scope.$on("$ionicView.afterEnter", function() { startupService.ready(); @@ -28,6 +28,7 @@ angular.module('copayApp.controllers').controller('disclaimerController', functi profileService.setDisclaimerAccepted(function(err) { if (err) $log.error(err); else { + firebaseEventsService.logEvent('completed_onboarding'); $state.go('tabs.home', { fromOnboarding: true });