Skip to content

Remove Ads Conversion ID references from Analytics #11303

@nfmohit

Description

@nfmohit

Feature Description

Now that the Ads Conversion ID setting has been fully migrated from the Analytics module to the Ads module, even with the Ads Conversion ID migration settings notice removed in #10430, we should entirely remove the Ads Conversion ID information from Analytics SettingsView, as it is quite guaranteed that this will no longer appear for users due to the automatic migration (see Core\Util\Migration_1_129_0).

We should also remove the Analytics adsConversionIDMigratedAtMs setting entirely as it is no longer used (I believe it was originally introduced to show the Ads Conversion ID migration settings notice which has been removed).

I believe we will have to preserve the Analytics adsConversionID setting as that is used to operate the migration (see Core\Util\Migration_1_129_0).


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • The Ads Conversion ID should no longer be displayed in the Analytics module's SettingsView.
  • The Ads Conversion ID should no longer be displayed in the Analytics module site health info
  • The adsConversionIDMigratedAtMs setting in the Analytics module should be removed entirely:
    • It should no longer be stored or returned in selectors, settings, or REST responses.
    • Any related logic, references, or code paths using adsConversionIDMigratedAtMs should be removed.
  • The adsConversionID setting in the Analytics module should be preserved (as it is still required for the migration logic in Core\Util\Migration_1_129_0).
    • But adsConversionIDMigratedAtMs can be removed

Implementation Brief

  • Remove the Ads Conversion ID section from the assets/js/modules/analytics-4/components/settings/SettingsView.js by deleting the block in OptionalSettingsView that renders it and its supporting selector usage.
  • In the assets/js/modules/analytics-4/datastore/base.js, remove the adsConversionID and adsConversionIDMigratedAtMs setting from settingSlugs
  • In Google\Site_Kit\Modules\Analytics_4\Settings:
    • Remove adsConversionIDMigratedAtMs from defaults and from the sanitize callback.
  • Add a new migration (next version, e.g., Migration_1_168_0 or whatever the release number is) that removes adsConversionIDMigratedAtMs from Analytics settings if present. Register it alongside existing migrations. Leave Migration_1_129_0 untouched.
  • Site Health “Debug Data” for Analytics already does not surface the Ads Conversion ID; no further changes needed.
  • Ensure no code paths rely on adsConversionIDMigratedAtMs for conditional display or logic in JS or PHP after removal.

Test Coverage

  • Update Analytics 4 settings defaults assertions to remove adsConversionIDMigratedAtMs (e.g., tests/phpunit/integration/Modules/Analytics_4/SettingsTest.php, and tests/phpunit/integration/Modules/Analytics_4Test.php where defaults are asserted).
  • Remove any test expectations or imports for getAdsConversionIDMigratedAtMs (none found beyond the settings view).
  • If there are component tests for the Analytics settings view that snapshot the section with “Ads Conversion ID”, update/remove those snapshots accordingly.

QA Brief

  • Set up Site Kit using version 1.175.0, including Analytics and Ads modules.
  • Upgrade to the latest develop branch using the tester plugin.
  • No error should be observed during the "upgrade".
  • Check Analytics settings in Site Kit:
    • No errors should be observed.
    • No mention of Ads Conversion ID should exist in Analytics. Ads Conversion ID should not be in Analytics settings.

Changelog entry

  • Remove Ads Conversion ID entirely from Analytics module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Module: AnalyticsGoogle Analytics module related issuesP2Low priorityTeam SIssues for Squad 1Type: EnhancementImprovement of an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions