#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

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

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

#Options

#debug

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

#percent

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

#appName

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

#subscriptionUrl

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

#subscriptionButtonEnabled

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

#newsletterName

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

#newsletterId

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

#linkUrl

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

#loginUrl

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

#loginButtonEnabled

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

#alternativeWidget

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

#alternativeEnabled

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

#dataPolicyUrl

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

#paywallLoadTimeout

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

#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.

#signatureEnabled

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

#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.

#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).

#locale

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

#trackOriginalAction

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

#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.