Skip to content

Commit

Permalink
updated gtm
Browse files Browse the repository at this point in the history
  • Loading branch information
gnehs committed Nov 18, 2023
1 parent 56d2318 commit 6577276
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,15 @@ export default function RootLayout({
href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Noto+Sans+TC:wght@400;700&display=swap"
rel="stylesheet"
/>
{/* Google tag (gtag.js) */}
<script
async
src="https://www.googletagmanager.com/gtag/js?id=G-GVRT4CHSQJ"
></script>
<Script
id="gtm"
strategy="afterInteractive"
dangerouslySetInnerHTML={{
__html: `window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'G-GVRT4CHSQJ');`,
__html: `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var 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-NPVBCDZ');`,
}}
/>
<Script
Expand Down

0 comments on commit 6577276

Please sign in to comment.