Skip to content

Commit

Permalink
chore: moved GTM into signup (calcom#14175)
Browse files Browse the repository at this point in the history
Co-authored-by: sean-brydon <[email protected]>
Co-authored-by: zomars <[email protected]>
  • Loading branch information
3 people authored Mar 22, 2024
1 parent 9acc21d commit e04a8f0
Show file tree
Hide file tree
Showing 3 changed files with 331 additions and 313 deletions.
19 changes: 0 additions & 19 deletions apps/web/components/PageWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,25 +76,6 @@ function PageWrapper(props: AppProps) {
id="page-status"
dangerouslySetInnerHTML={{ __html: `window.CalComPageStatus = '${pageStatus}'` }}
/>
{process.env.NEXT_PUBLIC_GTM_ID ? (
<>
<Script
id="gtm-init-script"
dangerouslySetInnerHTML={{
__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', '${process.env.NEXT_PUBLIC_GTM_ID}');`,
}}
/>
<noscript
dangerouslySetInnerHTML={{
__html: `<iframe src="https://www.googletagmanager.com/ns.html?id=${process.env.NEXT_PUBLIC_GTM_ID}" height="0" width="0" style="display:none;visibility:hidden"></iframe>`,
}}
/>
</>
) : null}

<style jsx global>{`
:root {
Expand Down
Loading

0 comments on commit e04a8f0

Please sign in to comment.