Implement Privacy Pillar Applications on Gatsby Websites

You can implement the PrivacyPolicy application on the website that you have constructed using Gatsby. To be more precise, you must add the production CDN script to the Gatsby-ssr.js file of your Gatsby project.

The following steps are common for implementing Privacy Pillar's Cookie Banner, Subscription Consent Banner, and Social Fortuna.

Add Script and Publish

To add the Privacy Pillar CDN Scripts:

  1. Open your Gatsby Project.
  2. Navigate to the gatsby-ssr.js file at the root of your project or create it if it does not exist.
  3. Add the CDN Script to the head of the page, inside the setHeadComponents() function.

The code should look like the following:

import React from 'react';export function onRenderBody({ setHeadComponents }) {setHeadComponents([    <script type="application/javascript" src="https://staging-cdn.adzapsrv.com/cmp/v2/web/4fbbc982-974b-43fa-b2fa-e86a84ca76d1/e3db2ba3-6aa8-46ea-bf8b-934c44b59201-bundle.js"></script>, ]);}

Now run your website. Check that the desired module appears on the website properly.
Note: If it doesn't appear, try hard-refresh (Press Ctrl+Shift+R) and check it again.