Skip to content

Instantly share code, notes, and snippets.

Created Nov 28, 2020
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 (
<Component {...pageProps} />
export default MyApp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment