How to Integrate Yellow AI with Next JS website

Hey @shubham_saurabh ,

You can add our script to any NextJS page using the steps below.

  1. Create a file called static/yellowai.js and paste our script. (You can remove the tags)
  2. You can now load this file on page/(page_name).(jsx|tsx) file like this
import Head from 'next/head';
import MyComponent from '../components/mycomponent';

export default () => (
  <div>
    <Head>
      <script type="text/javascript" src="/static/yellowai.js"></script>
    </Head>
    <MyComponent />
  </div>
)
3 Likes