diff --git a/composer.json b/composer.json index 9958b1bac..87044e447 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,6 @@ "drupal/acquia_cms_tour": "dev-develop", "drupal/consumer_image_styles": "^4.0", "drupal/gin": "^3.0@RC", - "drupal/google_analytics": "dev-3430780-automated-drupal-11", "drupal/google_tag": "^2.0", "drupal/honeypot": "^2.1", "drupal/recaptcha": "^3.2", @@ -237,10 +236,6 @@ "type": "vcs", "url": "https://git.drupalcode.org/issue/consumer_image_styles-3429496.git" }, - "google_analytics": { - "type": "vcs", - "url": "https://git.drupalcode.org/issue/google_analytics-3430780.git" - }, "config_filter": { "type": "vcs", "url": "https://git.drupalcode.org/issue/config_filter-3428542.git" diff --git a/composer.lock b/composer.lock index 234a05ee2..e015cd2a8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "27bccd4f0c31eb8011206ae736f01300", + "content-hash": "4a9b1a3321b7089b2e7d3704d7302d8f", "packages": [ { "name": "acquia/acquia-cms-starterkit", @@ -2848,7 +2848,7 @@ "dist": { "type": "path", "url": "./modules/acquia_cms_tour", - "reference": "764e6fafa17d35fc38bf3f4642f0f70b3a8afbbb" + "reference": "04e968e9b96a2b1fb974296aee91951ec849f6b9" }, "require": { "drupal/acquia_cms_common": "^1.9 || ^2.1 || ^3.1", @@ -2856,7 +2856,6 @@ }, "require-dev": { "drupal/acquia_cms_place": "^1", - "drupal/google_analytics": "dev-3430780-automated-drupal-11", "drupal/recaptcha": "^3" }, "type": "drupal-module", @@ -5256,40 +5255,6 @@ } ] }, - { - "name": "drupal/google_analytics", - "version": "dev-3430780-automated-drupal-11", - "source": { - "type": "git", - "url": "https://git.drupalcode.org/issue/google_analytics-3430780.git", - "reference": "dcccc1d4332b3134b54a178a23114631c7780a7f" - }, - "require-dev": { - "drupal/token": "^1.7" - }, - "type": "drupal-module", - "extra": { - "branch-alias": { - "dev-4.x": "4.x-dev" - } - }, - "license": [ - "GPL-2.0-or-later" - ], - "authors": [ - { - "name": "See contributors", - "homepage": "https://www.drupal.org/node/49388/committers" - } - ], - "description": "Allows your site to be tracked by Google Analytics by adding a Javascript tracking code to every page.", - "homepage": "https://www.drupal.org/project/google_analytics", - "support": { - "issues": "https://www.drupal.org/project/issues/google_analytics", - "source": "https://git.drupalcode.org/project/google_analytics" - }, - "time": "2024-08-29T22:35:14+00:00" - }, { "name": "drupal/google_tag", "version": "2.0.6", @@ -7111,7 +7076,7 @@ "homepage": "https://www.drupal.org/user/124705" }, { - "name": "Nick_vh", + "name": "nick_vh", "homepage": "https://www.drupal.org/user/122682" } ], @@ -19823,14 +19788,12 @@ "drupal/acquia_cms_toolbar": 20, "drupal/acquia_cms_tour": 20, "drupal/gin": 5, - "drupal/google_analytics": 20, "drupal/sitestudio_config_management": 20, - "drupal/sitestudio_gin": 20, - "drupal/acquia_dam": 20 + "drupal/sitestudio_gin": 20 }, "prefer-stable": true, "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.3.0" } diff --git a/modules/acquia_cms_tour/composer.json b/modules/acquia_cms_tour/composer.json index d8f904d41..ca400c78d 100644 --- a/modules/acquia_cms_tour/composer.json +++ b/modules/acquia_cms_tour/composer.json @@ -9,7 +9,6 @@ }, "require-dev": { "drupal/acquia_cms_place": "^1", - "drupal/google_analytics": "dev-3430780-automated-drupal-11", "drupal/recaptcha": "^3" }, "config": { diff --git a/modules/acquia_cms_tour/src/Controller/DashboardController.php b/modules/acquia_cms_tour/src/Controller/DashboardController.php index c76cb7900..cb68b3e61 100644 --- a/modules/acquia_cms_tour/src/Controller/DashboardController.php +++ b/modules/acquia_cms_tour/src/Controller/DashboardController.php @@ -226,7 +226,7 @@ public function content() { $form['help_text'] = [ '#type' => 'markup', '#markup' => $this->t("

It seems like you have installed minimal Acquia CMS, which does not have any specific configurations. You are all set. Once you enable any of the modules supported by the wizard, they should start appearing here. - (ex. google_analytics, gecoder, recaptcha, cohesion etc.).

"), + (ex. gecoder, recaptcha, cohesion etc.)."), ]; } $form['check_total']['#value'] = $total; diff --git a/modules/acquia_cms_tour/src/Plugin/AcquiaCmsTour/GoogleAnalyticsForm.php b/modules/acquia_cms_tour/src/Plugin/AcquiaCmsTour/GoogleAnalyticsForm.php deleted file mode 100644 index be4e4f469..000000000 --- a/modules/acquia_cms_tour/src/Plugin/AcquiaCmsTour/GoogleAnalyticsForm.php +++ /dev/null @@ -1,139 +0,0 @@ -module; - if ($this->isModuleEnabled()) { - $configured = $this->getConfigurationState(); - if ($configured) { - $form['check_icon'] = [ - '#prefix' => '', - '#suffix' => "", - ]; - } - - $module_path = $this->moduleHandler->getModule($module)->getPathname(); - $module_info = $this->infoParser->parse($module_path); - $form[$module] = [ - '#type' => 'details', - '#title' => $module_info['name'], - '#collapsible' => TRUE, - '#collapsed' => TRUE, - ]; - - $form[$module]['web_property_id'] = [ - '#type' => 'textfield', - '#required' => TRUE, - '#title' => $this->t('Web Property ID'), - '#placeholder' => 'UA-xxx-xxx-xxx', - '#default_value' => $this->config('google_analytics.settings')->get('account'), - '#prefix' => '
' . $module_info['description'], - '#suffix' => "
", - ]; - $form[$module]['actions']['submit'] = [ - '#type' => 'submit', - '#value' => 'Save', - '#prefix' => '
', - ]; - $form[$module]['actions']['ignore'] = [ - '#type' => 'submit', - '#value' => 'Ignore', - '#limit_validation_errors' => [], - '#submit' => ['::ignoreConfig'], - ]; - if (isset($module_info['configure'])) { - $form[$module]['actions']['advanced'] = [ - '#prefix' => '
', - '#markup' => $this->linkGenerator->generate( - 'Advanced', - Url::fromRoute($module_info['configure']) - ), - '#suffix' => "
", - ]; - $form[$module]['actions']['advanced']['information'] = [ - '#prefix' => 'i', - '#suffix' => "", - ]; - $form[$module]['actions']['advanced']['tooltip-text'] = [ - '#prefix' => '', - '#markup' => $this->t("Opens Advance Configuration in new tab"), - '#suffix' => "
", - ]; - } - } - return $form; - } - - /** - * {@inheritdoc} - */ - public function submitForm(array &$form, FormStateInterface $form_state) { - $property_id = $form_state->getValue(['web_property_id']); - if ($property_id) { - $this->config('google_analytics.settings')->set('account', $property_id)->save(); - $this->state->set('google_analytics_progress', TRUE); - $this->messenger()->addStatus('The configuration options have been saved.'); - } - // Update state. - $this->setConfigurationState(); - } - - /** - * {@inheritdoc} - */ - public function ignoreConfig(array &$form, FormStateInterface $form_state) { - $this->setConfigurationState(); - } - - /** - * {@inheritdoc} - */ - public function checkMinConfiguration() { - $account = $this->config('google_analytics.settings')->get('account'); - return $account ? TRUE : FALSE; - } - -} diff --git a/modules/acquia_cms_tour/tests/src/Functional/GoogleAnalyticsTest.php b/modules/acquia_cms_tour/tests/src/Functional/GoogleAnalyticsTest.php deleted file mode 100644 index 445fe7ad1..000000000 --- a/modules/acquia_cms_tour/tests/src/Functional/GoogleAnalyticsTest.php +++ /dev/null @@ -1,81 +0,0 @@ -assertSession(); - - $account = $this->drupalCreateUser(['access acquia cms tour dashboard']); - $this->drupalLogin($account); - - // Visit the tour page. - $this->drupalGet('/admin/tour/dashboard'); - $assert_session->statusCodeEquals(200); - $container = $assert_session->elementExists('css', '.acquia-cms-google-analytics-form'); - // Assert that save and advanced buttons are present on form. - $assert_session->buttonExists('Save'); - // Assert that the expected fields show up. - $assert_session->fieldExists('Web Property ID'); - // Save Web Property ID. - $dummy_web_property_id = 'UA-334567-6789078'; - $container->fillField('edit-web-property-id', $dummy_web_property_id); - $container->pressButton('Save'); - $this->assertTrue($this->isValidPropertyId($dummy_web_property_id)); - $assert_session->pageTextContains('The configuration options have been saved.'); - // Test that the config values we expect are set correctly. - $google_tag_prop_id = $this->config('google_analytics.settings')->get('account'); - $this->assertSame($google_tag_prop_id, $dummy_web_property_id); - } - - /** - * Function to check GA web property id. - */ - public function isValidPropertyId($dummy_web_property_id) { - if (!preg_match('/^UA-\d+-\d+$/', $dummy_web_property_id)) { - return FALSE; - } - return TRUE; - } - -} diff --git a/modules/acquia_cms_tour/tests/src/Kernel/AcquiaTourDashboardTest.php b/modules/acquia_cms_tour/tests/src/Kernel/AcquiaTourDashboardTest.php index 0c5965156..dd86497aa 100644 --- a/modules/acquia_cms_tour/tests/src/Kernel/AcquiaTourDashboardTest.php +++ b/modules/acquia_cms_tour/tests/src/Kernel/AcquiaTourDashboardTest.php @@ -43,7 +43,6 @@ class AcquiaTourDashboardTest extends KernelTestBase { public function testAcquiaCmsTourPlugin() { $expected_plugin_order = [ 'geocoder', - 'google_analytics', 'google_tag', 'recaptcha', ];