#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: { user_id: String, context_name: String, context_type: String, context_value: String, segment_slug: String, journey_name: String, widget: String, widget_name: 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 } }
Triggered when the paywall is fully loaded and displayed inside the page.

#paywallSeen

  • Arguments: { event: { widget: 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 } }
Triggered when the paywall unlocks the current article.

#register

  • Arguments: { event: { email: String, newsletter_id: String, pass_id: 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, button: String, originalEvent: MouseEvent, url: String } }
Triggered when a user has clicked a subscribe button/link inside the paywall.

#loginClick

  • Arguments: { event: { widget: 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, widget_name: 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, 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, 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, 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, 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: { question_id: String, answer: String } }
Triggered after an answer is chosen in the question widget.
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

  • Arguments: { event: { name: String } }
Triggered after a click on a custom button, created with the design editor.