> For the complete documentation index, see [llms.txt](https://community.commandersact.com/customer-success/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://community.commandersact.com/customer-success/expand-your-uses/consent-management/content-mask-contextualisation-of-consent.md).

# Content Mask (Contextualisation of consent)

This guide details how to implement content masks to block third-party scripts until consent is obtained, while offering contextual reactivation.

### 1. Business Value: Maintain engagement without compromising compliance

Blocking third-party cookies outright can leave blank spaces or errors on your site (e.g., a video that won't load).

* **Smooth User Experience (UX)**: Instead of a blank space, the user sees an informative message explaining how to access the content.
* **Strict compliance**: You guarantee that no hits are sent to third-party domains (Google, Facebook, etc.) without prior consent.
* **Maximising opt-**&#x69;n: By requesting consent at the precise moment when the user wants to consume content, you increase your chances of getting a positive response.

### 2. Implementation methodology

#### Step A: Identification of third-party content

Identify the elements of your site that call on external domains before consent:

* Video players (YouTube, Vimeo, Dailymotion).
* Interactive maps (Google Maps).
* Social media widgets (Twitter feeds, Like buttons).

#### Step B: Configuring the ‘Mask’

In the Commanders Act interface, configure the appearance of your content mask.

* **Design**: Customise the background image, text and button to match your graphic charter.
* **Wording**: Use a catchphrase such as ‘To play this video, you must accept third-party cookies.’
* **Link to category**: Link the mask to the corresponding consent category (e.g. ‘Advertising’ or ‘Social Networks’).

#### Step C: Technical implementation

Replace the src attribute of your iFrames with a neutral attribute (often data-src) to prevent automatic loading.

* **Action**: Add the specific Commanders Act class or attribute to your HTML tag so that the CMP script can inject the mask over the blocked element.

#### Step D: Contextual reactivation

The button on the mask must allow two actions:

1. Open the e-privacy banner for granular choices.
2. Or, ideally, allow ‘quick acceptance’ of the relevant category to display the content immediately.

#### **Step E: Acceptance**

Check that the content remains hidden during private browsing (without consent) and that it unblocks instantly when you click on the mask button.

#### 3. Typical use cases

1. **The ‘Privacy-Ready’ YouTube player:** Rather than blocking YouTube everywhere, display a placeholder image on the video. The user clicks on ‘View video’, consent is recorded for the media category, and the video starts playing.
2. **Store Locator and Google Maps**: Prevent Google from placing cookies as soon as users arrive on your ‘Stores’ page. Hide the map with a ‘Show map’ button that requests consent.
3. **Social feed (Instagram/Twitter):** Prevent social media scripts from loading, which slow down the page and track the user, by replacing them with an informational message.

### 4. Additional resources

To further develop your strategy and discover concrete examples of compliant design and wording, we invite you to consult our comprehensive guide.

{% file src="/files/HdMcm9wbgF0GQD6zvnN2" %}

#### **Need help hiding your third-party content?**

Our consultants can assist you with auditing and designing your Content Masks. **Contact your dedicated consultant or our support team:** <support@commandersact.com>
