summaryrefslogtreecommitdiff
path: root/src/pages/_document.jsx
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2024-01-19 02:32:43 +0000
committerIT Fixcomart <it@fixcomart.co.id>2024-01-19 02:32:43 +0000
commit8bcadf6d43a44169c422305522784424c30c7b02 (patch)
tree4666802b65784a949db4acad665a81de7297fc74 /src/pages/_document.jsx
parent065396828266e2de42cb0182c81ea2d7a5b00e2b (diff)
parent91086d8b1af2e1c0ca9db38d037f6331c9e6131a (diff)
Merged in Feature/perf/product-detail (pull request #127)
Feature/perf/product detail
Diffstat (limited to 'src/pages/_document.jsx')
-rw-r--r--src/pages/_document.jsx36
1 files changed, 25 insertions, 11 deletions
diff --git a/src/pages/_document.jsx b/src/pages/_document.jsx
index 3762c63b..fc9f2ee0 100644
--- a/src/pages/_document.jsx
+++ b/src/pages/_document.jsx
@@ -1,16 +1,24 @@
-import { Html, Head, Main, NextScript } from 'next/document'
-import Script from 'next/script'
+import { Html, Head, Main, NextScript } from 'next/document';
+import Script from 'next/script';
export default function MyDocument() {
- const env = process.env.NODE_ENV
+ const env = process.env.NODE_ENV;
return (
<Html>
<Head>
+ <link rel='preconnect' href='https://connect.facebook.net' />
+ <link rel='preconnect' href='https://googleads.g.doubleclick.net' />
+ <link rel='preconnect' href={process.env.NEXT_PUBLIC_ODOO_API_HOST} />
+ <link rel='prefetch' href='/images/logo-indoteknik-gear.png' />
+
<link rel='icon' href='/favicon.ico' />
<link rel='manifest' href='/manifest.json' />
<link rel='apple-touch-icon' href='/icon.jpg'></link>
- <link rel='apple-touch-startup-image' href='/images/splash/launch.png' />
+ <link
+ rel='apple-touch-startup-image'
+ href='/images/splash/launch.png'
+ />
<meta name='mobile-web-app-capable' content='yes' />
<meta name='apple-mobile-web-app-capable' content='yes' />
@@ -18,9 +26,11 @@ export default function MyDocument() {
<meta name='apple-mobile-web-app-title' content='Indoteknik.com' />
<meta name='theme-color' content='#fff' />
- <link rel='prefetch' href='/images/logo-indoteknik-gear.png' />
+ <meta
+ name='facebook-domain-verification'
+ content='328wmjs7hcnz74rwsqzxvq50rmbtm2'
+ />
- <meta name='facebook-domain-verification' content='328wmjs7hcnz74rwsqzxvq50rmbtm2' />
<Script
async
strategy='beforeInteractive'
@@ -28,6 +38,7 @@ export default function MyDocument() {
/>
<Script
+ async
id='google-analytics-ua'
strategy='beforeInteractive'
dangerouslySetInnerHTML={{
@@ -36,7 +47,7 @@ export default function MyDocument() {
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-10501937-1');
- `
+ `,
}}
/>
@@ -47,6 +58,7 @@ export default function MyDocument() {
/>
<Script
+ async
id='google-analytics-ga'
strategy='beforeInteractive'
dangerouslySetInnerHTML={{
@@ -55,11 +67,12 @@ export default function MyDocument() {
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-G1W8MNZ11P');
- `
+ `,
}}
/>
<Script
+ async
id='google-tag-manager'
strategy='afterInteractive'
dangerouslySetInnerHTML={{
@@ -68,7 +81,7 @@ export default function MyDocument() {
f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-PHRB7RP');
- `
+ `,
}}
/>
@@ -79,6 +92,7 @@ export default function MyDocument() {
/>
<Script
+ async
id='google-ads'
strategy='afterInteractive'
dangerouslySetInnerHTML={{
@@ -87,7 +101,7 @@ export default function MyDocument() {
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
- gtag('config', 'AW-954540379');`
+ gtag('config', 'AW-954540379');`,
}}
/>
@@ -119,5 +133,5 @@ export default function MyDocument() {
<NextScript />
</body>
</Html>
- )
+ );
}