From 19e037e45c6e0c5030d42020d1636a2faabaceba Mon Sep 17 00:00:00 2001 From: Rajeshreeputra Date: Fri, 19 Apr 2024 10:30:36 +0530 Subject: [PATCH] ACMS-3443: Add key to telemetry data to idenfy the new site installations. --- .../config/install/acquia_cms_common.settings.yml | 1 + .../config/schema/acquia_cms_common.schema.yml | 3 +++ .../EventSubscriber/KernelTerminate/AcquiaCmsTelemetry.php | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/modules/acquia_cms_common/config/install/acquia_cms_common.settings.yml b/modules/acquia_cms_common/config/install/acquia_cms_common.settings.yml index 50533de05..b6b2b1d7f 100644 --- a/modules/acquia_cms_common/config/install/acquia_cms_common.settings.yml +++ b/modules/acquia_cms_common/config/install/acquia_cms_common.settings.yml @@ -1,2 +1,3 @@ user_login_redirection: true starter_kit_name: no_starter_kit +new_installation: 1 diff --git a/modules/acquia_cms_common/config/schema/acquia_cms_common.schema.yml b/modules/acquia_cms_common/config/schema/acquia_cms_common.schema.yml index a7129c430..23dd366b6 100644 --- a/modules/acquia_cms_common/config/schema/acquia_cms_common.schema.yml +++ b/modules/acquia_cms_common/config/schema/acquia_cms_common.schema.yml @@ -63,3 +63,6 @@ acquia_cms_common.settings: starter_kit_name: type: string label: 'The starterkit name' + new_installation: + type: boolean + label: 'The new site installation status' diff --git a/modules/acquia_cms_common/src/EventSubscriber/KernelTerminate/AcquiaCmsTelemetry.php b/modules/acquia_cms_common/src/EventSubscriber/KernelTerminate/AcquiaCmsTelemetry.php index b5941c734..18efed180 100644 --- a/modules/acquia_cms_common/src/EventSubscriber/KernelTerminate/AcquiaCmsTelemetry.php +++ b/modules/acquia_cms_common/src/EventSubscriber/KernelTerminate/AcquiaCmsTelemetry.php @@ -212,11 +212,15 @@ private function getAcquiaCmsTelemetryData(): array { 'site_studio_status' => $this->siteStudioStatus(), 'install_time' => $this->state->get('acquia_cms.telemetry.install_time', ''), 'profile' => $this->configFactory->get('core.extension')->get('profile'), + 'new_installation' => $this->configFactory->get('acquia_cms_common.settings')->get('new_installation'), ], 'extensions' => $this->getExtensionInfo(), ]; } + // Set new installation key to FALSE. + $this->configFactory->getEditable('acquia_cms_common.settings')->set('new_installation', 0)->save(TRUE); + return $telemetryData; }