How to use custom variables with Poool Engage?
The .variable() function allows you to define custom variables that can then be reused inside your paywall text content.
This makes it easier to automatically update certain elements based on values passed from your technical configuration.
Creating your own variables
To go further with variable usage, you can define your own custom variables and use them in the same way as native ones.
To do this, your technical team needs to create these variables in code (this is usually straightforward) 👉 Technical documentation
Once the variables are created, you only need to retrieve their names from your technical team and use them freely in your content.
Use case: multi-language management
In a multi-language context, this feature can be used to automatically display text in the correct language depending on the user’s locale.
Language detection is handled on the technical side, so no configuration is required in the Dashboard.
Example technical setup
Your engineering team prepares translations for each language:
const texts = {
fr: { article: "Article offert" },
en: { article: "Free article" },
es: { article: "ArtÃculo gratuito" }
};
Then, based on the detected locale, the custom variable is set dynamically:
engage.variables('article', texts[locale].article);Using variables in the Dashboard
Once the variable is defined in code, you can simply use it in your element:
{article}The displayed text will automatically adapt to the user’s language:
- 🇫🇷 French user → Article offert
- 🇬🇧 English user → Free article
- 🇪🇸 Spanish user → ArtÃculo gratuito
Example
Below is an example of an element fully built using dynamic variables.

Important note
In this setup, variables are fully defined on the technical side.
This means that in the Dashboard preview, variable values will not be replaced automatically.
You will still see placeholders such as {article}.
On the live site (or staging environment), the variable will be correctly replaced based on the user’s language.
Useful links
Updated on: 04/06/2026
Thank you!
