-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
9 additions
and
8 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
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 | ||
} |