Blocking content until consent is given

Prevent certain content from loading too early

Alamarte Cookie Consent Pro can prevent external content from loading until the visitor has authorised the corresponding category. This is especially useful for videos, maps, iframes and other services that should not be activated before consent is obtained.

Content must be prepared so that it can be blocked.

Alamarte Cookie Consent Pro cannot automatically prevent the loading of every resource that is already being executed normally by the browser. Content that must wait for consent needs to be configured so that the plugin can identify it and activate it only when appropriate.

1. Identify the category

Before modifying the content, determine which consent category the service you want to block belongs to.

Alamarte Cookie Consent Pro uses the Necessary, Analytics, Marketing and Preferences categories.

2. Mark the content

Content that should depend on consent is identified using the attributes used by Alamarte Cookie Consent Pro.

The data-acc-category attribute indicates which category must be authorised before the content can be activated.

3. Prevent the resource from loading directly

For content such as iframes, the external address should not remain in the src attribute because the browser would try to load it immediately.

In these cases, Alamarte Cookie Consent Pro uses data-acc-src until the required consent exists.

4. The plugin activates the content

When the visitor authorises the corresponding category, Alamarte Cookie Consent Pro can restore the pending resource and allow it to load.

If the category remains rejected, the content stays blocked.

Basic iframe example

A normal iframe can contain an address directly in src:

<iframe
    src="https://example.com/content"
    title="External content">
</iframe>

To keep it blocked until, for example, the Marketing category is authorised, remove src and use the Alamarte Cookie Consent Pro attributes:

<iframe
    data-acc-category="marketing"
    data-acc-src="https://example.com/content"
    title="External content">
</iframe>

Do not use src and data-acc-src at the same time for the same resource that you want to keep blocked.

YouTube videos

Videos embedded using an iframe can be prepared so that YouTube does not load until the visitor authorises the corresponding category.

Google Maps and other iframes

The same principle can be used with maps and other external content inserted using an iframe.

Scripts and external services

Some services do not use iframes but external scripts instead. Their preparation depends on the type of integration used and is explained separately.

Always check the code after saving: if you use a visual editor, verify that it has not removed the data-acc-category or data-acc-src attributes. You should also confirm that the src attribute has not been restored automatically on content that you want to block.

trustpilot horizontal

© 2026 Alamarte Ingeniería
Joomla! Design & Development
colombia CO CO

Alamarte Ingeniería Web
Trustpilot
Joomla!

Select your language

ALAMARTE - Ingeniería Web
Cookie preferences saved.