You are here

function google_analytics_uninstall in Google Analytics 4.x

Same name and namespace in other branches
  1. 8.3 google_analytics.install \google_analytics_uninstall()
  2. 8.2 google_analytics.install \google_analytics_uninstall()

Implements hook_uninstall().

Remove cache directory if module is uninstalled.

File

./google_analytics.install, line 30
Installation file for Google Analytics module.

Code

function google_analytics_uninstall() {
  $javascript_service = \Drupal::service('google_analytics.javascript_cache');
  $javascript_service
    ->clearGoogleAnalyticsJsCache();
}