Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gtm): move noscript under body #438

Merged
merged 2 commits into from
Jul 26, 2021
Merged

fix(gtm): move noscript under body #438

merged 2 commits into from
Jul 26, 2021

Conversation

mazipan
Copy link
Member

@mazipan mazipan commented Jul 26, 2021

Closes issue on #419

Description

Move GTM under the body

Current Tasks

  • Move GTM to be precise under the body
  • Move the noscript from _app to _document

Screen Shot 2021-07-26 at 11 30 12

@netlify
Copy link

netlify bot commented Jul 26, 2021

✔️ Deploy Preview for wargabantuwarga ready!

🔨 Explore the source changes: 124dffd

🔍 Inspect the deploy log: https://app.netlify.com/sites/wargabantuwarga/deploys/60fe3bb7a5fd700007cde716

😎 Browse the preview: https://deploy-preview-438--wargabantuwarga.netlify.app

@codecov
Copy link

codecov bot commented Jul 26, 2021

Codecov Report

Merging #438 (124dffd) into main (304f0cd) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #438   +/-   ##
=======================================
  Coverage   39.58%   39.58%           
=======================================
  Files          67       67           
  Lines         864      864           
  Branches      257      257           
=======================================
  Hits          342      342           
  Misses        516      516           
  Partials        6        6           
Impacted Files Coverage Δ
pages/_app.tsx 0.00% <ø> (ø)
pages/_document.tsx 0.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 304f0cd...124dffd. Read the comment docs.

@zainfathoni zainfathoni added the need-perf-check Trigger Lighthouse-CI check label Jul 26, 2021
@zainfathoni zainfathoni requested a review from resir014 July 26, 2021 04:19
@zainfathoni
Copy link
Member

What do you think, @resir014?
With all these caveats, do you think it's okay to move it out from _app to _document?

@mazipan
Copy link
Member Author

mazipan commented Jul 26, 2021

I think we need to differentiate ya, the <Script /> should be keep on _app, since it have a logic.
But for the noscript, it should be fine

@mazipan mazipan changed the title fix(gtm): move script and noscript under body fix(gtm): move noscript under body Jul 26, 2021
Copy link
Member

@zainfathoni zainfathoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💯

Thanks, Mas @mazipan! 🙏

@zainfathoni zainfathoni enabled auto-merge July 26, 2021 04:44
@mazipan
Copy link
Member Author

mazipan commented Jul 26, 2021

Do not merge it now ya.
I need to double check on the Netlify Preview 🙏

@mazipan mazipan disabled auto-merge July 26, 2021 04:45
@mazipan
Copy link
Member Author

mazipan commented Jul 26, 2021

Screen Shot 2021-07-26 at 11 50 38

The <Script/> can create a multiple GTM script :-(

@zainfathoni
Copy link
Member

zainfathoni commented Jul 26, 2021

Screen Shot 2021-07-26 at 11 50 38

The <Script/> can create a multiple GTM script :-(

Maybe try replacing my Script implementation with next/script 😅
https://nextjs.org/docs/basic-features/script

But remember not to put it in the _document.tsx file

Screenshot 2021-07-26 at 12 54 14

@resir014
Copy link
Member

@zainfathoni Yes, let's replace everything with next/script in a separate PR.

@resir014
Copy link
Member

Issue created: #439

@mazipan mazipan merged commit 584208d into kawalcovid19:main Jul 26, 2021
@mazipan mazipan deleted the mazipan/move-gtm-under-body branch August 5, 2021 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-perf-check Trigger Lighthouse-CI check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants