aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/util
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-28 01:50:56 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-28 01:50:56 +0800
commitbe787a0fd19a658cbf21eb90140c76779647dfbc (patch)
treee3d396c6a29ebca194b29b75886c9b9b9db43e4f /packages/instant/src/util
parentfdc4a4e5fa31d8797abf6313f4488147853ed77e (diff)
downloaddexon-sol-tools-be787a0fd19a658cbf21eb90140c76779647dfbc.tar
dexon-sol-tools-be787a0fd19a658cbf21eb90140c76779647dfbc.tar.gz
dexon-sol-tools-be787a0fd19a658cbf21eb90140c76779647dfbc.tar.bz2
dexon-sol-tools-be787a0fd19a658cbf21eb90140c76779647dfbc.tar.lz
dexon-sol-tools-be787a0fd19a658cbf21eb90140c76779647dfbc.tar.xz
dexon-sol-tools-be787a0fd19a658cbf21eb90140c76779647dfbc.tar.zst
dexon-sol-tools-be787a0fd19a658cbf21eb90140c76779647dfbc.zip
feat(instant): Add analytics events for payment dropdown
Diffstat (limited to 'packages/instant/src/util')
-rw-r--r--packages/instant/src/util/analytics.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/instant/src/util/analytics.ts b/packages/instant/src/util/analytics.ts
index cec99dd1b..1c7774b73 100644
--- a/packages/instant/src/util/analytics.ts
+++ b/packages/instant/src/util/analytics.ts
@@ -20,6 +20,9 @@ enum EventNames {
ACCOUNT_UNLOCK_REQUESTED = 'Account - Unlock Requested',
ACCOUNT_UNLOCK_DENIED = 'Account - Unlock Denied',
ACCOUNT_ADDRESS_CHANGED = 'Account - Address Changed',
+ PAYMENT_METHOD_DROPDOWN_OPENED = 'Payment Method - Dropdown Opened',
+ PAYMENT_METHOD_OPENED_ETHERSCAN = 'Payment Method - Opened Etherscan',
+ PAYMENT_METHOD_COPIED_ADDRESS = 'Payment Method - Copied Address',
}
const track = (eventName: EventNames, eventProperties: EventProperties = {}): void => {
evaluateIfEnabled(() => {
@@ -94,4 +97,7 @@ export const analytics = {
trackAccountUnlockDenied: trackingEventFnWithoutPayload(EventNames.ACCOUNT_UNLOCK_DENIED),
trackAccountAddressChanged: (address: string) =>
trackingEventFnWithPayload(EventNames.ACCOUNT_ADDRESS_CHANGED)({ address }),
+ trackPaymentMethodDropdownOpened: trackingEventFnWithoutPayload(EventNames.PAYMENT_METHOD_DROPDOWN_OPENED),
+ trackPaymentMethodOpenedEtherscan: trackingEventFnWithoutPayload(EventNames.PAYMENT_METHOD_OPENED_ETHERSCAN),
+ trackPaymentMethodCopiedAddress: trackingEventFnWithoutPayload(EventNames.PAYMENT_METHOD_COPIED_ADDRESS),
};