Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Remove GTM script #475

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,27 +117,6 @@ const Analytics = () => {
</Script>
<Script src="https://js.qualified.com/qualified.js?token=GWPbwWJLtjykim4W" />
{/* End script for adding Qualified */}
{NEXT_PUBLIC_GTM_ID && (
<>
{/* Google Tag Manager */}
<Script id="script_gtm">
{`(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','${NEXT_PUBLIC_GTM_ID}');`}
</Script>

{/* End Google Tag Manager */}
{/* Google Tag Manager (noscript) */}
<noscript
dangerouslySetInnerHTML={{
__html: `<iframe src="https://www.googletagmanager.com/ns.html?id=${NEXT_PUBLIC_GTM_ID}" height="0" width="0" style="display:none;visibility:hidden"></iframe>`,
}}
/>
{/* End Google Tag Manager (noscript) */}
</>
)}
{NEXT_PUBLIC_GTAG_ID && (
<>
{/* GTAG */}
Expand All @@ -154,12 +133,6 @@ const Analytics = () => {
});`}
</Script>
{/* End GTag */}
<noscript
dangerouslySetInnerHTML={{
__html: `<iframe src="https://www.googletagmanager.com/ns.html?id=${NEXT_PUBLIC_GTM_ID}" height="0" width="0" style="display:none;visibility:hidden"></iframe>`,
}}
/>
{/* End Google Tag Manager (noscript) */}
</>
)}
</>
Expand Down
Loading