Skip to content

Commit 3e03621

Browse files
feat: Add GA4 tracking for Gemini CLI extension (#9124)
* feat: Add GA4 tracking for Gemini CLI extension This change adds a new parameter `gemini_cli_extension` to the MCP GA4 tracking when the `experimental:mcp` command is run. This parameter is set to "true" when the `IS_GEMINI_CLI_EXTENSION` environment variable is set, and "false" otherwise. This will allow us to track the usage of the Gemini CLI extension. * feat: Add GA4 tracking for Gemini CLI extension This change adds a new parameter `gemini_cli_extension` to the MCP GA4 tracking when the `experimental:mcp` command is run. This parameter is set to "true" when the `IS_GEMINI_CLI_EXTENSION` environment variable is set, and "false" otherwise. This will allow us to track the usage of the Gemini CLI extension. (tests for private method removed per PR feedback) --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Joe Hanley <[email protected]>
1 parent c971aee commit 3e03621

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/mcp/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,14 @@ export class FirebaseMcpServer {
8888
): Promise<void> {
8989
// wait until ready or until 2s has elapsed
9090
if (!this.clientInfo) await timeoutFallback(this.ready(), null, 2000);
91-
const clientInfoParams = {
91+
const clientInfoParams: {
92+
mcp_client_name: string;
93+
mcp_client_version: string;
94+
gemini_cli_extension: string;
95+
} = {
9296
mcp_client_name: this.clientInfo?.name || "<unknown-client>",
9397
mcp_client_version: this.clientInfo?.version || "<unknown-version>",
98+
gemini_cli_extension: process.env.IS_GEMINI_CLI_EXTENSION ? "true" : "false",
9499
};
95100
return trackGA4(event, { ...params, ...clientInfoParams });
96101
}

0 commit comments

Comments
 (0)