Skip to main content

Poool Access – How do I set up content access for my subscribers?

In this article, you'll find the available methods to configure content access for your subscribed readers

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

Once your content blocking scenarios are set up, you want to ensure that the content remains accessible to your readers who have subscriber rights.

Several methods can be used to do this.

💡 Managing access requires implementing logic on the technical side, regardless of your chosen option. In both cases, the prerequisite is reliable information on the client side (cookie, localStorage, session, JS variable, etc.) indicating whether the user is a subscriber.

Option #1: Do not load Poool for subscribed users

The most commonly used and safest method is not to load the Poool script when the user has a subscriber status.

This requires checking whether the user is subscribed, and if not, then loading the Poool script.

// Example: subscription variable defined according to your integration
const isSubscriber = window.user?.isSubscriber ;

// We only load Poool if the user is NOT subscribed
if (!isSubscriber) {
const script = document.createElement('script');
script.src = 'https://cdn.poool.fr/access.min.js';
script.async = true;
script.onload = () => {
Poool.Access.init({
appId: 'votre_app_id',
// additional conditin here if needed
});
};
document.head.appendChild(script);
}

Option #2: Assign a user to a custom “subscriber” context

This solution allows you to manage subscribers through scenarios in the platform.

On the technical side, once the subscriber information is retrieved, you must assign it to the custom context "subscriber".

access.config('context', 'subscriber');

On the Dashboard side, you can create a "subscriber" context and define a scenario within it.

For example, choosing an “Invisible Unlock” will unlock all content, but you can also customize scenarios specifically for this group.

💡 This option requires special attention to the default behavior, which activates in case of an error.

If we cannot communicate with your Dashboard within 10 seconds, a timeout triggers and a default paywall appears.

In this specific case, you will need to ensure that the content remains unlocked for subscribed users. Our documentation to configure the behavior in case of error covers this topic in detail.

Did this answer your question?