1
0
Fork 0
mirror of https://github.com/BlueWallet/BlueWallet.git synced 2025-03-16 12:13:07 +01:00
BlueWallet/analytics.js
Overtorment b00eadad82 REF
2018-07-12 00:06:50 +01:00

21 lines
559 B
JavaScript

import { Amplitude } from 'expo';
import { Analytics, PageHit } from 'expo-analytics';
Amplitude.initialize('8b7cf19e8eea3cdcf16340f5fbf16330');
const analytics = new Analytics('UA-121673546-1');
let A = function(event) {
console.log('posting analytics event', event);
Amplitude.logEvent(event);
analytics.hit(new PageHit(event));
// .then(() => console.log('success'))
// .catch(e => console.log(e.message));
};
A.ENUM = {
INIT: 'INIT',
GOT_NONZERO_BALANCE: 'GOT_NONZERO_BALANCE',
CREATED_WALLET: 'CREATED_WALLET',
};
module.exports = A;