I've tried this and it seems to work in next/head. I have a Layout component which has a Head, and this is used in every page. Placing the script in there should also work.
But I guess placing it in _document is best since this ensures the script is always on all pages.
I've tried this and it seems to work in
next/head
. I have a Layout component which has aHead
, and this is used in every page. Placing thescript
in there should also work.But I guess placing it in
_document
is best since this ensures the script is always on all pages.Yeah I did the same but forgot to add the general
Page
component to every page so I was missing the script in some of my pages.