In this tutorial, we will show you how to get started with Google Analytics in your NextJS project. To achieve this goal, we will add our own custom _document to inject our tracking snippet and track page views and events. A quick guide to setting up user tracking with NextJS. Using NextJS with Google Analytics and TypeScript
Google Analytics is an incredibly popular free tool used to track users, browsers and devices. NextJS is the best way to create React projects in 2020. So let’s put the two together and make something.
Today we will show you how to get started with Google Analytics in your NextJS project. To achieve this goal, we will add our own custom
_document to inject our tracking snippet and track page views and events.
First, let’s start by bootstrapping a new NextJS app with
npx create-next-app. Run the following command in your terminal to get an example app started.
npx create-next-app --example with-typescript next-typescript-ga
We also need to add the type definitions for
yarn add -D @types/gtag.js
Once that’s finished, open up the directory in your favourite text editor.
Article covers: How native is react native?, React Native vs (Ionic, Cordova), Similarities and difference between React Native and Native App Development.
Google Maps & Google Places in React. This video covers a "Bear Sighting" React App where we learn how Google Maps, Google Places, and browser geolocation works. All using modern React (hooks) and up to date packages for 2020.
react-native-google-analytics .Google Analytics for React Native! Compatible with react-native-ab.