Skip to content

Commit

Permalink
add google analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
backslash47 committed Apr 18, 2018
1 parent 2cbf383 commit 15b6ea4
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 19 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"react-file-reader-input": "^1.1.4",
"react-final-form": "^3.3.1",
"react-router-dom": "^4.2.2",
"react-router-ga": "^1.0.0",
"react-scripts-ts": "2.14.0",
"recompose": "^0.26.0",
"semantic-ui-css": "^2.3.1",
Expand Down
39 changes: 21 additions & 18 deletions src/app/appView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,30 @@ import CreateAccount from '~/wallet/createAccount';
import CreateClaim from '~/ontIds/createClaim';
import Transfer from '~/accounts/transfer';
import Layout from '~/layout/layoutView';
import Analytics from 'react-router-ga';

const App: React.SFC<{}> = () => (
<Router>
<Layout>
<Route path="/" exact={true} component={Home} />
<Route path="/blocks" exact={true} component={BlocksGrid} />
<Route path="/blocks/:id" exact={true} component={BlockDetail} />
<Route path="/transactions/" exact={true} component={TransactionsGrid} />
<Route path="/transactions/:id" exact={true} component={TransactionDetail} />
<Route path="/transfers/" exact={true} component={TransfersGrid} />
<Route path="/transfers/:id" exact={true} component={TransferDetail} />
<Route path="/accounts" exact={true} component={AccountsGrid} />
<Route path="/accounts/:id" exact={true} component={AccountDetail} />
<Route path="/accounts/:id/transfer" exact={true} component={Transfer} />
<Route path="/ont-ids" exact={true} component={OntIdsGrid} />
<Route path="/ont-ids/:id" exact={true} component={OntIdDetail} />
<Route path="/ont-ids/:id/create-claim" exact={true} component={CreateClaim} />
<Route path="/wallet" exact={true} component={Wallet} />
<Route path="/wallet/create" exact={true} component={CreateWallet} />
<Route path="/wallet/create-account" exact={true} component={CreateAccount} />
</Layout>
<Analytics id="UA-117874562-1">
<Layout>
<Route path="/" exact={true} component={Home} />
<Route path="/blocks" exact={true} component={BlocksGrid} />
<Route path="/blocks/:id" exact={true} component={BlockDetail} />
<Route path="/transactions/" exact={true} component={TransactionsGrid} />
<Route path="/transactions/:id" exact={true} component={TransactionDetail} />
<Route path="/transfers/" exact={true} component={TransfersGrid} />
<Route path="/transfers/:id" exact={true} component={TransferDetail} />
<Route path="/accounts" exact={true} component={AccountsGrid} />
<Route path="/accounts/:id" exact={true} component={AccountDetail} />
<Route path="/accounts/:id/transfer" exact={true} component={Transfer} />
<Route path="/ont-ids" exact={true} component={OntIdsGrid} />
<Route path="/ont-ids/:id" exact={true} component={OntIdDetail} />
<Route path="/ont-ids/:id/create-claim" exact={true} component={CreateClaim} />
<Route path="/wallet" exact={true} component={Wallet} />
<Route path="/wallet/create" exact={true} component={CreateWallet} />
<Route path="/wallet/create-account" exact={true} component={CreateAccount} />
</Layout>
</Analytics>
</Router>
);

Expand Down
1 change: 1 addition & 0 deletions src/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@

declare module "node-fetch";
declare module "html5-websocket";
declare module "react-router-ga";
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"noUnusedLocals": true
},
"include": [
"./src/index.tsx"
"./src/index.tsx",
"./src/global.d.ts"
],
"exclude": [
"node_modules",
Expand Down
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6428,6 +6428,10 @@ react-router-dom@^4.2.2:
react-router "^4.2.0"
warning "^3.0.0"

react-router-ga@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/react-router-ga/-/react-router-ga-1.0.0.tgz#2a394d2e721847340007b51af4de00b39478ccfd"

react-router@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/react-router/-/react-router-4.2.0.tgz#61f7b3e3770daeb24062dae3eedef1b054155986"
Expand Down

0 comments on commit 15b6ea4

Please sign in to comment.