WordPress Plugin
The Contentpass WordPress Plugin integrates Contentpass with your WordPress site. It includes a built-in script and iframe blocker to prevent third-party resources from loading before consent.
The WordPress plugin currently supports only Consentmanager as its Consent Management Platform (CMP). If your site uses a different CMP, follow the integration guide for your CMP instead.
1. Create a Contentpass account and property
Go to publisher.contentpass.net and create your publisher account. The wizard will guide you through the steps of creating a publisher profile as well as the first property. The property's status page will present the required steps for a successful Contentpass integration. This document contains further details that should help you with the process.
You will need your Property ID for the plugin configuration. You can find it in your property's settings in the Publisher Dashboard.
2. Install the plugin
- In WordPress Admin, go to Plugins → Add Plugin.
- Search for Contentpass Integration and install it from the WordPress plugin directory.
- Activate the plugin.
- After activation, the Contentpass menu appears in the WordPress admin sidebar with three items:
- Integration – Consentmanager and Contentpass configuration
- Blocking Rules – Third-party script blocking
- Request Contract – Link to contact form
The Integration and Blocking Rules pages both have the buttons Open Documentation and Publisher Dashboard. Changes in the Publisher Dashboard may take up to 10 minutes to become available in the plugin.
3. Configure CNAME
Since 3rd-party cookies don't work reliably anymore in most browsers, Contentpass subscribers must be identified using a 1st-party session.
To simplify handling of these 1st-party sessions, Contentpass provides an endpoint that must be configured behind a CNAME subdomain of the publisher's first-party domain.
In the following example we assume that the publisher's website is: https://www.example.com and the propertyId is 1234abcd. You can find your propertyId in the settings of your property. Can't find it? Get in touch with us to obtain your propertyId.
A CNAME must be set up as follows:
cp.example.com. 300 IN CNAME 1234abcd.12.with.contentpass.net.
Once the CNAME has been set up, Contentpass will automatically provision the required SSL certificates.
The CNAME is required for Contentpass, but the plugin does not verify it. The plugin uses the host that is configured as hostname in your property's configuration.
4. Fill out the Integration page
Go to Contentpass → Integration in the WordPress admin.
Step 1: Enter your Property ID
On first setup, the Integration page shows only a Property ID field and a Continue button.
- Enter your Property ID (e.g.
abc123). You can find it in your property's settings in the Publisher Dashboard. When you open a property in the dashboard, it also appears as the last segment of the URL in your browser's address bar (e.g. theabc123in.../properties/view/abc123). - The Property ID saves automatically as you type. The plugin then loads your property's configuration from
https://static.contentpass.net/properties/{propertyId}/config.json. - As soon as the property is found, the page reloads and shows the full Integration form.
If the Property ID cannot be saved, the plugin shows one of these messages:
- Please set the Property ID. – The field is empty.
- Could not load this Property ID. Check it in the publisher dashboard. – The plugin cannot find a property with this ID. Check the ID in the Publisher Dashboard.
Step 2: Complete the Integration form
The full Integration form shows the following items:
| Item | Description |
|---|---|
| Status notice | Shows the status of your property, with a link to the Publisher Dashboard: "Your page is ready to use Contentpass", "Your page is not yet ready to use Contentpass. Please visit the dashboard" or "Your integration needs attention. Please visit the dashboard". |
| Staging Preview | A link to your site with ?cpdebug=staging (see Debug URLs). |
| CMP | Shows Consentmanager. New installations cannot select a different CMP. |
| CMP integration | Choose how the plugin handles Consentmanager (see CMP integration). |
| Property ID | Prefilled from step 1. You can still change it. |
| Consentmanager CMP snippet | Only shown when Plugin should also load the CMP is selected (see Consentmanager CMP snippet). |
| Script | Optional. One external script URL (https:// or http://) that loads after consent, e.g. an ad tag like https://cdn.example.com/ads.js. Inline JavaScript, HTML or CSS is not allowed. |
Click Save Changes to save the form.
CMP integration
- CMP already integrated on this site (default) – Your site already embeds Consentmanager. The plugin loads only the Contentpass stub for Consentmanager; it does not load the Consentmanager script.
- Plugin should also load the CMP – The plugin loads Consentmanager and Contentpass. After you save, the Consentmanager CMP snippet field appears.
For the setup of Contentpass in your Consentmanager account, follow the Consentmanager integration guide.
Consentmanager CMP snippet
When Plugin should also load the CMP is selected, paste the external semi-automatic <script> tag from Consentmanager → Get Code into the Consentmanager CMP snippet field. Do not use the automatic-blocking snippet. The typical src is https://cdn.consentmanager.net/delivery/js/semiautomatic.min.js.
- The snippet must contain the
data-cmp-cdidattribute. - The plugin validates the host and the allowlisted
data-cmp-*attributes. It loads the script through WordPress and does not output your pasted code as is.
If the snippet is invalid, the plugin shows this message: "The Consentmanager snippet could not be validated. Paste the external semi-automatic script tag from Consentmanager Get Code (including data-cmp-cdid)."
Staging
The plugin runs in staging mode while your Contentpass property is not approved or not live (isApproved or isLive is false in the property's configuration). You cannot switch off staging manually.
While staging is active, only logged-in Editors and Administrators see Contentpass, Consentmanager (when the plugin loads it), the script blocking and the placeholders. Anonymous visitors see none of these.
Staging ends automatically when your property is approved and live. This can take up to about 10 minutes.
Debug URLs
Append these query parameters to any front-end URL:
?cpdebug=settings— logs the front-end plugin config to the browser console only; does not load Contentpass.?cpdebug=staging— loads the full integration (Contentpass + Consentmanager + blocking) for that request, even for anonymous visitors.
Anyone with the URL can use these parameters. Full-page cache or CDN may serve stale HTML — purge cache or test with a fresh query string after changes.
5. Block third-party resources ("Blocking Rules")
To comply with Contentpass requirements, third-party resources (scripts, iframes) must not load before the user has given consent. The plugin includes a script and iframe blocker for this purpose. Script blocking follows the same staging rules as Contentpass and Consentmanager: in staging, only the preview audience (Editors/Administrators) is affected; in production, all visitors.
Visit our docs on Third Party Resources for more information on how to block third parties and the technical details on why this is important.
Using the Blocking Rules page
Go to Contentpass → Blocking Rules in the WordPress admin. The page title is Script Blocker Configuration. At the top, the Statistics section shows an overview of your rules.
1. Block List (Scripts to Block)
Add URL patterns that should be blocked until consent is given. Any script or iframe whose src contains the pattern will be blocked and replaced with a placeholder (or hidden, if Stealth Mode is enabled). Use the search field and the filters All, With Privacy Link and Without Privacy Link to find rules.
| Column | Description |
|---|---|
| URL / Script Source (Part) | A substring of the src to block (e.g. facebook.com, youtu.be, googletagmanager). It does not have to be a full URL. |
| Vendor name | When set, it will overwrite the automatically detected vendor name in the placeholder. |
| Privacy Link (optional) | Optional, but highly recommended: URL to the service's privacy policy. Shown below the placeholder button. |
| Hide Placeholder? (Stealth Mode) | When enabled, the content is blocked without showing a visible placeholder. |
| Dynamic Blocking | When enabled, Consentmanager handles the matched scripts and iframes instead of a Contentpass placeholder (see below). |
Examples of useful patterns: doubleclick, analytics, facebook, youtube, googletagmanager, hotjar.com.
Please check the findings on the Publisher Dashboard for your site to identify third-party resources to block.
Dynamic Blocking
When Dynamic Blocking is enabled for a rule, the plugin prepares the matched scripts and iframes for Consentmanager's Dynamic Content Blocking (data-cmp-vendor) instead of showing a Contentpass placeholder. Consentmanager then shows its own content preview and unlocks each vendor separately.
| Field | Description |
|---|---|
| CMP Vendor ID | Required when Dynamic Blocking is enabled. The Consentmanager vendor ID, e.g. c86999 or s26. |
| Preview size | Optional. The size of the content preview as WidthxHeight, e.g. 560x315. |
2. Rewrite Rules
Rewrite rules search and replace text in the final HTML output of your site (Pattern → Replacement). They run before the script blocking. Use them, for example, to serve fonts or scripts locally or to override inline CSS. Rewrite rules do not change external CSS or JavaScript files.
3. Placeholder Styling
The Placeholder Styling section customizes the appearance of blocked content placeholders. A live preview (Mobile, Tablet, Desktop) shows how the placeholder will look with your current settings.
| Setting | Description |
|---|---|
| Border Color | Color of the placeholder box border (default: #212121). |
| Border Width | Border width (e.g. 2px). |
| Padding | Internal spacing of the box (e.g. 20px). |
| Background Color | Background color of the placeholder (default: #f5faff). |
| Background Image | Optional background image URL. |
| Text Color | Color of the placeholder text. |
| Border Radius | Corner roundness (e.g. 8px). |
| Button Background | Background color of the "Load" button. |
| Button Text Color | Text color of the button. |
| Content Alignment | Text alignment inside the box (left, center, right). |
| Box shadow | Shadow of the placeholder box. |
| Font size | Font size of the placeholder text. |
| Max width | Maximum width of the placeholder box. |
Under Placeholder Text & Button Customization, enable the languages you need. Then set these texts for each language:
| Setting | Description |
|---|---|
| Placeholder Text | HTML template. Use {name} for the vendor name (or the URL pattern, if no vendor name is set) and {type} for script or iframe. |
| Button Text | Template for the button label (supports {name}). |
| Privacy Link Text | Template for the privacy link. Use [priv]…[/priv] to mark the clickable part (e.g. Read more [priv]here[/priv]). This is a dummy for the privacy link provided in the block list. There is no link needed here and only text must be provided. |
The available languages are configured in the settings in the Publisher Dashboard.
Import / Export Configuration
Use Export as JSON or Export as CSV to download your configuration. Use Import from File to load a configuration from a file.
Click Save Configuration to save your changes on the Blocking Rules page.
6. Mention Contentpass in your Privacy Policy
While we do not process any data of non-subscribers, we receive the IP addresses of your visitors for technical reasons. Please inform your visitors about this data processing and link to our privacy policy by including the following snippet on your privacy policy page:
- plain text
- html
Contentpass
Auf unserer Website bieten wir Ihnen einen Service zum werbe- und tracking-freien Zugang mit Contentpass an. Dies ist ein Angebot der Content Pass GmbH, Wolfswerder 58, 14532 Kleinmachnow, Deutschland. Beim Abschluss des Service wird Contentpass Ihr Vertragspartner.
Um Ihnen diesen Service auf unserer Website anzuzeigen und damit anbieten zu können, verarbeitet Contentpass, in unserem Auftrag, mit dem Besuch unserer Website Ihre IP-Adresse. Für die Registrierung sowie die Vertragsabwicklung des Contentpass und die damit einhergehende Datenverarbeitung ist Contentpass Verantwortlicher im Sinne der DSGVO. Wir sind ausschließlich Verantwortlicher für die Verarbeitung Ihrer IP-Adresse.
Grundlage für die Datenverarbeitung der IP-Adresse, im Rahmen unserer Auftragsverarbeitung mit Contentpass, ist unser berechtigtes Interesse Ihnen die Möglichkeit zu bieten, unsere Website werbe- und tracking-frei aufrufen zu können und Ihr Interesse an der Nutzung unserer Website praktisch ohne Werbung und Tracking [Art. 6 Abs. 1 lit. f) DSGVO]. Zudem erfüllen wir hiermit die rechtliche Verpflichtung, eine rechtskonforme Einwilligung in einwilligungsbedürftige Datenverarbeitungen einzuholen [Art. 6 Abs. 1 lit. c) DSGVO].
Bitte klicken Sie auf die folgenden Links, um mehr zum Datenschutz bei Contentpass zu erfahren, sich in Ihr Contentpass-Konto einzuloggen, oder sich für Contentpass zu registrieren.
<h3>Contentpass</h3>
<p>Auf unserer Website bieten wir Ihnen einen Service zum <a href="https://contentpass.net">werbe- und tracking-freien Zugang mit Contentpass</a> an. Dies ist ein Angebot der Content Pass GmbH, Wolfswerder 58, 14532 Kleinmachnow, Deutschland. Beim Abschluss des Service wird Contentpass Ihr Vertragspartner.</p>
<p>Um Ihnen diesen Service auf unserer Website anzuzeigen und damit anbieten zu können, verarbeitet Contentpass, in unserem Auftrag, mit dem Besuch unserer Website Ihre IP-Adresse. Für die Registrierung sowie die Vertragsabwicklung des Contentpass und die damit einhergehende Datenverarbeitung ist Contentpass Verantwortlicher im Sinne der DSGVO. Wir sind ausschließlich Verantwortlicher für die Verarbeitung Ihrer IP-Adresse. </p>
<p>Grundlage für die Datenverarbeitung der IP-Adresse, im Rahmen unserer Auftragsverarbeitung mit Contentpass, ist unser berechtigtes Interesse Ihnen die Möglichkeit zu bieten, unsere Website werbe- und tracking-frei aufrufen zu können und Ihr Interesse an der Nutzung unserer Website praktisch ohne Werbung und Tracking [Art. 6 Abs. 1 lit. f) DSGVO]. Zudem erfüllen wir hiermit die rechtliche Verpflichtung, eine rechtskonforme Einwilligung in einwilligungsbedürftige Datenverarbeitungen einzuholen [Art. 6 Abs. 1 lit. c) DSGVO].</p>
<p>Bitte klicken Sie auf die folgenden Links, um <a href="https://www.contentpass.net/privacy">mehr zum Datenschutz bei Contentpass</a> zu erfahren, sich <a href="https://www.contentpass.net/login/" onclick="cp('login'); return false;" target="_top" >in Ihr Contentpass-Konto einzuloggen</a>, oder sich <a href="https://www.contentpass.net/register/" onclick="cp('signup'); return false;" target="_top" >für Contentpass zu registrieren</a>. </p>
Note:
Link target for login:
javascript: cp('login');
Link target for signup:
javascript: cp('signup');
Since these are not quite ordinary links, it may happen that your CMS does not support them. In that case, you can simply link to https://www.contentpass.net/login and https://www.contentpass.net/signup instead.
7. Using the cpauthenticated CSS class
While Stealth Mode hides the placeholder, it does not hide the placeholder's parent container. This avoids hiding other elements in that container that you want to keep visible.
To improve the experience for Contentpass subscribers (e.g. hiding ad slots), the Contentpass script adds the class cpauthenticated to the <body> when the user is logged in and has a valid subscription.
You can use this in your CSS to adjust layout for subscribers:
/* Hide ad containers for Contentpass subscribers */
body.cpauthenticated .ad-container {
display: none;
}
Apply this CSS as early as possible to avoid layout shifts—e.g. in the first CSS file loaded or as high as possible in the <head>.
We do not recommend relying on this as a robust method for recognizing Contentpass users for business logic. CSS classes can be easily manipulated by the user or any other JavaScript running on the page. Additionally, there is no guarantee that the CSS styles are applied before your JavaScript runs.
For more examples of styling with cpauthenticated, refer to the Web SDK documentation and the Consentmanager integration guide.