mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-12 19:02:53 +08:00
lazy load twitter embed
This commit is contained in:
parent
07bea63692
commit
b8b2472a94
@ -8,19 +8,18 @@ export const GoogleAnalytics: React.FC = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<Script src="https://www.googletagmanager.com/gtag/js?id=G-JKZEHMJBMH" />
|
||||||
<Script
|
<Script
|
||||||
src="https://www.googletagmanager.com/gtag/js?id=G-JKZEHMJBMH"
|
id="google-analytics"
|
||||||
strategy="afterInteractive"
|
dangerouslySetInnerHTML={{
|
||||||
/>
|
__html: `
|
||||||
<Script id="google-analytics" strategy="afterInteractive">
|
|
||||||
{`
|
|
||||||
window.dataLayer = window.dataLayer || [];
|
window.dataLayer = window.dataLayer || [];
|
||||||
function gtag(){dataLayer.push(arguments);}
|
function gtag(){dataLayer.push(arguments);}
|
||||||
gtag('js', new Date());
|
gtag('js', new Date());
|
||||||
|
|
||||||
gtag('config', 'G-JKZEHMJBMH');
|
gtag('config', 'G-JKZEHMJBMH');
|
||||||
`}
|
`,
|
||||||
</Script>
|
}}
|
||||||
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -201,7 +201,7 @@ const GitHubSection = () => (
|
|||||||
April 27, 2022
|
April 27, 2022
|
||||||
</a>
|
</a>
|
||||||
</blockquote>{" "}
|
</blockquote>{" "}
|
||||||
<Script async src="https://platform.twitter.com/widgets.js" charSet="utf-8"></Script>
|
<Script strategy="lazyOnload" src="https://platform.twitter.com/widgets.js"></Script>
|
||||||
</Styles.StyledTwitterQuote>
|
</Styles.StyledTwitterQuote>
|
||||||
<Styles.StyledSectionArea>
|
<Styles.StyledSectionArea>
|
||||||
<Styles.StyledSubTitle>Open Source Community</Styles.StyledSubTitle>
|
<Styles.StyledSubTitle>Open Source Community</Styles.StyledSubTitle>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user