#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 as read-only.

#Usage

fun config(key: String, value: Any? = null, readOnly: Boolean? = null): Access

fun config(mapConfig: Map<String, Any>, readOnly: Boolean? = null): Access

#Options

#alternativeEnabled

  • Type: Boolean
  • Default: true
Enable or disable the alternative widget.

#alternativeWidget

  • Type: String
  • Default: "restriction"
Used to set the alternative widget to display when the user is not allowed to access the content.

#appName

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

#consentRejectionWidget

  • Type: String
  • Accepted values: "invisible", "unlock", "gift", "subscription"
  • Default: "restriction"
Used to set the widget to display by default if the cookiesEnabled config option is false (cookies consent rejection).

#context

  • Type: List<String>
  • Default: null
Used to set the context for the paywall.

#cookiesEnabled

  • Type: Boolean
  • Default: false
Enable or disable all tracking actions used by Poool according to the latest GDPR compliancy measures.

#customReaderId

  • Type: String
  • Default: null
Used to set a custom reader ID.

#customSegment

  • Type: String
  • Default: null
Used to allocate a reader to a custom group previously created in the Dashboard.

#dataPolicyUrl

  • Type: String
  • Default: null
Used to set the URL to redirect the user to when clicking on the data policy widget.

#debug

  • Type: Boolean
  • Default: false
Enable debug mode to see logs in the console.

#defaultWidget

  • Type: String
  • Accepted values: "invisible", "unlock", "gift", "subscription"
  • Default: "restriction"
Used to set the default widget to display when the user is not allowed to access the content.

#forceWidget

  • Type: String
  • Default: null
Force the display of a specific widget.

#linkUrl

  • Type: String
  • Default: null
Used to set the URL to redirect the user to when clicking on the link widget.

#locale

  • Type: String
  • Default: "fr"
Used to set the locale for the paywall.

#loginButtonEnabled

  • Type: Boolean
  • Default: true
Enable or disable the login button.

#loginUrl

  • Type: String
  • Default: null
Used to set the URL to redirect the user to when clicking on the login widget.

#newsletterId

  • Type: String
  • Default: null
Used to set the newsletter ID for the newsletter widget.

#newsletterName

  • Type: String
  • Default: null
Used to set the newsletter name for the newsletter widget.

#paywallLoadTimeout

  • Type: Int
  • Default: 10000
Set the timeout in milliseconds for the paywall to load.

#percent

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

#signatureEnabled

  • Type: Boolean
  • Default: true
Enable or disable the signature widget.

#subscriptionButtonEnabled

  • Type: Boolean
  • Default: true
Enable or disable the subscription button.

#subscriptionUrl

  • Type: String
  • Default: null
Used to set the URL to redirect the user to when clicking on the subscription button.

#trackOriginalAction

  • Type: Boolean
  • Default: false
Enable or disable the tracking of the original action when the user is redirected to the alternative widget.