#Events

Most actions completed by a visitor will trigger custom events for which you will be able to assign a listener.

#Usage

.on(name: String, callback: Function): this

.off(name: String, callback: Function): this

#Available events

#identityAvailable

  • Arguments: { event: { userId: String, contextName: String, contextType: String, contextValue: String, groupSlug: String, scenarioName: String, widget: String, actionName: String, trigger: String, triggerType: String, triggerValue: String } }
Triggered after the first tracking request, when the user ID is available.

#lock

Triggered when the paywall locks the current article.

#ready

  • Arguments: { event: { widget: String, actionName: String, trigger: String, triggerType: String, triggerValue: String } }
Triggered when the paywall is fully loaded and displayed inside the page.

#paywallSeen

  • Arguments: { event: { widget: String, actionName: String, trigger: String, triggerType: String, triggerValue: String } }
Triggered when the paywall has been seen by the user (when it has entered the browser's viewport).

#release

  • Arguments: { event: { widget: String, actionName: String, trigger: String, triggerType: String, triggerValue: String } }
Triggered when the paywall unlocks the current article.

#register

  • Arguments: { event: { email: String, newsletterId: String, passId: String }}
Triggered when a user registers to your newsletter using the newsletter widget or the pass widget.
For example, thanks to this event, you'll be able to save a user's email address using tools such as Mailchimp and Sendgrid.

#subscribeClick

  • Arguments: { event: { widget: String, actionName: String, button: String, originalEvent: MouseEvent, url: String } }
Triggered when a user has clicked a subscribe button/link inside the paywall.

#loginClick

  • Arguments: { event: { widget: String, actionName: String, button: String, originalEvent: MouseEvent, url: String } }
Triggered when a user has clicked a signin button/link inside the paywall.

#discoveryLinkClick

  • Arguments: { event: { widget: String, actionName: String, button: String, originalEvent: MouseEvent, url: String } }
Triggered when a user has clicked the Link Discovery widget's button inside the paywall.

#alternativeClick

  • Arguments: { event: { widget: String, actionName: String, button: String, originalEvent: MouseEvent } }
Triggered when a user has clicked the 'No thanks' link in the widget. Initialy loaded action will be replaced by an alternative one, set up in the dashboard in journey / actions configurations.

#error

  • Arguments: { error: Error, event: { forceRelease: Function } }
Triggered if an unknown/unexpected error has appeared when loading the paywall.

#outdatedBrowser

Triggered if the browser is detected to be too old to run Poool's paywall correctly.

#dataPolicyClick

  • Arguments: { event: { widget: String, actionName: String, button: String, originalEvent: MouseEvent, url: String } }
Triggered when a user has clicked a data information button/link inside the paywall.

#formSubmit

  • Arguments: { event: { name: String, fields: { [fieldKey]: Any, ... }, valid: { [fieldKey]: Boolean, ... } } }
Triggered when a user registers through a form using the Form widget.
For example, thanks to this event, you'll be able to save a user's provided informations using tools such as a DMP.

#facebookLoginClick

  • Arguments: { event: { widget: String, actionName: String, originalEvent: MouseEvent } }
Triggered when a user clicks on Sign-in with Facebook inside the paywall, enabled using facebook_login_enabled option.
Use this event to place your calls to Facebook's login SDK.

#googleLoginClick

  • Arguments: { event: { widget: String, actionName: String, originalEvent: MouseEvent } }
Triggered when a user clicks on Sign-in with Google inside the paywall, enabled using google_login_enabled option.
Use this event to place your calls to Google's login SDK.

#answer

  • Arguments: { event: { questionId: String, answer: String } }
Triggered after an answer is chosen in the question widget.

#consent

Triggered after a click on the consent button. It is then possible to set up your own consent logic.
You can check our cookie-wall with Didomi guide for more information.

#customButtonClick

Event Button
  • Arguments: { event: { name: String, buttonId: String } }
Link Button
  • Arguments: { event: { url: String, buttonId: String } }
Triggered after a click on a button component, used in an advanced appearance or a form.

#externalLinkClick

  • Arguments: { event: { url: String, originalEvent: MouseEvent } }
Triggered after clicking on a link in rich text editor content.