11import React from 'react' ;
2- import { Switch , Route , Redirect , withRouter } from 'react-router-dom' ;
2+ import { Redirect , Route , Switch , withRouter } from 'react-router-dom' ;
33import { ROUTES } from './routes-config' ;
44// PAGES
55import Root from './containers/Root' ;
@@ -35,6 +35,7 @@ import WalletUtxoPage from './containers/wallet/WalletUtxoPage';
3535import VotingRegistrationPage from './containers/voting/VotingRegistrationPage' ;
3636import { IS_STAKING_INFO_PAGE_AVAILABLE } from './config/stakingConfig' ;
3737import AnalyticsConsentPage from './containers/profile/AnalyticsConsentPage' ;
38+ import TrackedRoute from './analytics/TrackedRoute' ;
3839
3940export const Routes = withRouter ( ( ) => (
4041 < Route path = { ROUTES . ROOT } >
@@ -54,37 +55,58 @@ export const Routes = withRouter(() => (
5455 path = { ROUTES . PROFILE . ANALYTICS }
5556 component = { AnalyticsConsentPage }
5657 />
57- < Route
58+ < TrackedRoute
59+ pageTitle = "Data Layer Migration Page"
5860 path = { ROUTES . PROFILE . DATA_LAYER_MIGRATION }
5961 component = { DataLayerMigrationPage }
6062 />
61- < Route path = { ROUTES . WALLETS . ADD } component = { WalletAddPage } />
63+ < TrackedRoute
64+ pageTitle = "Add Wallet"
65+ path = { ROUTES . WALLETS . ADD }
66+ component = { WalletAddPage }
67+ />
6268 < Route path = { ROUTES . WALLETS . ROOT } >
6369 < Wallet >
6470 < Route
6571 exact
6672 path = { ROUTES . WALLETS . ROOT }
6773 component = { ( ) => < Redirect to = { ROUTES . WALLETS . SUMMARY } /> }
6874 />
69- < Route
75+ < TrackedRoute
76+ pageTitle = "Wallet Summary"
7077 path = { ROUTES . WALLETS . SUMMARY }
7178 component = { WalletSummaryPage }
7279 />
73- < Route path = { ROUTES . WALLETS . SEND } component = { WalletSendPage } />
74- < Route
80+ < TrackedRoute
81+ pageTitle = "Send Screen"
82+ path = { ROUTES . WALLETS . SEND }
83+ component = { WalletSendPage }
84+ />
85+ < TrackedRoute
86+ pageTitle = "Receive Screen"
7587 path = { ROUTES . WALLETS . RECEIVE }
7688 component = { WalletReceivePage }
7789 />
78- < Route path = { ROUTES . WALLETS . TOKENS } component = { WalletTokensPage } />
79- < Route
90+ < TrackedRoute
91+ pageTitle = "Tokens"
92+ path = { ROUTES . WALLETS . TOKENS }
93+ component = { WalletTokensPage }
94+ />
95+ < TrackedRoute
96+ pageTitle = "Transactions"
8097 path = { ROUTES . WALLETS . TRANSACTIONS }
8198 component = { WalletTransactionsPage }
8299 />
83- < Route
100+ < TrackedRoute
101+ pageTitle = "Wallet Settings"
84102 path = { ROUTES . WALLETS . SETTINGS }
85103 component = { WalletSettingsPage }
86104 />
87- < Route path = { ROUTES . WALLETS . UTXO } component = { WalletUtxoPage } />
105+ < TrackedRoute
106+ pageTitle = "Wallet UTxO distribution"
107+ path = { ROUTES . WALLETS . UTXO }
108+ component = { WalletUtxoPage }
109+ />
88110 </ Wallet >
89111 </ Route >
90112 < Route path = { ROUTES . SETTINGS . ROOT } >
@@ -94,31 +116,38 @@ export const Routes = withRouter(() => (
94116 path = { ROUTES . SETTINGS . ROOT }
95117 component = { ( ) => < Redirect to = { ROUTES . SETTINGS . GENERAL } /> }
96118 />
97- < Route
119+ < TrackedRoute
120+ pageTitle = "General Settings"
98121 path = { ROUTES . SETTINGS . GENERAL }
99122 component = { GeneralSettingsPage }
100123 />
101- < Route
124+ < TrackedRoute
125+ pageTitle = "Wallets Settings"
102126 path = { ROUTES . SETTINGS . WALLETS }
103127 component = { WalletsSettingsPage }
104128 />
105- < Route
129+ < TrackedRoute
130+ pageTitle = "Stake Pools Settings"
106131 path = { ROUTES . SETTINGS . STAKE_POOLS }
107132 component = { StakePoolsSettingsPage }
108133 />
109- < Route
134+ < TrackedRoute
135+ pageTitle = "Terms of Use"
110136 path = { ROUTES . SETTINGS . TERMS_OF_USE }
111137 component = { TermsOfUseSettingsPage }
112138 />
113- < Route
139+ < TrackedRoute
140+ pageTitle = "Support"
114141 path = { ROUTES . SETTINGS . SUPPORT }
115142 component = { SupportSettingsPage }
116143 />
117- < Route
144+ < TrackedRoute
145+ pageTitle = "Display Settings"
118146 path = { ROUTES . SETTINGS . DISPLAY }
119147 component = { DisplaySettingsPage }
120148 />
121- < Route
149+ < TrackedRoute
150+ pageTitle = "Security Settings"
122151 path = { ROUTES . SETTINGS . SECURITY }
123152 component = { SecuritySettingsPage }
124153 />
@@ -137,33 +166,47 @@ export const Routes = withRouter(() => (
137166 < Redirect to = { ROUTES . STAKING . DELEGATION_CENTER } />
138167 ) }
139168 />
140- < Route
169+ < TrackedRoute
170+ pageTitle = "Staking Countdown"
141171 path = { ROUTES . STAKING . COUNTDOWN }
142172 component = { StakingCountdownPage }
143173 />
144- < Route
174+ < TrackedRoute
175+ pageTitle = "Delegation Center"
145176 path = { ROUTES . STAKING . DELEGATION_CENTER }
146177 component = { DelegationCenterPage }
147178 />
148- < Route
179+ < TrackedRoute
180+ pageTitle = "Stake Pools List"
149181 path = { ROUTES . STAKING . STAKE_POOLS }
150182 component = { StakePoolsListPage }
151183 />
152- < Route
184+ < TrackedRoute
185+ pageTitle = "Staking Rewards"
153186 path = { ROUTES . STAKING . REWARDS }
154187 component = { StakingRewardsPage }
155188 />
156- < Route path = { ROUTES . STAKING . EPOCHS } component = { StakingEpochsPage } />
189+ < TrackedRoute
190+ pageTitle = "Staking Epochs"
191+ path = { ROUTES . STAKING . EPOCHS }
192+ component = { StakingEpochsPage }
193+ />
157194 { IS_STAKING_INFO_PAGE_AVAILABLE && (
158- < Route path = { ROUTES . STAKING . INFO } component = { StakingInfoPage } />
195+ < TrackedRoute
196+ pageTitle = "Staking info"
197+ path = { ROUTES . STAKING . INFO }
198+ component = { StakingInfoPage }
199+ />
159200 ) }
160201 </ Staking >
161- < Route
202+ < TrackedRoute
203+ pageTitle = "Redeem ITN rewards"
162204 path = { ROUTES . REDEEM_ITN_REWARDS }
163205 component = { RedeemItnRewardsContainer }
164206 />
165207 </ Route >
166- < Route
208+ < TrackedRoute
209+ pageTitle = "Voting Registration"
167210 path = { ROUTES . VOTING . REGISTRATION }
168211 component = { VotingRegistrationPage }
169212 />
0 commit comments