# Making a Plugin Configurable

Some times developers may need to make their plugins configurable, this may even be necessary in some cases. For example, a Google Analytics plugin may need to have a configuration for tracking code, as this value is different for every project.

In BlueBase it is very each to achieve this using the [Configs](https://bluebase.gitbook.io/core/key-concepts/configs) API. Just set or get a config value anywhere in the plugin's business logic.

There are times, when you may need to define default values for plugin configurations as well. To do this, create a `defaultConfigs` property in your plugin as shown below:

```typescript
import { createPlugin } from '@bluebase/core';

export const ExamplePlugin = createPlugin({

    key: 'example',
    name: 'Example Plugin',

    defaultConfigs: {
        'plugin.example.foo': 'bar'
    },

    // ... add other configs, i.e. themes, filters, etc
});
```

BlueBase will automatically set this value in the Config registry, if a custom value isn't provided.

## Plugin Configs Nomenclature

In BlueBase, we use the following naming convention for configs belonging to plugins:

```
plugin.{key}.{config}
```

So, as shown in the example plugin above, a config `foo` for a plugin with key `example` becomes:

```
pluign.example.foo
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bluebase.gitbook.io/core/key-concepts/plugins/making-a-plugin-configurable.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
