mirror of
https://github.com/ruisaraiva19/favycon.git
synced 2026-09-12 19:51:07 +05:00
Merge branch 'develop'
This commit is contained in:
commit
a4c638c9bc
@ -1,30 +1,14 @@
|
||||
/* eslint-disable @next/next/no-sync-scripts */
|
||||
import Document, { Html, Head, Main, NextScript } from 'next/document'
|
||||
|
||||
const isProd = process.env.NODE_ENV === 'production'
|
||||
|
||||
class MyDocument extends Document {
|
||||
render() {
|
||||
return (
|
||||
<Html lang="en">
|
||||
<Head>
|
||||
{isProd && (
|
||||
<script async src={`https://www.googletagmanager.com/gtag/js?id=${process.env.NEXT_PUBLIC_GTM_ID || ''}`} />
|
||||
)}
|
||||
{isProd && (
|
||||
<script
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag() { dataLayer.push(arguments); }
|
||||
gtag('js', new Date());
|
||||
gtag('config', '${process.env.NEXT_PUBLIC_GTM_ID || ''}', { 'anonymize_ip': true });
|
||||
`,
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="" />
|
||||
{process.env.NODE_ENV === 'production' && <script async src="https://cdn.splitbee.io/sb.js"></script>}
|
||||
</Head>
|
||||
<body className="preload">
|
||||
<script src="/js/noflash.js" />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user