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

Move Google Analytics script to the <Head/> #43838

Merged
merged 2 commits into from Dec 13, 2022
Merged

Commits on Dec 8, 2022

  1. Move Google Analytics script to the <Head/>

    Google cannot read the Google Analytics script if it is placed at the bottom of the <body />.
    
    It can only be read when it's placed here in the <Head />
    
    This has been documented by other NextJS users online, and by Google themselves, which directs users to place the script in the head.
    
    Hope this helps NextJS users!
    aarnadlr committed Dec 8, 2022
    Copy the full SHA
    66c8edf View commit details
    Browse the repository at this point in the history

Commits on Dec 13, 2022

  1. Copy the full SHA
    48931d6 View commit details
    Browse the repository at this point in the history