PelcroPaywallMatch
Fired when content matches a paywall rule
Overview
Fired when the current page content matches a paywall rule. This event fires before the paywall decision is made (displayed or not displayed).
Triggered By
- Paywall initialization evaluating page content against rules
Event Detail
The event.detail object contains the visit record:
| Property | Type | Description |
|---|---|---|
visits | number | Number of visits to paywalled content |
limit | number | Configured visit limit |
Example
document.addEventListener('PelcroPaywallMatch', (event) => {
const record = event.detail;
console.log(`Content matched paywall rule`);
console.log(`Visits: ${record.visits} / ${record.limit}`);
// Track content match
analytics.track('Paywall Content Match', {
pageUrl: window.location.href,
visits: record.visits
});
});Event Sequence
When content is paywalled, events fire in this order:
PelcroPaywallMatch- Content matches a rule- Then either:
PelcroPaywallDisplayed- User doesn't have accessPelcroPaywallNotDisplayed- User has access
Related
- Events Overview - All available events
- PelcroPaywallDisplayed - When paywall is shown
- PelcroPaywallNotDisplayed - When user has access
Updated 1 day ago
