Where to put analytics code in Next.js?

Hi, does this help? https://www.google.com/amp/s/mariestarck.com/add-google-analytics-to-your-next-js-application-in-5-easy-steps/amp/

(No difference when using Plasmic)