Google Analytics (unofficial)

Connect Google Analytics to ChatGPT. Query GA4 data in plain English and get instant insights.

我该使用它吗

质量与安全性

A
描述质量
100%
模式完整度
77%
命名质量
80%
投毒风险
100%
权限匹配度
100%
协议合规性
100%

基于对工具定义和协议合规性的自动分析。

上下文开销

~5,684token 数(工具定义)
~12.9 KB典型响应大小
对注意力有显著影响(占 128k 上下文窗口的 4.44%)

这是每次将服务器的工具加载到模型上下文窗口时所消耗的大致 token 数。数值越高,可用于其他任务的注意力就越少。

安装

一键安装

将以下内容添加到你的 `claude_desktop_config.json` 文件中:

{
  "mcpServers": {
    "google-analytics-unofficial": {
      "url": "https://api.safe-mcp.com/mcp"
    }
  }
}

远程端点

https://api.safe-mcp.com/mcpstreamable-http

它能做什么

工具清单

工具(5)

🟢 只读🟡 写入🔴 删除⚪ 未知
🟢marketing_get_sources(sources, surfaceId)

Lists connected and missing GA4, Google Analytics properties, property IDs, web streams, app streams, measurement IDs, Firebase app IDs, Google Search Console sites, Bing Webmaster sites, and current analysis surface mappings. Use this before reporting when property/site selectors are unknown.

输入模式

{
  "type": "object",
  "properties": {
    "sources": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "ga4",
          "search_console",
          "bing_webmaster"
        ]
      },
      "minItems": 1
    },
    "surfaceId": {
      "type": "string",
      "minLength": 1,
      "default": "default"
    }
  },
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

输出模式

{
  "type": "object",
  "properties": {
    "surface": {
      "type": "object",
      "additionalProperties": {}
    },
    "sources": {
      "$ref": "#/properties/surface"
    }
  },
  "required": [
    "surface",
    "sources"
  ],
  "additionalProperties": true,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🟢marketing_get_catalog(source)

Use this when the user wants to discover the canonical marketing reporting graph, available sources, supported metrics, supported dimensions, or which connectors are live today. Each source also reports a `passthrough` field describing whether native fields beyond the curated list are accepted (GA4 accepts any native dimension/metric; Search Console accepts any native dimension; Bing is limited to the curated fields). Do not use this for GA4 account discovery or data retrieval.

输入模式

{
  "type": "object",
  "properties": {
    "source": {
      "type": "string",
      "minLength": 1
    }
  },
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

输出模式

{
  "type": "object",
  "properties": {
    "version": {
      "type": "string"
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": {}
      }
    },
    "metrics": {
      "type": "array",
      "items": {
        "$ref": "#/properties/sources/items"
      }
    },
    "dimensions": {
      "type": "array",
      "items": {
        "$ref": "#/properties/sources/items"
      }
    }
  },
  "required": [
    "version",
    "sources",
    "metrics",
    "dimensions"
  ],
  "additionalProperties": true,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🟢marketing_get_report(propertyId, appStreamId, dateRanges, metrics, dimensions, ...)

Primary reporting tool for a given GA4 property or site. Use for totals, trends, and breakdowns by dimension across GA4 website traffic and app analytics, Google Search Console site traffic, and Bing Webmaster — including last-30-days summaries, revenue, leads, sessions, users, engagement/time-on-page (average_session_duration, user_engagement_duration), and period-over-period comparisons. Drill deep: GA4 supports up to 9 grouped dimensions (date/hour, geo, device/browser/OS, source/medium/channel, landing_page/page_path, etc.). Defaults to all mapped connected sources merged into one standardized view, aligned on the shared grain (typically landing_page) so a page row blends GA4 sessions+engagement with Search Console/Bing clicks/impressions/CTR/position; per-source detail (e.g. full query lists) stays in sourceSections. Note GA4 has no `query` dimension and Search Console/Bing have no sessions/engagement, so those cannot share one row — query is a Search Console/Bing breakdown. Narrow with sources or sourceMode='single'. Any GA4 dimension/metric name not in the catalog is passed through to the GA4 API automatically; metricMode='source_native' forces a pure GA4-native report. Pass one date range for a single window or two date ranges for period-over-period comparison.

输入模式

{
  "type": "object",
  "properties": {
    "propertyId": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^\\d+$"
        },
        {
          "type": "integer",
          "exclusiveMinimum": 0
        }
      ],
      "description": "Numeric Google Analytics 4 property ID for website analytics or app analytics. Use this when the user references a GA4 property directly."
    },
    "appStreamId": {
      "type": "string",
      "minLength": 1,
      "description": "GA4 app or web data stream ID when the request targets a specific app stream or website stream."
    },
    "dateRanges": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "startDate": {
            "type": "string",
            "minLength": 1
          },
          "endDate": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "startDate",
          "endDate"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "description": "One or more GA4 date ranges. Use two date ranges for period-over-period comparisons or significance checks."
    },
    "metrics": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[-a-zA-Z0-9_:]+$"
      },
      "minItems": 1,
      "description": "GA4 metric API names such as sessions, activeUsers, conversions, eventCount, totalRevenue, or engagedSessions. Include explicit numerator and denominator metrics when requesting significance context."
    },
    "dimensions": {
      "type": "array",
      "items": {
        "$ref": "#/properties/metrics/items"
      },
      "description": "Optional GA4 dimensions such as date, country, deviceCategory, landingPagePlusQueryString, or dateRange. Omit entirely for aggregate totals (renders as KPI widget). Only include when the user asks for a breakdown or trend."
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100000,
      "default": 1000
    },
    "offset": {
      "type": "integer",
      "minimum": 0
    },
    "orderBys": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "fieldName": {
            "$ref": "#/properties/metrics/items"
          },
          "desc": {
            "type": "boolean",
            "default": false
          },
          "type": {
            "type": "string",
            "enum": [
              "dimension",
              "metric"
            ]
          }
        },
        "required": [
          "fieldName"
        ],
        "additionalProperties": false
      },
      "description": "Optional sort order. Each entry requires fieldName (a GA4 API name like sessions or date) and optional desc (true for descending). Example: [{ fieldName: \"sessions\", desc: true }]."
    },
    "dimensionFilters": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "fieldName": {
            "$ref": "#/properties/metrics/items"
          },
          "operator": {
            "type": "string",
            "enum": [
              "EXACT",
              "CONTAINS",
              "BEGINS_WITH",
              "ENDS_WITH",
              "REGEXP",
              "IN_LIST"
            ]
          },
          "values": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1
          },
          "caseSensitive": {
            "type": "boolean"
          }
        },
        "required": [
          "fieldName",
          "operator",
          "values"
        ],
        "additionalProperties": false
      }
    },
    "dimensionFilterExpression": {
      "type": "object",
      "properties": {
        "filter": {
          "type": "object",
          "properties": {
            "fieldName": {
              "$ref": "#/properties/metrics/items"
            },
            "stringFilter": {
              "type": "object",
              "properties": {
                "matchType": {
                  "type": "string",
                  "enum": [
                    "EXACT",
                    "CONTAINS",
                    "BEGINS_WITH",
                    "ENDS_WITH",
                    "REGEXP",
                    "FULL_REGEXP",
                    "PARTIAL_REGEXP"
                  ]
                },
                "value": {
                  "type": "string"
                },
                "caseSensitive": {
                  "$ref": "#/properties/dimensionFilters/items/properties/caseSensitive"
                }
              },
              "required": [
                "matchType",
                "value"
              ],
              "additionalProperties": false
            },
            "inListFilter": {
              "type": "object",
              "properties": {
                "values": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "minItems": 1
                },
                "caseSensitive": {
                  "$ref": "#/properties/dimensionFilters/items/properties/caseSensitive"
                }
              },
              "required": [
                "values"
              ],
              "additionalProperties": false
            },
            "numericFilter": {
              "type": "object",
              "properties": {
                "operation": {
                  "type": "string",
                  "enum": [
                    "EQUAL",
                    "LESS_THAN",
                    "GREATER_THAN",
                    "LESS_THAN_OR_EQUAL",
                    "GREATER_THAN_OR_EQUAL"
                  ]
                },
                "value": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "string",
                      "minLength": 1
                    }
                  ]
                }
              },
              "required": [
                "operation",
                "value"
              ],
              "additionalProperties": false
            },
            "betweenFilter": {
              "type": "object",
              "properties": {
                "fromValue": {
                  "$ref": "#/properties/dimensionFilterExpression/properties/filter/properties/numericFilter/properties/value"
                },
                "toValue": {
                  "$ref": "#/properties/dimensionFilterExpression/properties/filter/properties/numericFilter/properties/value"
                }
              },
              "required": [
                "fromValue",
                "toValue"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "fieldName"
          ],
          "additionalProperties": false
        },
        "andGroup": {
          "type": "object",
          "properties": {
            "expressions": {
              "type": "array",
              "items": {
                "$ref": "#/properties/dimensionFilterExpression"
              },
              "minItems": 1
            }
          },
          "required": [
            "expressions"
          ],
          "additionalProperties": false
        },
        "orGroup": {
          "type": "object",
          "properties": {
            "expressions": {
              "type": "array",
              "items": {
                "$ref": "#/properties/dimensionFilterExpression"
              },
              "minItems": 1
            }
          },
          "required": [
            "expressions"
          ],
          "additionalProperties": false
        },
        "notExpression": {
          "$ref": "#/properties/dimensionFilterExpression"
        }
      },
      "additionalProperties": false
    },
    "metricFilters": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "fieldName": {
            "$ref": "#/properties/metrics/items"
          },
          "operator": {
            "type": "string",
            "enum": [
              "EQUAL",
              "LESS_THAN",
              "GREATER_THAN",
              "BETWEEN"
            ]
          },
          "values": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1
          }
        },
        "required": [
          "fieldName",
          "operator",
          "values"
        ],
        "additionalProperties": false
      }
    },
    "metricFilterExpression": {
      "$ref": "#/properties/dimensionFilterExpression"
    },
    "keepEmptyRows": {
      "type": "boolean"
    },
    "returnAllRows": {
      "type": "boolean"
    },
    "maxRows": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000000
    },
    "pageSize": {
      "type": "integer",
      "minimum": 1,
      "maximum": 250000
    },
    "source": {
      "type": "string",
      "enum": [
        "ga4",
        "search_console",
        "bing_webmaster"
      ]
    },
    "sources": {
      "type": "array",
      "items": {
        "$ref": "#/properties/source"
      },
      "minItems": 1
    },
    "sourceMode": {
      "type": "string",
      "enum": [
        "auto",
        "single"
      ],
      "default": "auto"
    },
    "metricMode": {
      "type": "string",
      "enum": [
        "canonical",
        "source_native"
      ],
      "default": "canonical"
    },
    "significance": {
      "type": "object",
      "properties": {
        "numeratorMetric": {
          "type": "string",
          "minLength": 1,
          "description": "Explicit numerator metric for the rate test, such as conversions or engagedSessions."
        },
        "denominatorMetric": {
          "type": "string",
          "minLength": 1,
          "description": "Explicit denominator metric for the rate test, such as sessions or totalUsers."
        },
        "alpha": {
          "type": "number",
          "minimum": 0.001,
          "maximum": 0.2,
          "default": 0.05,
          "description": "Optional significance threshold. Defaults to 0.05."
        },
        "alternative": {
          "type": "string",
          "enum": [
            "two-sided",
            "greater",
            "less"
          ],
          "default": "two-sided",
          "description": "Optional test direction. Defaults to two-sided."
        },
        "comparison": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "auto",
                "date_ranges",
                "dimension_rows"
              ],
              "default": "auto",
              "description": "How to resolve the two comparison groups. auto infers from the report shape."
            },
            "baseline": {
              "type": "string",
              "description": "Optional baseline row label when the report returns two named rows."
            },
            "variant": {
              "type": "string",
              "description": "Optional comparison row label when the report returns two named rows."
            }
          },
          "additionalProperties": false,
          "description": "Optional override for how the two report rows should be interpreted."
        }
      },
      "required": [
        "numeratorMetric",
        "denominatorMetric"
      ],
      "additionalProperties": false,
      "description": "Optional significance context for GA4 rate comparisons. Use this only when the user asks whether a change is statistically significant or meaningful."
    },
    "surfaceId": {
      "type": "string",
      "minLength": 1,
      "description": "Optional analysis surface ID. When omitted, the default surface is used if no explicit selector is provided."
    },
    "property": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "integer",
          "exclusiveMinimum": 0
        }
      ],
      "description": "Google Analytics property identifier. Accepts a numeric GA4 property ID like 481373915 or a resource name like properties/481373915."
    },
    "app": {
      "type": "object",
      "properties": {
        "streamId": {
          "type": "string",
          "minLength": 1,
          "description": "GA4 data stream ID for an app or web stream."
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "description": "Stream display name when the user refers to the app or stream by name."
        },
        "firebaseAppId": {
          "type": "string",
          "minLength": 1,
          "description": "Firebase app ID for GA4 app analytics."
        },
        "measurementId": {
          "type": "string",
          "minLength": 1,
          "description": "GA4 web stream measurement ID such as G-XXXXXXX."
        }
      },
      "additionalProperties": false,
      "description": "Optional app or web stream selector. Use this when the user identifies the GA4 source by stream ID, measurement ID, Firebase app ID, or stream name."
    },
    "siteUrl": {
      "type": "string",
      "minLength": 1
    },
    "site": {
      "type": "string",
      "minLength": 1
    },
    "sourceOptions": {
      "type": "object",
      "properties": {
        "searchConsole": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "web",
                "image",
                "video",
                "news",
                "discover",
                "googleNews"
              ]
            },
            "aggregationType": {
              "type": "string",
              "enum": [
                "auto",
                "byPage",
                "byProperty"
              ]
            },
            "dataState": {
              "type": "string",
              "enum": [
                "final",
                "all",
                "hourly_all"
              ]
            },
            "dimensionFilterGroups": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "groupType": {
                    "type": "string",
                    "enum": [
                      "and",
                      "or"
                    ]
                  },
                  "filters": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "dimension": {
                          "type": "string",
                          "minLength": 1
                        },
                        "operator": {
                          "type": "string",
                          "enum": [
                            "contains",
                            "equals",
                            "notContains",
                            "notEquals",
                            "includingRegex",
                            "excludingRegex"
                          ]
                        },
                        "expression": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "dimension",
                        "operator",
                        "expression"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1
                  }
                },
                "required": [
                  "filters"
                ],
                "additionalProperties": false
              }
            },
            "rowLimit": {
              "type": "integer",
              "minimum": 1,
              "maximum": 25000
            },
            "startRow": {
              "type": "integer",
              "minimum": 0
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "dateRanges",
    "metrics"
  ],
  "additionalProperties": true,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

输出模式

{
  "type": "object",
  "properties": {
    "chart": {
      "type": "object",
      "additionalProperties": {}
    },
    "reportSummary": {
      "$ref": "#/properties/chart"
    },
    "analyticsLinks": {
      "$ref": "#/properties/chart"
    },
    "sourceState": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "enum": [
            "ga4",
            "search_console",
            "bing_webmaster"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "ready",
            "not_connected",
            "missing_scope",
            "unavailable"
          ]
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "source",
        "status",
        "message"
      ],
      "additionalProperties": false
    },
    "scope": {
      "$ref": "#/properties/chart"
    },
    "resolvedEntities": {
      "$ref": "#/properties/chart"
    },
    "metrics": {
      "$ref": "#/properties/chart"
    },
    "rows": {
      "anyOf": [
        {
          "type": "array",
          "items": {
            "$ref": "#/properties/chart"
          }
        },
        {
          "$ref": "#/properties/chart"
        }
      ]
    },
    "lineage": {
      "$ref": "#/properties/chart"
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "confidence": {
      "$ref": "#/properties/chart"
    },
    "comparison": {
      "$ref": "#/properties/chart"
    },
    "significance": {
      "$ref": "#/properties/chart"
    }
  },
  "additionalProperties": true,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🟢marketing_get_funnel(type, surfaceId, dateRanges, limit, ga4PropertyId, ...)

Use for ordered conversion-step analysis: GA4 ordered_steps step funnels (e.g. session_start → add_to_cart → purchase) and cross-source holistic_bundle landing-page funnels joining GA4, Google Search Console, and Bing Webmaster. Covers funnel drop-off between steps (e.g. from landing on the site to adding to cart to purchasing), conversion paths, and acquisition-to-conversion context. Pass one date range for a single window or two date ranges for period-over-period comparison.

输入模式

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "holistic_bundle",
        "ordered_steps"
      ]
    },
    "surfaceId": {
      "type": "string",
      "minLength": 1,
      "default": "default"
    },
    "dateRanges": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "startDate": {
            "type": "string",
            "minLength": 1
          },
          "endDate": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "startDate",
          "endDate"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "description": "One or more GA4 date ranges. Use two date ranges for period-over-period comparisons or significance checks."
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 250,
      "default": 50
    },
    "ga4PropertyId": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "integer",
          "exclusiveMinimum": 0
        }
      ],
      "description": "Google Analytics property identifier. Accepts a numeric GA4 property ID like 481373915 or a resource name like properties/481373915."
    },
    "searchConsoleSiteUrl": {
      "type": "string",
      "minLength": 1
    },
    "bingSiteUrl": {
      "type": "string",
      "minLength": 1
    },
    "propertyId": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^\\d+$"
        },
        {
          "type": "integer",
          "exclusiveMinimum": 0
        }
      ],
      "description": "Numeric GA4 property ID for the funnel report."
    },
    "property": {
      "$ref": "#/properties/ga4PropertyId",
      "description": "Google Analytics property identifier. Accepts a numeric GA4 property ID like 481373915 or a resource name like properties/481373915."
    },
    "appStreamId": {
      "type": "string",
      "minLength": 1,
      "description": "Optional data stream ID when the funnel should run against a specific app or website stream."
    },
    "app": {
      "type": "object",
      "properties": {
        "streamId": {
          "type": "string",
          "minLength": 1,
          "description": "GA4 data stream ID for an app or web stream."
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "description": "Stream display name when the user refers to the app or stream by name."
        },
        "firebaseAppId": {
          "type": "string",
          "minLength": 1,
          "description": "Firebase app ID for GA4 app analytics."
        },
        "measurementId": {
          "type": "string",
          "minLength": 1,
          "description": "GA4 web stream measurement ID such as G-XXXXXXX."
        }
      },
      "additionalProperties": false,
      "description": "Optional app or web stream selector. Use this when the user identifies the GA4 source by stream ID, measurement ID, Firebase app ID, or stream name."
    },
    "funnel": {
      "type": "object",
      "properties": {
        "isOpenFunnel": {
          "type": "boolean"
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1
              },
              "isDirectlyFollowedBy": {
                "type": "boolean"
              },
              "withinDurationFromPriorStep": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "number"
                  }
                ]
              },
              "filterExpression": {
                "type": "object",
                "properties": {
                  "funnelFieldFilter": {
                    "type": "object",
                    "properties": {
                      "fieldName": {
                        "type": "string",
                        "pattern": "^[-a-zA-Z0-9_:]+$"
                      },
                      "stringFilter": {
                        "type": "object",
                        "properties": {
                          "matchType": {
                            "type": "string",
                            "enum": [
                              "EXACT",
                              "CONTAINS",
                              "BEGINS_WITH",
                              "ENDS_WITH",
                              "REGEXP",
                              "FULL_REGEXP",
                              "PARTIAL_REGEXP"
                            ]
                          },
                          "value": {
                            "type": "string"
                          },
                          "caseSensitive": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "matchType",
                          "value"
                        ],
                        "additionalProperties": false
                      },
                      "inListFilter": {
                        "type": "object",
                        "properties": {
                          "values": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "minItems": 1
                          },
                          "caseSensitive": {
                            "$ref": "#/properties/funnel/properties/steps/items/properties/filterExpression/properties/funnelFieldFilter/properties/stringFilter/properties/caseSensitive"
                          }
                        },
                        "required": [
                          "values"
                        ],
                        "additionalProperties": false
                      },
                      "numericFilter": {
                        "type": "object",
                        "properties": {
                          "operation": {
                            "type": "string",
                            "enum": [
                              "EQUAL",
                              "LESS_THAN",
                              "GREATER_THAN",
                              "LESS_THAN_OR_EQUAL",
                              "GREATER_THAN_OR_EQUAL"
                            ]
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "minLength": 1
                              }
                            ]
                          }
                        },
                        "required": [
                          "operation",
                          "value"
                        ],
                        "additionalProperties": false
                      },
                      "betweenFilter": {
                        "type": "object",
                        "properties": {
                          "fromValue": {
                            "$ref": "#/properties/funnel/properties/steps/items/properties/filterExpression/properties/funnelFieldFilter/properties/numericFilter/properties/value"
                          },
                          "toValue": {
                            "$ref": "#/properties/funnel/properties/steps/items/properties/filterExpression/properties/funnelFieldFilter/properties/numericFilter/properties/value"
                          }
                        },
                        "required": [
                          "fromValue",
                          "toValue"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "fieldName"
                    ],
                    "additionalProperties": false
                  },
                  "funnelEventFilter": {
                    "type": "object",
                    "properties": {
                      "eventName": {
                        "type": "string",
                        "minLength": 1
                      },
                      "funnelParameterFilterExpression": {
                        "type": "object",
                        "properties": {
                          "funnelParameterFilter": {
                            "type": "object",
                            "properties": {
                              "eventParameterName": {
                                "$ref": "#/properties/funnel/properties/steps/items/properties/filterExpression/properties/funnelFieldFilter/properties/fieldName"
                              },
                              "itemParameterName": {
                                "$ref": "#/properties/funnel/properties/steps/items/properties/filterExpression/properties/funnelFieldFilter/properties/fieldName"
                              },
                              "stringFilter": {
                                "$ref": "#/properties/funnel/properties/steps/items/properties/filterExpression/properties/funnelFieldFilter/properties/stringFilter"
                              },
                              "inListFilter": {
                                "$ref": "#/properties/funnel/properties/steps/items/properties/filterExpression/properties/funnelFieldFilter/properties/inListFilter"
                              },
                              "numericFilter": {
                                "$ref": "#/properties/funnel/properties/steps/items/properties/filterExpression/properties/funnelFieldFilter/properties/numericFilter"
                              },
                              "betweenFilter": {
                                "$ref": "#/properties/funnel/properties/steps/items/properties/filterExpression/properties/funnelFieldFilter/properties/betweenFilter"
                              }
                            },
                            "additionalProperties": false
                          },
                          "andGroup": {
                            "type": "object",
                            "properties": {
                              "expressions": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/properties/funnel/properties/steps/items/properties/filterExpression/properties/funnelEventFilter/properties/funnelParameterFilterExpression"
                                },
                                "minItems": 1
                              }
                            },
                            "required": [
                              "expressions"
                            ],
                            "additionalProperties": false
                          },
                          "orGroup": {
                            "type": "object",
                            "properties": {
                              "expressions": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/properties/funnel/properties/steps/items/properties/filterExpression/properties/funnelEventFilter/properties/funnelParameterFilterExpression"
                                },
                                "minItems": 1
                              }
                            },
                            "required": [
                              "expressions"
                            ],
                            "additionalProperties": false
                          },
                          "notExpression": {
                            "$ref": "#/properties/funnel/properties/steps/items/properties/filterExpression/properties/funnelEventFilter/properties/funnelParameterFilterExpression"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "eventName"
                    ],
                    "additionalProperties": false
                  },
                  "andGroup": {
                    "type": "object",
                    "properties": {
                      "expressions": {
                        "type": "array",
                        "items": {
                          "$ref": "#/properties/funnel/properties/steps/items/properties/filterExpression"
                        },
                        "minItems": 1
                      }
                    },
                    "required": [
                      "expressions"
                    ],
                    "additionalProperties": false
                  },
                  "orGroup": {
                    "type": "object",
                    "properties": {
                      "expressions": {
                        "type": "array",
                        "items": {
                          "$ref": "#/properties/funnel/properties/steps/items/properties/filterExpression"
                        },
                        "minItems": 1
                      }
                    },
                    "required": [
                      "expressions"
                    ],
                    "additionalProperties": false
                  },
                  "notExpression": {
                    "$ref": "#/properties/funnel/properties/steps/items/properties/filterExpression"
                  }
                },
                "additionalProperties": false
              },
              "eventName": {
                "type": "string",
                "minLength": 1
              },
              "parameterFilterExpression": {
                "$ref": "#/properties/funnel/properties/steps/items/properties/filterExpression/properties/funnelEventFilter/properties/funnelParameterFilterExpression"
              }
            },
            "additionalProperties": false
          },
          "minItems": 1
        }
      },
      "required": [
        "steps"
      ],
      "additionalProperties": false,
      "description": "Multi-step funnel definition. Use this only for ordered step analysis, not for general website analytics reporting."
    },
    "funnelBreakdown": {
      "type": "object",
      "properties": {
        "breakdownDimension": {
          "$ref": "#/properties/funnel/properties/steps/items/properties/filterExpression/properties/funnelFieldFilter/properties/fieldName"
        },
        "limit": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0
            },
            {
              "type": "string",
              "minLength": 1
            }
          ]
        }
      },
      "required": [
        "breakdownDimension"
      ],
      "additionalProperties": false
    },
    "funnelNextAction": {
      "type": "object",
      "properties": {
        "nextActionDimension": {
          "$ref": "#/properties/funnel/properties/steps/items/properties/filterExpression/properties/funnelFieldFilter/properties/fieldName"
        },
        "limit": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0
            },
            {
              "type": "string",
              "minLength": 1
            }
          ]
        }
      },
      "required": [
        "nextActionDimension"
      ],
      "additionalProperties": false
    },
    "funnelVisualizationType": {
      "type": "string",
      "enum": [
        "FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED",
        "STANDARD_FUNNEL",
        "TRENDED_FUNNEL"
      ]
    },
    "returnPropertyQuota": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "dateRanges"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

输出模式

{
  "type": "object",
  "properties": {
    "chart": {
      "type": "object",
      "additionalProperties": {}
    },
    "reportSummary": {
      "$ref": "#/properties/chart"
    },
    "analyticsLinks": {
      "$ref": "#/properties/chart"
    },
    "sourceState": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "enum": [
            "ga4",
            "search_console",
            "bing_webmaster"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "ready",
            "not_connected",
            "missing_scope",
            "unavailable"
          ]
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "source",
        "status",
        "message"
      ],
      "additionalProperties": false
    },
    "scope": {
      "$ref": "#/properties/chart"
    },
    "rows": {
      "type": "array",
      "items": {
        "$ref": "#/properties/chart"
      }
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "comparison": {
      "$ref": "#/properties/chart"
    }
  },
  "additionalProperties": true,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🟢marketing_manage_surface(action, surfaceId, name, mainDomain, selectors, ...)

Gets or updates persisted selectors for a website/app analysis surface. Use action='get' to inspect mappings and action='update' to persist GA4, Search Console, or Bing Webmaster selectors.

输入模式

{
  "type": "object",
  "properties": {
    "action": {
      "type": "string",
      "enum": [
        "get",
        "update"
      ]
    },
    "surfaceId": {
      "type": "string",
      "minLength": 1,
      "default": "default"
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "mainDomain": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "null"
        }
      ]
    },
    "selectors": {
      "type": "object",
      "properties": {
        "ga4": {
          "anyOf": [
            {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "integer",
                  "exclusiveMinimum": 0
                }
              ],
              "description": "Google Analytics property identifier. Accepts a numeric GA4 property ID like 481373915 or a resource name like properties/481373915."
            },
            {
              "type": "null"
            }
          ],
          "description": "Google Analytics property identifier. Accepts a numeric GA4 property ID like 481373915 or a resource name like properties/481373915."
        },
        "search_console": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "null"
            }
          ]
        },
        "bing_webmaster": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "selectorSets": {
      "type": "object",
      "properties": {
        "ga4": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "$ref": "#/properties/selectors/properties/ga4/anyOf/0"
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "search_console": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "bing_webmaster": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              }
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "action"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

输出模式

{
  "type": "object",
  "properties": {
    "surface": {
      "type": "object",
      "additionalProperties": {}
    },
    "applied": {
      "type": "boolean"
    },
    "sourceState": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "enum": [
            "ga4",
            "search_console",
            "bing_webmaster"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "ready",
            "not_connected",
            "missing_scope",
            "unavailable"
          ]
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "source",
        "status",
        "message"
      ],
      "additionalProperties": false
    }
  },
  "additionalProperties": true,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

社区

评价此服务器

证据

最近观测

已验证未记录版本5 个工具
已验证未记录版本5 个工具
已验证未记录版本5 个工具