There are a number of articles out there describing various methods of configuring `google analytics` with `next.js` — all written with untyped JavaScript. This article aims to remedy the absence of a strongly typed reference. The official next.js example serves as a good reference, yet, it too lacks strong types as it is written with JavaScript.

Install `@types/gtag.js` as a dev dependency

Open your terminal and run

terminal

We will not be needing the vanilla (non-typed) `gtag.js` package, the `react-ga` package, or any other package for that matter. This is where declaration (`**/*.d.ts`) files really shine! Before getting started, navigate to your `tsconfig.json` file and ensure…


The FontAwesome Icon featuring Next.js+TypeScript

1. Overview

The aim of this article is to outline how to directly incorporate custom Fontawesome icons into your Next.js TypeScript project. For a solid introduction on setting up Fontawesome 5 with Next.js and TypeScript please see Vuong Dang’s recent post.

Andrew Ross

Full-Stack Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store