How to enable WP Consent API with UniConsent

There are two ways to enable the WP Consent API with UniConsent:

Option 1: Use WordPress Plugins (Recommended)

This is the easiest and most reliable way to integrate UniConsent with the WP Consent API.

Steps:

  1. Install the required plugins:

  2. Activate both plugins from your WordPress admin dashboard.

Note:

The WP Consent API plugin does not provide a user interface. It acts as a bridge between your Consent Management Platform (CMP) in this case, other plugins that rely on the WP Consent API to check user consent before executing.

This setup ensures that all compatible plugins follow a consistent and privacy-compliant behavior automatically.

Option 2: Use UniConsent Tags Manually

If you prefer a manual setup (for non-WordPress environments or advanced customization), you can add UniConsent directly via tags.

Steps:

  1. Add the UniConsent WP Consent API Tag to the <head> section of your website:
<script data-nowprocket data-cfasync="false" async src="https://cmp.uniconsent.com/v2/wp-consent-api.min.js"></script>
  1. Ensure other UniConsent tags (such as the core CMP loader) are also present, so consent dialogs and preferences function properly.

This method is more advanced and may require additional configuration to ensure full compatibility with your site's plugins and scripts.