PelcroAdBlockTestComplete

Fired when ad blocker detection test completes

Overview

Fired when the ad blocker detection test completes, regardless of the result. This event always fires after the test, followed by either PelcroAdBlockDetected or PelcroAdBlockDisabled.


When It Fires

This event fires during boot after ad blocker detection completes.


Event Detail

The event.detail contains the ad block status:

ValueDescription
0No ad blocker
1Ad blocker detected

Example

document.addEventListener('PelcroAdBlockTestComplete', (event) => {
  const status = event.detail;

  console.log(`Ad block test complete. Status: ${status}`);

  // Handle result
  if (status === 1) {
    console.log('User has ad blocker');
  } else {
    console.log('User does not have ad blocker');
  }
});

Event Sequence

Ad block events fire in this order:

  1. PelcroAdBlockTestComplete - Test finished (always fires)
  2. Then either:
    • PelcroAdBlockDetected - If ad blocker found
    • PelcroAdBlockDisabled - If no ad blocker

Related