mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-20 05:12:54 +08:00
fix analytics
This commit is contained in:
parent
37e5d105c4
commit
f46b2cccdc
@ -1,22 +0,0 @@
|
|||||||
import React from "react";
|
|
||||||
|
|
||||||
export const GoogleAnalytics: React.FC = () => {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<script
|
|
||||||
async
|
|
||||||
src="https://www.googletagmanager.com/gtag/js?id=G-JKZEHMJBMH"
|
|
||||||
/>
|
|
||||||
<script
|
|
||||||
dangerouslySetInnerHTML={{
|
|
||||||
__html: `window.dataLayer = window.dataLayer || [];
|
|
||||||
function gtag(){dataLayer.push(arguments);}
|
|
||||||
gtag('js', new Date());
|
|
||||||
|
|
||||||
gtag('config', 'G-JKZEHMJBMH');
|
|
||||||
`,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
@ -42,7 +42,23 @@ class MyDocument extends Document {
|
|||||||
return (
|
return (
|
||||||
<Html lang="en">
|
<Html lang="en">
|
||||||
<Head>
|
<Head>
|
||||||
{!isDevelopment && <GoogleAnalytics />}
|
{!isDevelopment && (
|
||||||
|
<>
|
||||||
|
<script
|
||||||
|
async
|
||||||
|
src="https://www.googletagmanager.com/gtag/js?id=G-JKZEHMJBMH"
|
||||||
|
/>
|
||||||
|
<script
|
||||||
|
dangerouslySetInnerHTML={{
|
||||||
|
__html: `window.dataLayer = window.dataLayer || [];
|
||||||
|
function gtag(){dataLayer.push(arguments);}
|
||||||
|
gtag('js', new Date());
|
||||||
|
gtag('config', 'G-JKZEHMJBMH');
|
||||||
|
`,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
<SeoTags
|
<SeoTags
|
||||||
description="Simple visualization tool for your JSON data. No forced structure, paste your JSON and view it instantly."
|
description="Simple visualization tool for your JSON data. No forced structure, paste your JSON and view it instantly."
|
||||||
title="JSON Visio"
|
title="JSON Visio"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user