SDKs & Libraries

Client libraries and SDKs for integrating Cookiewise into your applications.

JavaScript SDK

The primary way to integrate Cookiewise is via our JavaScript consent script. Simply add it to your website:

<script src="https://www.cookiewise.net/api/script.js?website_id=YOUR_WEBSITE_ID"></script>

JavaScript API Methods

Once loaded, the script exposes these methods on window.Cookiewise:

MethodDescription
getConsent()Returns current consent preferences object
showBanner()Programmatically show the consent banner
acceptAll()Accept all cookie categories
rejectAll()Reject all optional cookie categories
updateConsent(prefs)Update specific category preferences

REST API

For server-side integrations, use the Cookiewise REST API directly. See the API Authentication and Consent API documentation for full details.

WordPress

Add the script tag to your WordPress theme's header.php file, or use a header/footer injection plugin. No dedicated WordPress plugin is required — the JavaScript SDK works out of the box.

React / Next.js

For React-based applications, add the script tag to your index.html or use a useEffect hook to load it dynamically:

useEffect(() => {
  const script = document.createElement('script');
  script.src = 'https://www.cookiewise.net/api/script.js?website_id=YOUR_ID';
  script.async = true;
  document.head.appendChild(script);
}, []);

Need a Custom Integration?

If you need help integrating Cookiewise with a platform not listed here, contact our support team and we'll help you get set up.