# Configuration

Learn about the settings accepted by the module.

The module reads its configuration from your site's `settings.php` (or `settings.local.php`), where each setting is a top-level key prefixed with `croct.`. Only the application ID and API key are required, and everything else has sensible defaults.

**settings.php**

```php
$settings['croct.app_id'] = '<APPLICATION_ID>';
$settings['croct.api_key'] = '<API_KEY>';
```

Drupal compiles `settings.php` into its cached container, so rebuild the cache with `drush cr` after changing any value.

## Settings

The following list describes the available settings:

- `app_id`: `string`

  The ID of the application.

  You can find it on the [Integration page](https://app.croct.com/redirect/organizations/-organization-/workspaces/-workspace-/applications/-application-/integration) of your application.

- `api_key`: `string`

  The API key used to [sign visitor tokens](/explanation/application/signed-tokens).

  See [API keys](/explanation/application/api-keys) for more information.

- `debug`: `boolean` (optional) (default: `false`)

  Whether to enable [debug mode](/reference/sdk/javascript/troubleshooting/debugging#enable-debug-mode) on the client-side SDK.

  When enabled, the browser SDK logs detailed information to the console.

- `script.url`: `string` (optional)

  The URL the client-side SDK loader is served from.

  Defaults to the Croct CDN. Set it to a first-party path on your own domain to serve the loader from the same origin, or to a pinned version.

- `script.mode`: `string` (optional) (default: `defer`)

  The loading strategy for the script.

  The following values are supported:

  | Value   | Description                                                |
  | ------- | ---------------------------------------------------------- |
  | `defer` | Loads in the background and runs after the page is parsed. |
  | `async` | Loads in the background and runs as soon as it is ready.   |
  | `sync`  | Loads and runs immediately, blocking page rendering.       |

- `storyblok.enabled`: `boolean` (optional) (default: `true`)

  Whether to personalize Storyblok content automatically.

  Requires [`croct/plug-storyblok`](https://github.com/croct-tech/plug-storyblok-php) and a bound Storyblok Stories API.
