Skip to content
Permalink
Browse files
Add analytics
  • Loading branch information
arturocr committed Nov 17, 2020
1 parent ee065c2 commit e19ff85
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

@@ -11,6 +11,7 @@
"lint:fix": "npm run lint -- --fix"
},
"dependencies": {
"@happykit/analytics": "^1.0.1",
"clsx": "^1.1.1",
"lite-vimeo-embed": "^0.1.0",
"lite-youtube-embed": "^0.1.2",
@@ -2,6 +2,7 @@ import { useEffect } from 'react';
import { MDXProvider } from '@mdx-js/react';
import Head from 'next/head';
import { DefaultSeo } from 'next-seo';
import { useAnalytics } from '@happykit/analytics';

import Footer from '@/components/footer';
import Header from '@/components/header';
@@ -14,6 +15,7 @@ import '@/styles/custom.css';
import '@/styles/prism.css';

const MyApp = ({ Component, pageProps, router }) => {
useAnalytics({ publicKey: 'analytics_pub_bba22bdbcd' });
useEffect(() => {
const handleRouteChange = () => {
window.scrollTo({

1 comment on commit e19ff85

@vercel
Copy link

@vercel vercel bot commented on e19ff85 Nov 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.