PelcroPaywallDisplayed
Fired when paywall is displayed
Overview
Fired when a paywall modal or restriction is displayed to the user. This indicates the user does not have access to the content.
Triggered By
- Automatic paywall initialization during boot
- Manual paywall trigger via
Pelcro.paywall.displayPaywall() - Content matching a paywall rule
Event Detail
The event.detail object contains information about the displayed paywall:
| Property | Type | Description |
|---|---|---|
paywall | object | The paywall configuration |
rule | object | The matched paywall rule |
Example
document.addEventListener('PelcroPaywallDisplayed', (event) => {
console.log('Paywall displayed');
// Track paywall impression
analytics.track('Paywall Displayed', {
pageUrl: window.location.href
});
// Hide premium content indicators
hidePremiumContentPreview();
});Related
- Events Overview - All available events
- PelcroPaywallNotDisplayed - When user has access
- PelcroPaywallMatch - When content matches a rule
- Paywall Module - Paywall methods
Updated 1 day ago
