458 - Add Statistic
This commit is contained in:
parent
4e1ddfe883
commit
8abaf184aa
7 changed files with 59 additions and 1 deletions
|
|
@ -35,6 +35,16 @@ angular.module('copayApp.controllers').controller('addressbookAddController', fu
|
|||
var translated = bitcoinCashJsService.readAddress(addressbook.address);
|
||||
addressbook.address = translated.legacy;
|
||||
}
|
||||
|
||||
var channel = "firebase";
|
||||
if (platformInfo.isNW) {
|
||||
channel = "ga";
|
||||
}
|
||||
var log = new window.BitAnalytics.LogEvent("contact_created", [{
|
||||
"coin": $scope.addressbookEntry.coin
|
||||
}], [channel]);
|
||||
window.BitAnalytics.LogEventHandlers.postEvent(log);
|
||||
|
||||
$timeout(function() {
|
||||
addressbookService.add(addressbook, function(err, ab) {
|
||||
if (err) {
|
||||
|
|
|
|||
|
|
@ -643,6 +643,19 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
soundService.play('misc/payment_sent.mp3');
|
||||
}
|
||||
|
||||
var channel = "firebase";
|
||||
if (platformInfo.isNW) {
|
||||
channel = "ga";
|
||||
}
|
||||
var log = new window.BitAnalytics.LogEvent("transfer_success", [{
|
||||
"coin": $scope.wallet.coin,
|
||||
"type": "outgoing",
|
||||
"amount": $scope.amount,
|
||||
"fees": $scope.fee
|
||||
}], [channel, "adjust"]);
|
||||
window.BitAnalytics.LogEventHandlers.postEvent(log);
|
||||
|
||||
// Should be removed
|
||||
firebaseEventsService.logEvent('sent_bitcoin', { coin: $scope.wallet.coin });
|
||||
$timeout(function() {
|
||||
$scope.$digest();
|
||||
|
|
|
|||
|
|
@ -75,6 +75,15 @@ angular.module('copayApp.controllers').controller('preferencesNotificationsContr
|
|||
};
|
||||
|
||||
emailService.updateEmail(opts);
|
||||
|
||||
var channel = "firebase";
|
||||
if (platformInfo.isNW) {
|
||||
channel = "ga";
|
||||
}
|
||||
var log = new window.BitAnalytics.LogEvent("settings_email_notification_toggle", [{
|
||||
"toggle": $scope.emailNotifications.value
|
||||
}], [channel]);
|
||||
window.BitAnalytics.LogEventHandlers.postEvent(log);
|
||||
};
|
||||
|
||||
$scope.soundNotificationsChange = function() {
|
||||
|
|
|
|||
|
|
@ -143,6 +143,16 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
|||
}
|
||||
$scope.paymentReceivedCoin = $scope.wallet.coin;
|
||||
|
||||
var channel = "firebase";
|
||||
if (platformInfo.isNW) {
|
||||
channel = "ga";
|
||||
}
|
||||
var log = new window.BitAnalytics.LogEvent("transfer_success", [{
|
||||
"coin": $scope.wallet.coin,
|
||||
"type": "incoming"
|
||||
}], [channel, "adjust"]);
|
||||
window.BitAnalytics.LogEventHandlers.postEvent(log);
|
||||
|
||||
if ($state.current.name === "tabs.receive") {
|
||||
soundService.play('misc/payment_received.mp3');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,13 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
$scope.isAndroid = platformInfo.isAndroid;
|
||||
$scope.isIOS = platformInfo.isIOS;
|
||||
|
||||
var channel = "firebase";
|
||||
if (platformInfo.isNW) {
|
||||
channel = "ga";
|
||||
}
|
||||
var log = new window.BitAnalytics.LogEvent("wallet_details_open", [], [channel]);
|
||||
window.BitAnalytics.LogEventHandlers.postEvent(log);
|
||||
|
||||
$scope.amountIsCollapsible = !$scope.isAndroid;
|
||||
|
||||
$scope.openExternalLink = function(url, target) {
|
||||
|
|
|
|||
|
|
@ -1232,7 +1232,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
}
|
||||
});
|
||||
|
||||
var channel = "ga";
|
||||
var channel = "firebase";
|
||||
if (platformInfo.isNW) {
|
||||
channel = "ga";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -427,6 +427,15 @@ angular.module('copayApp.services')
|
|||
}, function(err, secret) {
|
||||
if (err) return bwcError.cb(err, gettextCatalog.getString('Error creating wallet'), cb);
|
||||
|
||||
var channel = "firebase";
|
||||
if (platformInfo.isNW) {
|
||||
channel = "ga";
|
||||
}
|
||||
var log = new window.BitAnalytics.LogEvent("wallet_created", [{
|
||||
"coin": opts.coin
|
||||
}], [channel]);
|
||||
window.BitAnalytics.LogEventHandlers.postEvent(log);
|
||||
|
||||
return cb(null, walletClient, secret);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue