Created
January 6, 2020 10:35
-
-
Save asamountain/d61256d816c96116e8d278737e5ceeba to your computer and use it in GitHub Desktop.
App.js for react-gtm-module
This file contains hidden or 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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import {Router} from 'react-router-dom'; | |
import './index.css'; | |
import App from './App'; | |
import {createBrowserHistory} from 'history'; | |
import TagManager from 'react-gtm-module' | |
const history = createBrowserHistory(); | |
const tagManagerArgs = { | |
gtmId: 'GTM-000000' | |
} | |
TagManager.initialize(tagManagerArgs); | |
const Root = document.getElementById('root') | |
ReactDOM.hydrate( | |
<Router history={history}> | |
<App/> | |
</Router>, Root); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment