[#3732] Added some more mixpanel events

Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
This commit is contained in:
Julien Eluard 2018-06-05 16:14:57 +02:00
parent 608c64e88d
commit d13c9cb677
No known key found for this signature in database
GPG Key ID: 6FD7DB5437FCBEF6
3 changed files with 23 additions and 11 deletions

View File

@ -2,7 +2,6 @@
(:require-macros [status-im.utils.views :as views])
(:require [re-frame.core :as re-frame]
[status-im.i18n :as i18n]
[status-im.utils.config :as config]
[status-im.ui.components.action-button.action-button :as action-button]
[status-im.ui.components.action-button.styles :as action-button.styles]
[status-im.ui.components.colors :as colors]
@ -11,9 +10,11 @@
[status-im.ui.components.react :as react]
[status-im.ui.components.styles :as styles]
[status-im.ui.components.status-bar.view :as status-bar]
[status-im.ui.components.toolbar.view :as toolbar]))
[status-im.ui.components.toolbar.view :as toolbar]
[status-im.utils.config :as config]
[status-im.utils.mixpanel :as mixpanel]))
(defn- options-list [{:keys [address]}]
(defn- options-list [{:keys [address anon-id]}]
[react/view action-button.styles/actions-list
[action-button/action-button
{:label (i18n/label :t/start-new-chat)
@ -50,12 +51,14 @@
:accessibility-label :invite-friends-button
:icon :icons/share
:icon-opts {:color colors/blue}
:on-press #(list-selection/open-share {:message (i18n/label :t/get-status-at {:address address})})}]])
:on-press #(do (mixpanel/track anon-id "Tap" {:target :invite-friends} false)
(list-selection/open-share {:message (i18n/label :t/get-status-at {:address address})}))}]])
(views/defview add-new []
(views/letsubs [account [:get-current-account]]
(views/letsubs [account [:get-current-account]
device-UUID [:get-device-UUID]]
[react/view {:flex 1 :background-color :white}
[status-bar/status-bar]
[toolbar/simple-toolbar (i18n/label :t/new)]
[common/separator]
[options-list account]]))
[options-list (assoc account :anon-id device-UUID)]]))

View File

@ -13,3 +13,7 @@
:get-app-version
(fn [{:keys [web3-node-version]}]
(str build/version " (" build/build-no ")\nnode " (or web3-node-version "N/A") "")))
(reg-sub :get-device-UUID
(fn [db]
(:device-UUID db)))

View File

@ -25,11 +25,13 @@
; Push notification settings
{:label "Granted push notifications"
:trigger [:request-notifications-granted]}
{:label "Tap"
:trigger [:request-notifications-granted]
:properties {:target :granted-push-notifications}}
{:label "Denied push notifications"
:trigger [:request-notifications-denied]}
{:label "Tap"
:trigger [:request-notifications-denied]
:properties {:target :denied-push-notifications}}
;; Tab navigation
@ -51,7 +53,7 @@
;; New
{:label "Tap"
:trigger [:navigate-to-tab :new]
:trigger [:navigate-to :new]
:properties {:target :new}}
{:label "Tap"
:trigger [:navigate-to :new-chat]
@ -136,6 +138,9 @@
{:label "Tap"
:trigger [:wallet/sign-transaction]
:properties {:target :wallet-sign-transaction}}
{:label "Tap"
:trigger [:wallet/sign-transaction-modal]
:properties {:target :dapp-sign-transaction}}
{:label "Tap"
:trigger [:navigate-to-clean :wallet]
:properties {:target :wallet-got-it}}