Skip to main content

Gatsby

To install Suppa in your Gatsby application:

  1. Open your gatsby-ssr.js file (create one if it doesn't exist) in your project root.
  2. 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"
/>,
]);
};