Skip to content

Instantly share code, notes, and snippets.

@miminari
Created Nov 28, 2020
Embed
What would you like to do?
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