Can you we use defer or async with the ConsentPro script?

Description

Can you we use defer or async with the ConsentPro script?

<script src="https://api.consentpro.com

Hey @hello6!

Do not add async or defer to the Consent Pro script tag itself. Consent Pro needs to evaluate consent as early as possible during page load — if you delay it, it can’t block non-consented tracking scripts in time, which would break your compliance setup.

The recommended placement is directly inside <head>, as early as possible, with no loading attributes:

<!-- Consent Pro script — place at the top of <head>, no async or defer -->
<script src="https://api.consentpro.com/..."></script>

One thing worth clarifying — if you’ve seen “async” mentioned in the Consent Pro docs, that refers to a separate feature: the ability to load third-party scripts (analytics, marketing, etc.) asynchronously after the user grants consent. That’s configured under Banners → Global settings → Load Script Async, and it controls how those third-party scripts load, not the Consent Pro script itself.

So to keep it simple:

  • Consent Pro script → no async, no defer, place it early in <head>
  • Third-party tracked scripts → Consent Pro’s async loading feature handles those :flexed_biceps: