Skip to content

Configuration

An overview of all available configuration options.

About Examples

All examples in this section are partial code snippets. They do not represent complete/valid configurations.

credentials

This is the login information required to connect your application to the Kalapa CMP system.

  • Type:
    typescript
    interface Credentials {
      url: string;
      key: string;
      trackingId: string;
    }
    Required: All fields (url, key, trackingId) must be fully filled in.

Details:

  • url: The address of the Kalapa CMP server you are connecting to.

  • key: The API key for authentication.

  • trackingId: Your customer’s tracking ID.

  • Example:

    javascript
      credentials: {
          url: "provided-url",
          key: "provided-key",
          trackingId: "your-customer-tracking-id"
      }

    Note:

  • Security: Store the login information (URL, key, tracking ID) securely.

  • Replace the sample values (provided-url, provided-key, your-customer-tracking-id) with your actual information.

options

guiOptions

Customize the main interface of modals/popups.

  • Type:
    typescript
    interface GuiOptions {
      consentModal?: ConsentModalOptions;
      preferencesModal?: PreferencesModalOptions;
    }

guiOptions.consentModal

  • Type:

    typescript
    interface ConsentModalOptions {
      layout?: string;
      position?: string;
    }
  • Default:

    javascript
    {
        layout: 'cloud',
        position: 'bottom center',
    }
  • Details:

    All options for layout and position.

    LayoutVariant(s)Position-YPosition-X
    boxwide, inlinetop, middle, bottomleft, center, right
    cloudinlinetop, middle, bottomleft, center, right
    bar inlinetop, bottom-

    Note

    The valid value for layout: <layoutName> <layoutVariant>.
    The valid value for position: <positionY> <positionX>.

  • Example:

    javascript
    guiOptions: {
        consentModal: {
            layout: 'cloud inline',
            position: 'bottom center'
        }
    }

guiOptions.preferencesModal

  • Type:

    typescript
    interface PreferencesModalOptions {
      layout?: string;
      position?: string;
    }
  • Default:

    javascript
    {
        layout: 'box',
        position: 'right',
    }
  • Details:

    All options for layout and position.

    LayoutVariant(s)Position-YPosition-X
    box---
    bar wide-left, right

    Note

    The valid value for layout: <layoutName> <layoutVariant>.
    The valid value for position: <positionY> <positionX>.

  • Example:

    javascript
    guiOptions: {
        preferencesModal: {
            layout: 'bar wide',
            position: 'left',
        }
    }

forceConsent

Create a dark overlay and block user interaction on the website until the user gives consent.

  • Type: boolean
  • Default: true

darkMode

Enable/Disable dark mode.

  • Type: boolean
  • Default: false

language

Set the language for the user interface.

  • Type: string
  • Default: en