Gatsby
To install Suppa in your Gatsby application:
- Open your
gatsby-ssr.js
file (create one if it doesn't exist) in your project root. - Add the following code to inject the Suppa script into the
<head>
:
import React from "react";
export const onRenderBody = ({ setHeadComponents }) => {
setHeadComponents([
<script
key="suppa-script"
src="https://app.suppa.ai/integration/script.js"
data-api-key="YOUR_SUPPA_API_KEY"
/>,
]);
};