function google_optimize_install in Google Optimize 8
Implements hook_install().
Check that Google Analytics is installed and configured.
File
- ./
google_optimize.install, line 13 - Installation file for Google Optimize module.
Code
function google_optimize_install() {
$config = Drupal::config('google_analytics.settings');
if (!$config
->get('account') ?: '') {
Drupal::messenger()
->addError(t('Unable to get the Google Analytics account! Is Google Analytics installed and configured with your Google Analytics account ID?'));
}
}