Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ SASS_PATH=node_modules
#DO NOT CHANGE NOR REMOVE THE ABOVE
GENERATE_SOURCEMAP= false

REACT_APP_GTM_ID=GTM-5LNXMB3
REACT_APP_PROD_GTM_ID=GTM-5LNXMB3
REACT_APP_DEV_GTM_ID=GTM-5XRKNQ2

REACT_APP_MONGODB_PORT=27788
REACT_APP_MONGODB_DB_NAME=eosio_nodeos_mongodb_plugin
Expand Down
16 changes: 12 additions & 4 deletions src/app/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,22 @@ import { connectStart } from 'reducers/endpoint';
import { pollingStart as headblock_pollingStart} from 'reducers/headblock';
import { pollingStart as lastblockinfo_pollingStart } from 'reducers/lastblockinfo';

const tagManagerArgs = {
gtmId: process.env.REACT_APP_GTM_ID
const prodTagManagerArgs = {
gtmId: process.env.REACT_APP_PROD_GTM_ID
}

class App extends Component {
const devTagManagerArgs = {
gtmId: process.env.REACT_APP_DEV_GTM_ID
}

class App extends Component {
componentWillMount() {
TagManager.initialize(tagManagerArgs);
if(process.env.NODE_ENV === "development" ) {
TagManager.initialize(devTagManagerArgs);
}
else {
TagManager.initialize(prodTagManagerArgs);
}
}

componentDidMount(){
Expand Down