This article is not available in your language, so the default english version is displayed instead.

#Configuration

While the default configuration works for most use cases, you might want to configure some custom behaviors.
ℹ️ Your Dashboard configuration will override these configuration values unless they have been set with a read-only mode.

#Usage

func config(_ config: [String: Any], _ readOnly: Bool = false) -> Void

#Options

#percent

  • Type: Int
  • Défaut: 80
Percentage of content you want to be hidden/stripped when using the embedded display mode.

#app_name

  • Type: String
  • Défaut: ''
Used to set your media's display name for some widgets. This value may be overridden by Dashboard configuration.

#subscription_url

  • Type: String
  • Défaut: nil
Your subscription page URL. The subscription widget will redirect the reader to this when they decide to subscribe.
{return_url} variable can be used to get the current URL.
{user_id} variable can be used to get the reader's Poool id.

#subscription_button_enabled

  • Type: Bool
  • Défaut: true
Shows/hides the subscription button on every widget (except “Subscription” and “Invisible unlock”).

#newsletter_name

  • Type: String
  • Défaut: nil
The name of the newsletter, linked to the registered email address of a user on the newsletter widget.

#newsletter_id

  • Type: String
  • Défaut: nil
Id of the newsletter, linked to the registered email address of a user on the newsletter widget.
You will then be able to get all registrations for a particular user through Poool's API.

#login_url

  • Type: String
  • Défaut: nil
Your login page url. A user will be redirected here after clicking on the login button.
{return_url} variable can be used to get the current URL.
{user_id} variable can be used to get the reader's Poool id.

#login_button_enabled

  • Type: Bool
  • Défaut: true
Shows/hides the login button on every widget.

#alternative_enabled

  • Type: Bool
  • Défaut: true
Shows/hides the 'No, thanks' link for several widgets.

#alternative_widget

  • Type: String
  • Valeurs acceptées: 'none', 'gift', 'question', 'subscription', 'newsletter'
  • Défaut: 'none'
Overrides the default alternative action used by several widgets.

#context

  • Type: String
  • Défaut: nil
Used to assign a particular custom context to a reader.
If no context is specified, native contexts or a default one will be used instead.

#cookies_enabled

  • Type: Bool
  • Défaut: false
Enable/disable all tracking actions used by Poool according to the latest GDPR compliancy measures.

#consent_rejection_widget

  • Type: String
  • Valeurs acceptées: 'invisible', 'unlock', 'gift', 'subscription'
  • Défaut: 'subscription'
Allows to define the widget to display by default, if {cookies_enabled} config option is false (cookies consent rejection).

#custom_segment

  • Type: String
  • Défaut: nil
Used to allocate a reader to a custom group previously created in Poool's Dashboard.

#data_policy_url

  • Type: String
  • Défaut: nil
Link URL shown inside widgets that require the collection of user information.
{return_url} variable can be used to get the current URL.
{user_id} variable can be used to get the reader's Poool id.

#paywall_load_timeout

  • Type: Int
  • Défaut: 10000
Defines the default wait time for the Paywall to be fully displayed. After this time has lapsed, the onError event is triggered so that you can display a backup paywall.

#custom_reader_id

  • Type: String
  • Défaut: nil
Used to assign your own unique custom identifier to one of your readers.

#default_widget

  • Type: String
  • Valeurs acceptées: 'invisible', 'unlock', 'gift', 'subscription'
  • Défaut: 'subscription'
Used to defined a widget to display in case of network error.
It is then possible to unlock the content manually (ex: gift, etc..) or automatically with invisible.