Reference

Guide

site.changeTitle:before

$site, $title, $languageCode

Example

/site/config/config.php
return [
    'hooks' => [
        'site.changeTitle:before' => function ($site, $title, $languageCode) {
            // your code goes here
        }
    ]
]