Skip to content

Instantly share code, notes, and snippets.

@miminari
Created November 28, 2020 06:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miminari/e165b849d5443e2c02a829caa3435a7b to your computer and use it in GitHub Desktop.
Save miminari/e165b849d5443e2c02a829caa3435a7b to your computer and use it in GitHub Desktop.
import App, { Container } from 'next/app'
import TagManager from 'react-gtm-module'
import '../styles/globals.css'
import '../store'
class MyApp extends App {
componentDidMount() {
TagManager.initialize({ gtmId: 'GTM-XXXXXXX' })
}
render() {
const { Component, pageProps } = this.props
return (
<Container>
<Component {...pageProps} />
</Container>
)
}
}
export default MyApp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment