458 - Add Statistic

This commit is contained in:
Jean-Baptiste Dominguez 2018-07-13 17:19:31 +09:00
commit 8abaf184aa
7 changed files with 59 additions and 1 deletions

View file

@ -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');
}