From 212be8c4f5d4428b964c0f05a64cf78f1379218e Mon Sep 17 00:00:00 2001 From: Cody Olsen Date: Mon, 30 Nov 2020 17:07:13 +0100 Subject: [PATCH] docs: setup analytics --- pages/_document.tsx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pages/_document.tsx b/pages/_document.tsx index 59e77999..0a6bdc0a 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -1,10 +1,30 @@ import Document, { Head, Html, Main, NextScript } from 'next/document' +const ga = process.env.NEXT_PUBLIC_GA + export default class _DocumentPage extends Document { render() { return ( + {ga && ( +