试用 Google Analytics 的 MCP 服务器。从 
GitHub 安装,并参阅
公告了解详情。
  
        
 
     
  
  
  
    
  
  
  
    
      Metric
    
    
      
    
    
      
      使用集合让一切井井有条
    
    
      
      根据您的偏好保存内容并对其进行分类。
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
    
    
    
    
      
      
        报告的量化衡量标准。例如,eventCount 指标表示事件总数。最多允许请求 10 个指标。
      
      
        
          
            
              | JSON 表示法 | 
          
          
            
              | {
  "name": string,
  "expression": string,
  "invisible": boolean
} | 
          
        
      
      
        
          
            
            
          
          
            
              | 字段 | 
          
          
            
              | name | string
 指标的名称。有关核心报告方法(例如 runReport和batchRunReports)支持的指标名称的列表,请参阅 API 指标。如需查看runRealtimeReport方法支持的指标名称列表,请参阅实时指标。如需查看runFunnelReport方法支持的指标名称列表,请参阅漏斗指标。 如果指定了 expression,则name可以是允许的字符集内的您想要的任何字符串。例如,如果expression为screenPageViews/sessions,则您可以将该指标的名称命名为viewsPerSession。您选择的指标名称必须与正则表达式^[a-zA-Z0-9_]$匹配。 name在metricFilter、orderBys和指标expression中引用了指标。
 | 
            
              | expression | string
 派生指标的数学表达式。例如,“每位用户的事件数”指标为 eventCount/totalUsers。 | 
            
              | invisible | boolean
 指明某个指标是否在报告响应中不可见。如果某个指标不可见,则它不会在响应中生成列,但可以在 metricFilter、orderBys或指标expression中使用。 | 
          
        
      
    
  
  
  
  
    
  
 
  
    
    
      
       
    
    
  
  
  如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
  最后更新时间 (UTC):2025-07-26。
  
  
  
    
      [null,null,["最后更新时间 (UTC):2025-07-26。"],[],["This document outlines the structure for defining quantitative measurements (metrics) within a report. Each metric has a `name` (a string that can be custom when using an `expression`), an optional `expression` (a mathematical formula to derive the metric), and an `invisible` boolean, the metric can be excluded from the report's output but used for filtering, ordering, or in other metrics' `expression` . Up to 10 metrics are allowed per request.\n"]]