Back to Documentation

Installation

Detailed installation instructions for different platforms

Standard HTML Website

Add the script tag to your <head> section:

<script src="https://cookieconfig.com/api/script" data-token="YOUR_TOKEN"></script>

React / Next.js

Add to your _app.tsx or layout component:

import Script from 'next/script'

export default function App() {
  return (
    <>
      <Script src="https://cookieconfig.com/api/script" data-token="YOUR_TOKEN" />
      {/* Your app */}
    </>
  )
}

WordPress

Install using the header/footer plugin or add to your theme's header.php:

<?php wp_head(); ?>
<script src="https://cookieconfig.com/api/script" data-token="YOUR_TOKEN"></script>

Shopify

  1. Go to Online Store → Themes → Actions → Edit Code
  2. Open theme.liquid
  3. Add the script before </head>

Google Tag Manager

Create a new Custom HTML tag with the script, set trigger to "All Pages", and set firing priority to 1 (highest).

Important: Script Placement

Always place the CookieConfig script BEFORE any tracking scripts (Google Analytics, Facebook Pixel, etc.) so it can block them until consent is given.