Created
September 20, 2019 15:03
-
-
Save abedzantout/4ea1598a078e70d1dd456185ec076d4b to your computer and use it in GitHub Desktop.
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 App from 'next/app'; | |
| import React from 'react'; | |
| import Router from 'next/router'; | |
| import {trackPageView} from '../core/gtag'; | |
| Router.events.on('routeChangeComplete', url => trackPageView(url)); | |
| class MyApp extends App { | |
| render() { | |
| const {Component, pageProps} = this.props; | |
| return ( | |
| <React.Fragment> | |
| <Component {...pageProps} /> | |
| </React.Fragment> | |
| ); | |
| } | |
| } | |
| export default MyApp; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment