Skip to content

Commit

Permalink
Add ga via next/script to _app
Browse files Browse the repository at this point in the history
  • Loading branch information
israelias authored Jan 19, 2024
1 parent a537cdb commit cf0f945
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/pages/_app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useEffect } from 'react';
import Script from 'next/script';
import PropTypes from 'prop-types';
import Head from 'next/head';
import CssBaseline from '@material-ui/core/CssBaseline';
Expand Down Expand Up @@ -120,6 +121,13 @@ export default function MyApp(props) {
<meta name="twitter:title" content={ogTitle} />
<meta name="twitter:description" content={description} />
<meta name="twitter:site" content={userName} />
{/* ADSense */}
<Script
id="adsbygoogle-init"
strategy="afterInteractive"
crossOrigin="anonymous"
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2907518490044345"
/>
</Head>
<ThemeContextProvider>
{/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */}
Expand Down

0 comments on commit cf0f945

Please sign in to comment.