diff options
Diffstat (limited to 'packages/website/ts/index.tsx')
-rw-r--r-- | packages/website/ts/index.tsx | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/packages/website/ts/index.tsx b/packages/website/ts/index.tsx index 1eaf6274b..d974d7511 100644 --- a/packages/website/ts/index.tsx +++ b/packages/website/ts/index.tsx @@ -2,7 +2,6 @@ import { MuiThemeProvider } from 'material-ui/styles'; import * as React from 'react'; import { render } from 'react-dom'; -import * as ReactGA from 'react-ga'; import { Provider } from 'react-redux'; import { BrowserRouter as Router, Redirect, Route, Switch } from 'react-router-dom'; import * as injectTapEventPlugin from 'react-tap-event-plugin'; @@ -17,9 +16,9 @@ import { trackedTokenStorage } from 'ts/local_storage/tracked_token_storage'; import { tradeHistoryStorage } from 'ts/local_storage/trade_history_storage'; import { reducer, State } from 'ts/redux/reducer'; import { WebsitePaths } from 'ts/types'; +import { analytics } from 'ts/utils/analytics'; import { muiTheme } from 'ts/utils/mui_theme'; import { utils } from 'ts/utils/utils'; -import * as Web3 from 'web3'; import 'whatwg-fetch'; injectTapEventPlugin(); @@ -47,13 +46,8 @@ const LazyConnectDocumentation = createLazyComponent('Documentation', async () = System.import<any>(/* webpackChunkName: "connectDocs" */ 'ts/containers/connect_documentation'), ); -ReactGA.initialize('UA-98720122-1'); -window.onload = () => { - const providerName = (window as any).web3 - ? utils.web3ProviderToString((window as any).web3.currentProvider) - : 'NONE'; - ReactGA.ga('set', 'dimension1', providerName); -}; +analytics.init(); +analytics.logProviderAsync((window as any).web3); const store: ReduxStore<State> = createStore(reducer); render( <Router> |