/**
  * Register the application services.
  */
 public function register()
 {
     $this->app['googletagmanager'] = $this->app->share(function ($app) {
         $googleTagManager = new GoogleTagManager($app['config']->get('googletagmanager::id'));
         if ($app['config']->get('googletagmanager::enabled') === false) {
             $googleTagManager->disable();
         }
         return $googleTagManager;
     });
     $this->app->bind('Spatie\\GoogleTagManager\\GoogleTagManager', 'googletagmanager');
 }
 /**
  * Register the application services.
  */
 public function register()
 {
     $this->mergeConfigFrom(__DIR__ . '/../resources/config/config.php', 'googletagmanager');
     $googleTagManager = new GoogleTagManager(config('googletagmanager.id'));
     if (config('googletagmanager.enabled') === false) {
         $googleTagManager->disable();
     }
     $this->app->instance('Spatie\\GoogleTagManager\\GoogleTagManager', $googleTagManager);
     $this->app->alias('Spatie\\GoogleTagManager\\GoogleTagManager', 'googletagmanager');
     if (is_file(config('googletagmanager.macroPath'))) {
         include config('googletagmanager.macroPath');
     }
 }