=== Datareporter WebCare Integration ===
Contributors: datareporter
Tags: cookie banner, GDPR, privacy policy, imprint, consent management
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.1.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Integrate the Datareporter WebCare cookie consent banner, privacy policy, and imprint into your WordPress site.

== Description ==

**Datareporter WebCare Integration** integrates your [Datareporter WebCare](https://www.datareporter.eu/products/webcare) cookie consent banner, privacy policy, and legal imprint into WordPress. WebCare is a consent management platform from Austria. You configure your consent banner, privacy policy, and imprint in WebCare, and this plugin delivers them to your WordPress site.

= What the Plugin Does =

* **Cookie Consent Banner:** Adds the WebCare consent banner to your site. The banner collects cookie consent and includes a tag manager that controls tracking scripts based on visitor consent.
* **Privacy Policy:** Displays your WebCare privacy policy on any page or post using the `[drwc_privacy]` shortcode. When you update the privacy policy in WebCare, the changes are reflected on your site automatically.
* **Imprint:** Displays your legal imprint using the `[drwc_imprint]` shortcode. Like the privacy policy, it stays in sync with your WebCare account.
* **Embed Blocker:** Blocks third-party embeds (YouTube, Vimeo, Twitter/X, TikTok, Google Maps) until visitors give consent. An overlay prompts visitors to allow content per provider (**Feature requires WordPress 6.9 or later**).

= Key Technical Features =

* **Local Caching:** Cache banner assets, privacy policy, and imprint content on your server for fewer external requests.
* **Subresource Integrity (SRI):** SRI support for the banner script, verifying that the banner loader has not been tampered with.
* **Scheduled Cache Sync:** An hourly background sync keeps cached content up to date with your WebCare account.

= Shortcodes =

* `[drwc_privacy]`: Displays your privacy policy.
* `[drwc_imprint]`: Displays your imprint.

= Requirements =

This plugin requires an **active WebCare license**. You can get one at the [Datareporter Store](https://store.datareporter.eu/). The integration key from your WebCare account is needed during setup.

= Documentation & Support =

For setup instructions, configuration details, and troubleshooting on WebCare visit the [WebCare Help Center](https://help.datareporter.eu/docs/webcare).

== Installation ==

1. Install the plugin in the **Plugins** section of your WordPress admin dashboard.
2. Activate the plugin in the **Plugins** menu.
3. Go to **Settings > Datareporter WebCare** and enter your WebCare Integration Key (see [Integrate Help Page](https://help.datareporter.eu/docs/webcare/integrate)).
4. Enable the cookie consent banner.
5. Add the `[drwc_privacy]` and `[drwc_imprint]` shortcodes to the relevant pages on your site.
6. Configure caching and embed blocker settings as needed.

== Frequently Asked Questions ==

= Do I need a WebCare account to use this plugin? =

Yes. The plugin requires a valid integration key from an active WebCare license. You can obtain one at [store.datareporter.eu](https://store.datareporter.eu/).

= What content does the plugin load from external servers? =

The consent banner script, privacy policy data, and imprint data are loaded from the Datareporter WebCare CDN. Local caching can be enabled to reduce external requests.

= The Embed Blocker is enabled but embeds are not being blocked. What can I do? =

Some plugins (e.g. Elementor) disable the WordPress template enhancement output buffer that the Embed Blocker depends on. Go to **Settings > Datareporter WebCare > Embed Blocker** and enable the option under the **Troubleshooting** section. This re-enables the buffer so the Embed Blocker can process the page content. Disable it again if it causes issues with other plugins.

= Where can I get help? =

Visit the [WebCare Help Center](https://help.datareporter.eu/docs/webcare) for documentation and support on WebCare.

== External services ==

This plugin connects to the [Datareporter WebCare](https://www.datareporter.eu/products/webcare) CDN (Content Delivery Network), an external service operated by [Datareporter GmbH](https://www.datareporter.eu/) (Austria). The CDN is a network of servers that hosts and delivers the cookie consent banner, privacy policy, and legal imprint content to your WordPress site. Because this content is created and managed in your [WebCare dashboard](https://store.datareporter.eu/), the plugin must fetch it from the CDN — it cannot be generated locally.

The content served by the CDN (including the cookie banner text, privacy policy, and imprint) is dynamically generated based on the settings you configure in your individual WebCare license via the [WebCare dashboard](https://store.datareporter.eu/). When you update your settings there, the CDN-served content updates automatically.

= What the CDN is used for =

The plugin uses the Datareporter WebCare CDN for three purposes:

1. **Cookie consent banner**: The banner JavaScript, CSS, and configuration are loaded from the CDN so your consent banner appears on every page.
2. **Privacy policy and imprint**: The plugin fetches your privacy policy and legal imprint content from the CDN and displays it on pages where you place the `[drwc_privacy]` or `[drwc_imprint]` shortcodes.
3. **Integration key verification**: When you enter or save your integration key in the WordPress admin panel, the plugin sends a request to the CDN to verify that the key is valid so your WebCare content is reachable.

= CDN domains =

The plugin communicates with the following domains. The exact domain used depends on your WebCare configuration:

* `webcachex-eu.datareporter.eu`
* `webcachex.datareporter.eu`
* `webcache-eu.datareporter.eu`
* `webcache.datareporter.eu`

For example, a request to load the banner design (stylesheet) would look like this:
`https://webcachex-eu.datareporter.eu/c/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/yyyyyyyyyyyyyyy/zzz/banner.css`
where `xxxx...`, `yyy...`, `zzz` are parts from your individual integration key.

= When data is sent =

No requests are made to the CDN until a site administrator activates the plugin and enters an integration key.
Once active:

* **CDN mode (default)**: On every page load, your visitors' browsers send requests directly to the CDN domains listed above to load the banner script, styles, privacy policy, and imprint content.
* **Cache mode (optional)**: Your WordPress server fetches the same resources from the CDN during an hourly background sync and serves them locally to visitors.
* **Admin panel**: When you save the integration key in the plugin settings, your server sends a single request to the CDN to verify the key.

= What data is sent =

Each request to the CDN transmits the following data:

* The IP address of the requesting party (the visitor's browser in CDN mode, or your server in cache mode).
* Standard HTTP headers: User-Agent, Referer, and Accept-Language.
* Integration key components (client ID, organization ID, and website ID) included in the request URL.

= Service provider =

This service is provided by [Datareporter GmbH](https://www.datareporter.eu/) (Austria): [privacy policy](https://webcache-eu.datareporter.eu/c/025cf622-aba5-4850-93fb-e23c508e9b7f/Ey1sy7yreWON/privacynotice_en.pdf).

== About Datareporter ==

[Datareporter GmbH](https://www.datareporter.eu/) is an Austrian company specializing in privacy and consent management. Their WebCare platform helps website operators meet GDPR requirements with automatically updated consent banners, privacy policies, and legal imprint management.
More info about us can be found at [datareporter.eu/company/info](https://www.datareporter.eu/company/info).

== Screenshots ==

1. Setup guide with integration key, banner activation, and shortcode instructions.
2. Cache management with per-resource caching and manual sync.
3. Embed blocker configuration with per-provider consent settings.
4. Expert settings with SRI, CSP info, and debug logging.
5. YouTube consent overlay on the frontend before content is loaded.

== Changelog ==

= 1.1.1 =
* Fixed embed blocker compatibility with Elementor and other page builders that disable the WordPress template enhancement output buffer. A new opt-in option is available under the Troubleshooting section in the Embed Blocker tab.
* Fixed Vimeo iframe sizing in Elementor after consent.

= 1.1.0 =
Initial public release with the following features:
* Cookie consent banner integration with CDN and local cache modes.
* Privacy policy and imprint shortcodes (`[drwc_privacy]` and `[drwc_imprint]`).
* Embed blocker for YouTube, Vimeo, Twitter/X, TikTok, Google Maps, and Calendly with per-provider consent overlays (requires WordPress 6.9 or later).
* Local caching of banner assets, privacy policy, and imprint content with hourly scheduled sync.
* Subresource Integrity (SRI) support for the banner loader script.
* Debug logging with configurable log levels.
* Full internationalization with German and English translations.
