We're using Next.js 12 with SSR in our project. I've read through the Pendo documentation but I'm still not sure where to place the install snippet in our code, as Next.js doesn't provide an index.html file. We're using layouts however, is the top of the layout a good place to place Pendo?
I was trying to put the snippet as a function inside of the layout component's return, but it apparently doesn't work like this.
Thanks for any help!
Your
_app.tsx
should start with something like this and this will work:Paste your Pendo script code as is into the placeholder above as a comment block.
The
_app.js
file works asindex.js
, the entry point for the whole application including every sub-page of it.