---
title: "Global Configuration"
description: "Set the analysis to run on publish, the default log level, and the proxy that fetches pages from another origin."
canonical_url: "https://kirby.tools/docs/seo-audit/configuration/global"
---

# Global Configuration

> Set the analysis to run on publish, the default log level, and the proxy that fetches pages from another origin.

Most of the SEO Audit configuration can be done in your blueprints per view button or section. Additionally, you can configure internal handling of the plugin globally in your `config.php` file.

## Global Defaults

### `analyzeOn` <u-badge className="align-middle,ml-2,rounded-full!" label="String" variant="subtle"></u-badge>

Runs the analysis on its own after the editor publishes their changes, so the [rating](/docs/seo-audit/guide/ratings) keeps up with the content. Changing the status of a page does not count. The run is silent: no dialog opens and no notification appears. The dot and the rating update, and a section on the same view shows the new report. The only trigger is `publish`, and the option is off by default. A blueprint can turn it on or off per view button or section with the [`analyzeOn`](/docs/seo-audit/configuration/local#analyzeon) property.

```php [site/config/config.php]
return [
    'johannschopplich.seo-audit' => [
        'analyzeOn' => 'publish'
    ]
];
```

### `logLevel` <u-badge className="align-middle,ml-2,rounded-full!" label="String" variant="subtle"></u-badge>

Default logging level for the analysis. Options: `error`, `warn` (default), `info`, and `debug`. Inspect the browser console to see the logs.

```php [site/config/config.php]
return [
    'johannschopplich.seo-audit' => [
        'logLevel' => 'info'
    ]
];
```

## Proxy Configuration

The proxy fetches a preview URL whose origin differs from the Panel's. A same-origin preview URL is fetched by the browser, and none of the options below apply.

### `urlResolver` <u-badge className="align-middle,ml-2,rounded-full!" label="Closure" variant="subtle"></u-badge>

The `urlResolver` property accepts a closure that receives the preview URL and returns the URL the proxy fetches instead. It must return a non-empty string, otherwise the request fails. This is useful if you run Kirby inside Docker containers and need to point the URL at the host machine:

```php [site/config/config.php]
return [
    'johannschopplich.seo-audit' => [
        'proxy' => [
            'urlResolver' => function (string $url) {
                $uri = new \Kirby\Http\Uri($url);

                if ($uri->domain() === '127.0.0.1:3000') {
                    $uri->setHost('host.docker.internal');
                }

                return $uri->toString();
            }
        ]
    ]
];
```

### `params` <u-badge className="align-middle,ml-2,rounded-full!" label="Array" variant="subtle"></u-badge>

Any parameter supported by Kirby's [`Remote::request()`](https://getkirby.com/docs/reference/objects/http/remote/request#params-array) method can be passed to the proxy API. This is useful if you need to authenticate against the preview URL:

```php [site/config/config.php]
return [
    'johannschopplich.seo-audit' => [
        'proxy' => [
            'params' => [
                'basicAuth' => 'user:password'
            ]
        ]
    ]
];
```

## Custom Plugin Translations

If you prefer to overwrite the default translations of the plugin, you can do so by adding translations for your language in the `languages` directory of your Kirby installation.

<note>

See the plugin's [`translations.php`](https://github.com/kirby-tools/kirby-seo-audit/blob/main/src/extensions/translations.php) for the full list of translation keys.

</note>

For example, to change the translation of the analyze button to `Run analysis` in English, append the following `translations` array to the `languages/en.php` file:

```php [languages/en.php]
return [
    'code' => 'en',
    'name' => 'English',
    // ... Other language configuration
    'translations' => [
        'johannschopplich.seo-audit.analyze' => 'Run analysis'
    ]
];
```

---

Every page of this site as Markdown: <https://kirby.tools/sitemap.md>
