You can implement Privacy Pillar's products on the website that you have built using Next.js. To be more precise, you must get the production CDN script Privacy Pillar portal and add it to your website code.
The following steps are common for implementing Privacy Pillar's Cookie Banner, Subscription Consent Banner, and Social Fortuna.
To add the CDN scripts to your website follow the steps according to your Next.js version.
To install the banner, navigate to the pages>_app.js and add the below steps:
Step 1: Import the next/script component.
To load Privacy Pillar's CDN Script in your Next.js application, add the following import statement:
import Script from 'next/script';Step 2: Add the Privacy Pillar CDN Script
To use Privacy Pillar products on your website add the CDN script to the _app.js file.
Step 3: Add the strategy property before Interactive.
Add the below-mentioned strategy property after the Privacy Pillar CDN script to make sure the script loads and runs without slowing down the website.
strategy="beforeInteractive"Now run your website. Check that the desired module appears on the website properly.
Note: If it supposes doesn't appear, try hard-refresh (Press Ctrl+Shift+R) and check it again.
To install the banner:
Navigate to the pages>_app.js and add the below steps or Navigate to app>layout.js and add the following steps
Step 1: Import the next/script component.
To load Privacy Pillar's CDN Script in your Next.js application, add the following import statement:
import Script from 'next/script';Step 2: Add the Privacy Pillar CDN Script
To use Privacy Pillar products on your website add the CDN script to the _app.js or layout.js file.
Step 3: Add the strategy property beforeInteractive.
Add the below-mentioned strategy property after the Privacy Pillar CDN script to make sure the script loads and runs without slowing down the website.
strategy="beforeInteractive"Now run your website. Check that the desired module appears on the website properly.
Note: If it supposes doesn't appear, try hard-refresh (Press Ctrl+Shift+R) and check it again.