-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #542 from ensdomains/dev
IPFS support and fix GA
- Loading branch information
Showing
5 changed files
with
52 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"env": { | ||
"ROOT": "http://localhost:3000/#", | ||
"TEST": "http://localhost:3000/#/Test", | ||
"NAME_ROOT": "http://localhost:3000/#/name" | ||
}, | ||
"projectId": "rzedru" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
import ReactGA from 'react-ga'; | ||
import ReactGA from 'react-ga' | ||
const TrackingID = 'UA-138903307-1' | ||
|
||
function isProduction(){ | ||
return window.location.host === 'manager.ens.domains' | ||
function isProduction() { | ||
return window.location.host === 'app.ens.domains' | ||
} | ||
|
||
export const setup = () => { | ||
if(isProduction()){ | ||
ReactGA.initialize(TrackingID); | ||
if (isProduction()) { | ||
ReactGA.initialize(TrackingID) | ||
} | ||
} | ||
|
||
export const pageview = () => { | ||
const page = window.location.pathname + window.location.search | ||
if(isProduction()){ | ||
ReactGA.pageview(page); | ||
if (isProduction()) { | ||
ReactGA.pageview(page) | ||
} | ||
} | ||
|
||
export default { | ||
setup, pageview | ||
setup, | ||
pageview | ||
} |