I want to add tracking code in Next.js but its not working.
<Script>
window.dataLayer = window.dataLayer || [];
function gtag(){
dataLayer.push(arguments)
}
gtag('js', new Date());
gtag('config', 'UA-xxxxxxxxx-1');
</Script>