using a script tag in a next js project code example
Example: next js script tag
import Head from "next/head";
// Add this wherever you render your code...
<Head>
<script dangerouslySetInnerHTML={{ __html: `YOUR SCRIPT CODE GOES HERE` }} />
</Head>