Skip to main content
All Collections
Poool Access - How to configure the behavior in case of errors?
Poool Access - How to configure the behavior in case of errors?

In this article, you will find the key information you need to configure the behavior in case of errors.

Flore Bayle avatar
Written by Flore Bayle
Updated over a month ago

In certain circumstances, an error may prevent communication with the Dashboard. The settings you have defined cannot be applied, and the user might be exposed to a default action.

These errors can be triggered by various factors: slow connection, browser issues, a page that takes too long to load, or third-party scripts causing interference.

On Poool's side, we do everything to maintain peak performance! Our average uptime is 99.99%. Feel free to subscribe to this alert to stay informed 👉 https://status.poool.fr/

Default behavior in case of an error

If we are unable to communicate with your Dashboard within 10 seconds, a timeout is triggered. A default paywall will appear, and we trigger the onError event.

On all premium pages, Poool's default paywall is a subscription paywall (content blocked), with the basic black-and-white appearance shown below:

💡 This default wall will be displayed on all your pages tagged as premium. If you use free contexts, with the page_type: "free", no default paywall will appear, and no content blocking will be active.

For premium pages, to ensure that the user experience is maintained and that the blocking/unblocking of content aligns with your expectations, we describe here the actions available to you.

Full content unblocking

If you wish to offer complete content access, you can configure the onError event to hide the widget and force the content to be unblocked.

access.on('error', (error, event) => {
$('#poool-widget').hide();
event.forceRelease();
});

Choosing the action for the default paywall

With the onError JS event, you can manage your own fallback as you wish.

We also provide the default_widget configuration line. This makes it easy to define the type of paywall you want to display in case of errors.

access.config('default_widget', 'gift');

Several values are possible for this default widget:

  • 'invisible': In this case, you will also need to force the unblocking as explained in the previous paragraph.

  • 'unlock': Content is not blocked, and the automatic unlock banner is displayed at the bottom of the article.

  • 'gift': The article is offered as a gift, and the article is unlocked upon clicking the button.

  • 'subscription': Subscription wall, the default action loaded by Poool.

Customizing the default paywall

Poool's default paywall is a basic, non-branded wall.

Applying styles and setting text

You can customize your default paywall by applying styles and configuring your own texts using the following configuration lines:

access
.styles({
brand_logo: 'https://mon-media.fr/logo.png',
button_color: '#F00',
})
.texts({
no_thanks: 'No I\'m fine thanks',
subscription_title: 'This article is for you!'
});

To change the texts, 👉 here are all the configuration lines available:

This graphical "safety" will allow you to maintain brand experience continuity under all circumstances.

Display the correct subscription and login URLs

If the paywall cannot reach the server, it is likely that it will not retrieve the configured URLs (subscription page URL or login page URL) to provide them to the default paywall. Therefore, it is useful to add these URLs in the JS configuration to correctly redirect users:

The URL to the subscription page

access.config('subscription_url', 'http://mysite.com/subscribe?return_url={return_url}&user_id={user_id}');

The URL to the login page

access.config('login_url', 'http://mysite.com/login?return_url={return_url}&user_id={user_id}');

How to test the default action?

To ensure that the action meets your expectations, we encourage you to test it! To do so, you need to block the API connection to simulate an error scenario.

For example, you can block the API request domain via the console (by blocking the "paywall" request) and check that the displayed element matches your expectations.

You can also find our guide on this topic on the DevHub. Feel free to reach out to us if you have any questions!

Did this answer your question?