Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public async componentWillMount() {
// Do this here because we need to have initialized Arc first
// we initialize Arc
initializeArc()
.then(async () => {
this.setState({ arcIsInitialized: true });
persistStore(store);
})
.catch ((err) => {
console.log(err);
});
let GOOGLE_ANALYTICS_ID: string;
switch (process.env.NODE_ENV) {
case "production": {
// the "real" id
GOOGLE_ANALYTICS_ID = "UA-142546205-1";
break;
}
public async componentWillMount() {
// Do this here because we need to have initialized Arc first
// we initialize Arc
initializeArc()
.then(async () => {
this.setState({ arcIsInitialized: true });
persistStore(store);
})
.catch ((err) => {
console.log(err);
});
ReactGA.initialize("UA-142546205-2");
history.listen((location: any) => {
ReactGA.pageview(location.pathname + location.search);
});
}