Add next-ga for Google Analytics

This commit is contained in:
Aarni Koskela
2019-09-23 16:21:58 +03:00
parent a671acdf06
commit ed0826a53a
3 changed files with 14 additions and 1 deletions

View File

@@ -1,4 +1,3 @@
* Google Analytics (ID `UA-58806132-1`)
* Stripe
* Test ID `pk_test_OmNve9H1OuORlmD4rblpjgzh`
* Prod ID `pk_live_xrnwdLNXbt20LMxpIDffJnnC`

View File

@@ -23,6 +23,7 @@
"lodash": "^3.9.1",
"next": "^9.0.6",
"next-fonts": "^0.18.0",
"next-ga": "^2.3.4",
"parse-github-event": "^0.2.0",
"prop-types": "^15.5.10",
"react": "^16.9.0",

13
pages/_app.jsx Normal file
View File

@@ -0,0 +1,13 @@
import React from "react";
import App from "next/app";
import Router from "next/router";
import withGA from "next-ga";
class MyApp extends App {
render() {
const { Component, pageProps } = this.props;
return <Component {...pageProps} />;
}
}
export default withGA("UA-58806132-1", Router)(MyApp);