Integrate HumanBehavior SDK with Gatsby for session recording and analytics.
humanbehavior-js
packagegatsby-browser.js
file in the root of your project:
.env
file in your project root:
GATSBY_
prefix is required for Gatsby to expose the environment variable to the client-side code.gatsby-browser.js
:
onClientEntry
API, which ensures it only loads after the browser environment is ready.
GATSBY_
to be available in client-side code.
gatsby-ssr.js
:
GATSBY_
.env
file is in your project rootgatsby-browser.js
is in your project root