From 37ea6f8c0ecd4e2f02f58600e469dc499e06b275 Mon Sep 17 00:00:00 2001 From: Eoin Gallagher Date: Fri, 24 Apr 2026 16:15:38 +0100 Subject: [PATCH 1/6] feat(ai): add MCP activity log link and Tracks analytics events - Add activity log link card to MCP hub (links to calypso-activity-log via siteRawUrl) - Expose siteRawUrl via jetpackAiSettings inline script using Status::get_site_suffix() - Add jp_mcp_settings_viewed on page load, jp_mcp_enabled_toggled on main toggle, and jp_mcp_allowlist_updated on per-tool and category bulk toggles Co-Authored-By: Claude Sonnet 4.6 --- .../plugins/jetpack/_inc/client/ai/main.jsx | 12 ++++- .../jetpack/_inc/client/ai/mcp/index.jsx | 50 ++++++++++++++++++- .../jetpack/_inc/client/ai/mcp/read.jsx | 11 ++++ .../jetpack/_inc/client/ai/mcp/write.jsx | 11 ++++ .../lib/admin-pages/class-jetpack-ai-page.php | 5 +- ...57-jetpack-ai-mcp-activity-log-and-metrics | 4 ++ 6 files changed, 88 insertions(+), 5 deletions(-) create mode 100644 projects/plugins/jetpack/changelog/aiint-357-jetpack-ai-mcp-activity-log-and-metrics diff --git a/projects/plugins/jetpack/_inc/client/ai/main.jsx b/projects/plugins/jetpack/_inc/client/ai/main.jsx index dd89e73fffbe..fceca96cd7de 100644 --- a/projects/plugins/jetpack/_inc/client/ai/main.jsx +++ b/projects/plugins/jetpack/_inc/client/ai/main.jsx @@ -6,9 +6,10 @@ import { AdminPage, JetpackLogo } from '@automattic/jetpack-components'; import { Spinner } from '@wordpress/components'; -import { useCallback, useState } from '@wordpress/element'; +import { useCallback, useEffect, useState } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; import { Notice, Stack } from '@wordpress/ui'; +import analytics from 'lib/analytics'; import McpHub from './mcp/index'; import McpRead from './mcp/read'; import McpSetup from './mcp/setup'; @@ -16,7 +17,7 @@ import McpUpsell from './mcp/upsell'; import { useMcpSettings } from './mcp/use-mcp-settings'; import McpWrite from './mcp/write'; -const { blogId, apiRoot, apiNonce } = window?.jetpackAiSettings ?? {}; +const { blogId, siteRawUrl, apiRoot, apiNonce } = window?.jetpackAiSettings ?? {}; const VIEW_TITLES = { hub: __( 'AI', 'jetpack' ), @@ -74,6 +75,12 @@ export default function App() { const { isLoading, savingToolIds, mcpAbilities, hasMcpAccess, error, updateMcpAbilities } = useMcpSettings(); + useEffect( () => { + if ( ! isLoading && hasMcpAccess ) { + analytics.tracks.recordEvent( 'jp_mcp_settings_viewed' ); + } + }, [ isLoading, hasMcpAccess ] ); + const handleUpdate = useCallback( update => { setSaveError( null ); @@ -138,6 +145,7 @@ export default function App() { { + analytics.tracks.recordEvent( 'jp_mcp_enabled_toggled', { enabled } ); const abilities = {}; if ( enabled ) { readTools.forEach( ( [ toolId ] ) => { @@ -269,6 +289,32 @@ export default function McpHub( { mcpAbilities, blogId, savingToolIds, onNavigat /> ) } + + { isMcpEnabled && siteRawUrl && ( + + + + + + + + { __( 'Activity log', 'jetpack' ) } + + + { __( 'Review recent actions taken by AI agents on your site.', 'jetpack' ) } + + + + + + + + ) } ); } diff --git a/projects/plugins/jetpack/_inc/client/ai/mcp/read.jsx b/projects/plugins/jetpack/_inc/client/ai/mcp/read.jsx index 225011068105..071c9ba35053 100644 --- a/projects/plugins/jetpack/_inc/client/ai/mcp/read.jsx +++ b/projects/plugins/jetpack/_inc/client/ai/mcp/read.jsx @@ -15,6 +15,7 @@ import { import { Fragment, useCallback } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; import { Stack } from '@wordpress/ui'; +import analytics from 'lib/analytics'; import { CATEGORY_ORDER, SUB_CATEGORY_ORDER, @@ -122,6 +123,11 @@ export default function McpRead( { mcpAbilities, blogId, savingToolIds, onUpdate const handleToolChange = useCallback( ( toolId, enabled ) => { + analytics.tracks.recordEvent( 'jp_mcp_allowlist_updated', { + tool_id: toolId, + enabled, + view: 'read', + } ); onUpdate( { sites: [ { @@ -136,6 +142,11 @@ export default function McpRead( { mcpAbilities, blogId, savingToolIds, onUpdate const handleEnableAll = useCallback( ( categoryTools, enabled ) => { + analytics.tracks.recordEvent( 'jp_mcp_allowlist_updated', { + enabled, + tool_count: categoryTools.length, + view: 'read', + } ); const overrides = {}; categoryTools.forEach( ( [ toolId ] ) => { overrides[ toolId ] = enabled; diff --git a/projects/plugins/jetpack/_inc/client/ai/mcp/write.jsx b/projects/plugins/jetpack/_inc/client/ai/mcp/write.jsx index 5e5f060be403..47051728c188 100644 --- a/projects/plugins/jetpack/_inc/client/ai/mcp/write.jsx +++ b/projects/plugins/jetpack/_inc/client/ai/mcp/write.jsx @@ -16,6 +16,7 @@ import { import { Fragment, useCallback } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; import { Stack } from '@wordpress/ui'; +import analytics from 'lib/analytics'; import { CATEGORY_ORDER, SUB_CATEGORY_ORDER, @@ -123,6 +124,11 @@ export default function McpWrite( { mcpAbilities, blogId, savingToolIds, onUpdat const handleToolChange = useCallback( ( toolId, enabled ) => { + analytics.tracks.recordEvent( 'jp_mcp_allowlist_updated', { + tool_id: toolId, + enabled, + view: 'write', + } ); onUpdate( { sites: [ { @@ -137,6 +143,11 @@ export default function McpWrite( { mcpAbilities, blogId, savingToolIds, onUpdat const handleEnableAll = useCallback( ( categoryTools, enabled ) => { + analytics.tracks.recordEvent( 'jp_mcp_allowlist_updated', { + enabled, + tool_count: categoryTools.length, + view: 'write', + } ); const overrides = {}; categoryTools.forEach( ( [ toolId ] ) => { overrides[ toolId ] = enabled; diff --git a/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-ai-page.php b/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-ai-page.php index 56aa70d4f69a..29934035a106 100644 --- a/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-ai-page.php +++ b/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-ai-page.php @@ -10,6 +10,7 @@ use Automattic\Jetpack\Admin_UI\Admin_Menu; use Automattic\Jetpack\Connection\Manager as Connection_Manager; +use Automattic\Jetpack\Status; if ( ! defined( 'ABSPATH' ) ) { exit( 0 ); @@ -77,7 +78,8 @@ public function page_admin_scripts() { $script_version = $asset_manifest['version']; } - $blog_id = Connection_Manager::get_site_id( true ); + $blog_id = Connection_Manager::get_site_id( true ); + $site_raw_url = ( new Status() )->get_site_suffix(); wp_enqueue_script( 'jetpack-ai-admin', @@ -94,6 +96,7 @@ public function page_admin_scripts() { 'var jetpackAiSettings = ' . wp_json_encode( array( 'blogId' => $blog_id ? (int) $blog_id : 0, + 'siteRawUrl' => $site_raw_url, 'siteAdminUrl' => admin_url(), 'apiRoot' => esc_url_raw( rest_url() ), 'apiNonce' => wp_create_nonce( 'wp_rest' ), diff --git a/projects/plugins/jetpack/changelog/aiint-357-jetpack-ai-mcp-activity-log-and-metrics b/projects/plugins/jetpack/changelog/aiint-357-jetpack-ai-mcp-activity-log-and-metrics new file mode 100644 index 000000000000..fc3956d90932 --- /dev/null +++ b/projects/plugins/jetpack/changelog/aiint-357-jetpack-ai-mcp-activity-log-and-metrics @@ -0,0 +1,4 @@ +Significance: minor +Type: enhancement + +AI MCP settings: add activity log link and Tracks analytics events (jp_mcp_settings_viewed, jp_mcp_enabled_toggled, jp_mcp_allowlist_updated) From d49951c5598764e45d728e7f9d263128a2277a47 Mon Sep 17 00:00:00 2001 From: Eoin Gallagher Date: Fri, 24 Apr 2026 17:08:06 +0100 Subject: [PATCH 2/6] fix(ai): fix activity log link URL and anchor link styles - Use cloud-activity-log-wp-menu redirect slug with blogId (same as Jetpack sidebar) so the link correctly resolves to wordpress.com on Atomic and cloud.jetpack.com on Jurassic Ninja / self-hosted - Add color/text-decoration resets to __connect-row for when it renders as - Remove siteRawUrl from McpHub props and jetpackAiSettings (not needed) Co-Authored-By: Claude Sonnet 4.6 --- projects/plugins/jetpack/_inc/client/ai/main.jsx | 3 +-- .../plugins/jetpack/_inc/client/ai/mcp/index.jsx | 14 +++----------- .../plugins/jetpack/_inc/client/ai/mcp/style.scss | 9 +++++++++ .../_inc/lib/admin-pages/class-jetpack-ai-page.php | 5 +---- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/projects/plugins/jetpack/_inc/client/ai/main.jsx b/projects/plugins/jetpack/_inc/client/ai/main.jsx index fceca96cd7de..14930be7c514 100644 --- a/projects/plugins/jetpack/_inc/client/ai/main.jsx +++ b/projects/plugins/jetpack/_inc/client/ai/main.jsx @@ -17,7 +17,7 @@ import McpUpsell from './mcp/upsell'; import { useMcpSettings } from './mcp/use-mcp-settings'; import McpWrite from './mcp/write'; -const { blogId, siteRawUrl, apiRoot, apiNonce } = window?.jetpackAiSettings ?? {}; +const { blogId, apiRoot, apiNonce } = window?.jetpackAiSettings ?? {}; const VIEW_TITLES = { hub: __( 'AI', 'jetpack' ), @@ -145,7 +145,6 @@ export default function App() { ) } - { isMcpEnabled && siteRawUrl && ( + { isMcpEnabled && ( diff --git a/projects/plugins/jetpack/_inc/client/ai/mcp/style.scss b/projects/plugins/jetpack/_inc/client/ai/mcp/style.scss index c357c645a6fd..8759f1ee93ae 100644 --- a/projects/plugins/jetpack/_inc/client/ai/mcp/style.scss +++ b/projects/plugins/jetpack/_inc/client/ai/mcp/style.scss @@ -36,6 +36,15 @@ text-align: left; border-radius: 0; + // Reset browser link styles when rendered as + &, + &:visited, + &:hover, + &:active { + color: inherit; + text-decoration: none; + } + &:hover { background: var(--color-surface-backdrop, #f0f0f1); } diff --git a/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-ai-page.php b/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-ai-page.php index 29934035a106..56aa70d4f69a 100644 --- a/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-ai-page.php +++ b/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-ai-page.php @@ -10,7 +10,6 @@ use Automattic\Jetpack\Admin_UI\Admin_Menu; use Automattic\Jetpack\Connection\Manager as Connection_Manager; -use Automattic\Jetpack\Status; if ( ! defined( 'ABSPATH' ) ) { exit( 0 ); @@ -78,8 +77,7 @@ public function page_admin_scripts() { $script_version = $asset_manifest['version']; } - $blog_id = Connection_Manager::get_site_id( true ); - $site_raw_url = ( new Status() )->get_site_suffix(); + $blog_id = Connection_Manager::get_site_id( true ); wp_enqueue_script( 'jetpack-ai-admin', @@ -96,7 +94,6 @@ public function page_admin_scripts() { 'var jetpackAiSettings = ' . wp_json_encode( array( 'blogId' => $blog_id ? (int) $blog_id : 0, - 'siteRawUrl' => $site_raw_url, 'siteAdminUrl' => admin_url(), 'apiRoot' => esc_url_raw( rest_url() ), 'apiNonce' => wp_create_nonce( 'wp_rest' ), From f882074face4d4eff2b007691ce0a666f19d91e7 Mon Sep 17 00:00:00 2001 From: Eoin Gallagher Date: Fri, 24 Apr 2026 22:03:38 +0100 Subject: [PATCH 3/6] fix(ai): fix activity log URL, chevron overflow, and hover corner bleed - Compute activityLogUrl in PHP: use direct wordpress.com/activity-log/$domain on Atomic (matching jetpack-mu-wpcom sidebar behavior) and the cloud redirect for self-hosted, then pass it to JS via jetpackAiSettings - Add box-sizing: border-box to __connect-row so width:100% + padding doesn't overflow the card (fixes chevron appearing outside container) - Add overflow: hidden via __action-card on Cards wrapping connect-rows so hover background respects the card's rounded corners Co-Authored-By: Claude Sonnet 4.6 --- .../plugins/jetpack/_inc/client/ai/main.jsx | 3 +- .../jetpack/_inc/client/ai/mcp/index.jsx | 31 ++++++++++++------- .../jetpack/_inc/client/ai/mcp/style.scss | 5 +++ .../lib/admin-pages/class-jetpack-ai-page.php | 24 +++++++++----- 4 files changed, 43 insertions(+), 20 deletions(-) diff --git a/projects/plugins/jetpack/_inc/client/ai/main.jsx b/projects/plugins/jetpack/_inc/client/ai/main.jsx index 14930be7c514..74af3f37fb90 100644 --- a/projects/plugins/jetpack/_inc/client/ai/main.jsx +++ b/projects/plugins/jetpack/_inc/client/ai/main.jsx @@ -17,7 +17,7 @@ import McpUpsell from './mcp/upsell'; import { useMcpSettings } from './mcp/use-mcp-settings'; import McpWrite from './mcp/write'; -const { blogId, apiRoot, apiNonce } = window?.jetpackAiSettings ?? {}; +const { blogId, activityLogUrl, apiRoot, apiNonce } = window?.jetpackAiSettings ?? {}; const VIEW_TITLES = { hub: __( 'AI', 'jetpack' ), @@ -145,6 +145,7 @@ export default function App() { { isMcpEnabled && ( - + ) } - { isMcpEnabled && ( - + { isMcpEnabled && activityLogUrl && ( + diff --git a/projects/plugins/jetpack/_inc/client/ai/mcp/style.scss b/projects/plugins/jetpack/_inc/client/ai/mcp/style.scss index 8759f1ee93ae..e40dd6b8496a 100644 --- a/projects/plugins/jetpack/_inc/client/ai/mcp/style.scss +++ b/projects/plugins/jetpack/_inc/client/ai/mcp/style.scss @@ -24,8 +24,13 @@ } } + &__action-card { + overflow: hidden; + } + &__connect-row { display: flex; + box-sizing: border-box; gap: 16px; align-items: flex-start; padding: 24px; diff --git a/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-ai-page.php b/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-ai-page.php index 56aa70d4f69a..2920c140b3a1 100644 --- a/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-ai-page.php +++ b/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-ai-page.php @@ -10,6 +10,9 @@ use Automattic\Jetpack\Admin_UI\Admin_Menu; use Automattic\Jetpack\Connection\Manager as Connection_Manager; +use Automattic\Jetpack\Redirect; +use Automattic\Jetpack\Status; +use Automattic\Jetpack\Status\Host; if ( ! defined( 'ABSPATH' ) ) { exit( 0 ); @@ -77,7 +80,13 @@ public function page_admin_scripts() { $script_version = $asset_manifest['version']; } - $blog_id = Connection_Manager::get_site_id( true ); + $blog_id = Connection_Manager::get_site_id( true ); + $site_suffix = ( new Status() )->get_site_suffix(); + // On Atomic, jetpack-mu-wpcom replaces the cloud redirect with a direct WPCOM URL. + // Mirror that behaviour here so the activity log link resolves consistently. + $activity_log_url = ( new Host() )->is_woa_site() + ? 'https://wordpress.com/activity-log/' . $site_suffix + : Redirect::get_url( 'cloud-activity-log-wp-menu', array( 'site' => $blog_id ? $blog_id : $site_suffix ) ); wp_enqueue_script( 'jetpack-ai-admin', @@ -93,12 +102,13 @@ public function page_admin_scripts() { 'jetpack-ai-admin', 'var jetpackAiSettings = ' . wp_json_encode( array( - 'blogId' => $blog_id ? (int) $blog_id : 0, - 'siteAdminUrl' => admin_url(), - 'apiRoot' => esc_url_raw( rest_url() ), - 'apiNonce' => wp_create_nonce( 'wp_rest' ), - 'pluginUrl' => plugins_url( '', JETPACK__PLUGIN_FILE ), - 'upgradeUrl' => 'https://wordpress.com/plans/' . rawurlencode( wp_parse_url( home_url(), PHP_URL_HOST ) ?? '' ), + 'blogId' => $blog_id ? (int) $blog_id : 0, + 'activityLogUrl' => $activity_log_url, + 'siteAdminUrl' => admin_url(), + 'apiRoot' => esc_url_raw( rest_url() ), + 'apiNonce' => wp_create_nonce( 'wp_rest' ), + 'pluginUrl' => plugins_url( '', JETPACK__PLUGIN_FILE ), + 'upgradeUrl' => 'https://wordpress.com/plans/' . rawurlencode( wp_parse_url( home_url(), PHP_URL_HOST ) ?? '' ), ), JSON_UNESCAPED_SLASHES | JSON_HEX_TAG | JSON_HEX_AMP ) . ';', From 22940848d3f57e94b2399a138e8e8062ff821080 Mon Sep 17 00:00:00 2001 From: Eoin Gallagher Date: Fri, 24 Apr 2026 22:54:23 +0100 Subject: [PATCH 4/6] fix(ai): add overflow hidden to access card to fix hover corner bleed on Write row Co-Authored-By: Claude Sonnet 4.6 --- projects/plugins/jetpack/_inc/client/ai/mcp/style.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/plugins/jetpack/_inc/client/ai/mcp/style.scss b/projects/plugins/jetpack/_inc/client/ai/mcp/style.scss index e40dd6b8496a..0a2fa21f645d 100644 --- a/projects/plugins/jetpack/_inc/client/ai/mcp/style.scss +++ b/projects/plugins/jetpack/_inc/client/ai/mcp/style.scss @@ -98,7 +98,7 @@ } &__access-card { - // Override default card margin if any + overflow: hidden; } } From 287db5e218d2f8943410bb7244532f2a45fe6a21 Mon Sep 17 00:00:00 2001 From: Eoin Gallagher Date: Tue, 28 Apr 2026 15:23:21 +0100 Subject: [PATCH 5/6] =?UTF-8?q?fix(ai):=20address=20Copilot=20review=20?= =?UTF-8?q?=E2=80=94=20rename=20Tracks=20events=20and=20fix=20activity=20l?= =?UTF-8?q?og=20URL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Rename all Tracks events from jp_ to jetpack_ prefix so @automattic/jetpack-analytics records them (jp_ events are silently dropped by the analytics library) - Use wp_parse_url(home_url(), PHP_URL_HOST) instead of get_site_suffix() for the Atomic activity log URL to avoid broken links on subdirectory installs where get_site_suffix() can return values containing '::' Co-Authored-By: Claude Sonnet 4.6 --- projects/plugins/jetpack/_inc/client/ai/main.jsx | 2 +- .../_inc/lib/admin-pages/class-jetpack-ai-page.php | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/projects/plugins/jetpack/_inc/client/ai/main.jsx b/projects/plugins/jetpack/_inc/client/ai/main.jsx index 74af3f37fb90..b74c0232d188 100644 --- a/projects/plugins/jetpack/_inc/client/ai/main.jsx +++ b/projects/plugins/jetpack/_inc/client/ai/main.jsx @@ -77,7 +77,7 @@ export default function App() { useEffect( () => { if ( ! isLoading && hasMcpAccess ) { - analytics.tracks.recordEvent( 'jp_mcp_settings_viewed' ); + analytics.tracks.recordEvent( 'jetpack_mcp_settings_viewed' ); } }, [ isLoading, hasMcpAccess ] ); diff --git a/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-ai-page.php b/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-ai-page.php index 2920c140b3a1..12b285dd680f 100644 --- a/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-ai-page.php +++ b/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-ai-page.php @@ -82,10 +82,15 @@ public function page_admin_scripts() { $blog_id = Connection_Manager::get_site_id( true ); $site_suffix = ( new Status() )->get_site_suffix(); + // Use the plain hostname for the Atomic activity log URL — get_site_suffix() can + // include '::' for subdirectory installs, which would break the URL. This matches + // the approach used by jetpack-mu-wpcom for the sidebar Activity Log link. + $site_host = wp_parse_url( home_url(), PHP_URL_HOST ); // On Atomic, jetpack-mu-wpcom replaces the cloud redirect with a direct WPCOM URL. // Mirror that behaviour here so the activity log link resolves consistently. - $activity_log_url = ( new Host() )->is_woa_site() - ? 'https://wordpress.com/activity-log/' . $site_suffix + $activity_log_site = ( is_string( $site_host ) && '' !== $site_host ) ? $site_host : $site_suffix; + $activity_log_url = ( new Host() )->is_woa_site() + ? 'https://wordpress.com/activity-log/' . $activity_log_site : Redirect::get_url( 'cloud-activity-log-wp-menu', array( 'site' => $blog_id ? $blog_id : $site_suffix ) ); wp_enqueue_script( From 914dcfb0198294a8bf05e9a3b410433164e9ead6 Mon Sep 17 00:00:00 2001 From: Eoin Gallagher Date: Tue, 28 Apr 2026 15:24:46 +0100 Subject: [PATCH 6/6] fix(ai): rename remaining jp_ Tracks events to jetpack_ prefix Co-Authored-By: Claude Sonnet 4.6 --- projects/plugins/jetpack/_inc/client/ai/mcp/index.jsx | 2 +- projects/plugins/jetpack/_inc/client/ai/mcp/read.jsx | 4 ++-- projects/plugins/jetpack/_inc/client/ai/mcp/write.jsx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/projects/plugins/jetpack/_inc/client/ai/mcp/index.jsx b/projects/plugins/jetpack/_inc/client/ai/mcp/index.jsx index f0942cf4f4f9..ca24fcf2c1dd 100644 --- a/projects/plugins/jetpack/_inc/client/ai/mcp/index.jsx +++ b/projects/plugins/jetpack/_inc/client/ai/mcp/index.jsx @@ -209,7 +209,7 @@ export default function McpHub( { const handleMcpToggle = useCallback( enabled => { - analytics.tracks.recordEvent( 'jp_mcp_enabled_toggled', { enabled } ); + analytics.tracks.recordEvent( 'jetpack_mcp_enabled_toggled', { enabled } ); const abilities = {}; if ( enabled ) { readTools.forEach( ( [ toolId ] ) => { diff --git a/projects/plugins/jetpack/_inc/client/ai/mcp/read.jsx b/projects/plugins/jetpack/_inc/client/ai/mcp/read.jsx index 071c9ba35053..ead89711ef4c 100644 --- a/projects/plugins/jetpack/_inc/client/ai/mcp/read.jsx +++ b/projects/plugins/jetpack/_inc/client/ai/mcp/read.jsx @@ -123,7 +123,7 @@ export default function McpRead( { mcpAbilities, blogId, savingToolIds, onUpdate const handleToolChange = useCallback( ( toolId, enabled ) => { - analytics.tracks.recordEvent( 'jp_mcp_allowlist_updated', { + analytics.tracks.recordEvent( 'jetpack_mcp_allowlist_updated', { tool_id: toolId, enabled, view: 'read', @@ -142,7 +142,7 @@ export default function McpRead( { mcpAbilities, blogId, savingToolIds, onUpdate const handleEnableAll = useCallback( ( categoryTools, enabled ) => { - analytics.tracks.recordEvent( 'jp_mcp_allowlist_updated', { + analytics.tracks.recordEvent( 'jetpack_mcp_allowlist_updated', { enabled, tool_count: categoryTools.length, view: 'read', diff --git a/projects/plugins/jetpack/_inc/client/ai/mcp/write.jsx b/projects/plugins/jetpack/_inc/client/ai/mcp/write.jsx index 47051728c188..9f0986d2fb8d 100644 --- a/projects/plugins/jetpack/_inc/client/ai/mcp/write.jsx +++ b/projects/plugins/jetpack/_inc/client/ai/mcp/write.jsx @@ -124,7 +124,7 @@ export default function McpWrite( { mcpAbilities, blogId, savingToolIds, onUpdat const handleToolChange = useCallback( ( toolId, enabled ) => { - analytics.tracks.recordEvent( 'jp_mcp_allowlist_updated', { + analytics.tracks.recordEvent( 'jetpack_mcp_allowlist_updated', { tool_id: toolId, enabled, view: 'write', @@ -143,7 +143,7 @@ export default function McpWrite( { mcpAbilities, blogId, savingToolIds, onUpdat const handleEnableAll = useCallback( ( categoryTools, enabled ) => { - analytics.tracks.recordEvent( 'jp_mcp_allowlist_updated', { + analytics.tracks.recordEvent( 'jetpack_mcp_allowlist_updated', { enabled, tool_count: categoryTools.length, view: 'write',