diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-11-28 02:17:59 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-11-28 02:17:59 +0800 |
commit | 6e2523625f6a29bfcf58bf032d0cd3a468053247 (patch) | |
tree | a3b0169a1c17c59a499fb57f7587c6a90c143256 | |
parent | 7efa71eaf6767c9078fac5ef0122292da7419f1f (diff) | |
download | dexon-0x-contracts-6e2523625f6a29bfcf58bf032d0cd3a468053247.tar dexon-0x-contracts-6e2523625f6a29bfcf58bf032d0cd3a468053247.tar.gz dexon-0x-contracts-6e2523625f6a29bfcf58bf032d0cd3a468053247.tar.bz2 dexon-0x-contracts-6e2523625f6a29bfcf58bf032d0cd3a468053247.tar.lz dexon-0x-contracts-6e2523625f6a29bfcf58bf032d0cd3a468053247.tar.xz dexon-0x-contracts-6e2523625f6a29bfcf58bf032d0cd3a468053247.tar.zst dexon-0x-contracts-6e2523625f6a29bfcf58bf032d0cd3a468053247.zip |
feat(instant): change event properties to ms times instead of unix timestamps
-rw-r--r-- | packages/instant/src/util/analytics.ts | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/packages/instant/src/util/analytics.ts b/packages/instant/src/util/analytics.ts index d45d37b3b..c2fe7b0e7 100644 --- a/packages/instant/src/util/analytics.ts +++ b/packages/instant/src/util/analytics.ts @@ -133,23 +133,20 @@ export const analytics = { trackingEventFnWithPayload(EventNames.BUY_TX_SUBMITTED)({ ...buyQuoteEventProperties(buyQuote), txHash, - startTimeUnix, - expectedEndTimeUnix, + expectedTxTimeMs: expectedEndTimeUnix - startTimeUnix, }), trackBuyTxSucceeded: (buyQuote: BuyQuote, txHash: string, startTimeUnix: number, expectedEndTimeUnix: number) => trackingEventFnWithPayload(EventNames.BUY_TX_SUCCEEDED)({ ...buyQuoteEventProperties(buyQuote), txHash, - startTimeUnix, - expectedEndTimeUnix, - actualEndTimeUnix: new Date().getTime(), + expectedTxTimeMs: expectedEndTimeUnix - startTimeUnix, + actualTxTimeMs: new Date().getTime() - startTimeUnix, }), trackBuyTxFailed: (buyQuote: BuyQuote, txHash: string, startTimeUnix: number, expectedEndTimeUnix: number) => trackingEventFnWithPayload(EventNames.BUY_TX_FAILED)({ ...buyQuoteEventProperties(buyQuote), txHash, - startTimeUnix, - expectedEndTimeUnix, - actualEndTimeUnix: new Date().getTime(), + expectedTxTimeMs: expectedEndTimeUnix - startTimeUnix, + actualTxTimeMs: new Date().getTime() - startTimeUnix, }), }; |