Method: properties.runFunnelReport

Returns a customized funnel report of your Google Analytics event data. The data returned from the API is as a table with columns for the requested dimensions and metrics.

Funnel exploration lets you visualize the steps your users take to complete a task and quickly see how well they are succeeding or failing at each step. For example, how do prospects become shoppers and then become buyers? How do one time buyers become repeat buyers? With this information, you can improve inefficient or abandoned customer journeys. To learn more, see GA4 Funnel Explorations.

This method is introduced at alpha stability with the intention of gathering feedback on syntax and capabilities before entering beta. To give your feedback on this API, complete the Google Analytics Data API Funnel Reporting Feedback.

HTTP request

POST https://analyticsdata.googleapis.com/v1alpha/{property=properties/*}:runFunnelReport

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
property

string

Optional. A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see where to find your Property ID. Within a batch request, this property should either be unspecified or consistent with the batch-level property.

Example: properties/1234

Request body

The request body contains data with the following structure:

JSON representation
{
  "dateRanges": [
    {
      object (DateRange)
    }
  ],
  "funnel": {
    object (Funnel)
  },
  "funnelBreakdown": {
    object (FunnelBreakdown)
  },
  "funnelNextAction": {
    object (FunnelNextAction)
  },
  "funnelVisualizationType": enum (FunnelVisualizationType),
  "segments": [
    {
      object (Segment)
    }
  ],
  "limit": string,
  "dimensionFilter": {
    object (FilterExpression)
  },
  "returnPropertyQuota": boolean
}
Fields
dateRanges[]

object (DateRange)

Optional. Date ranges of data to read. If multiple date ranges are requested, each response row will contain a zero based date range index. If two date ranges overlap, the event data for the overlapping days is included in the response rows for both date ranges.

funnel

object (Funnel)

Optional. The configuration of this request's funnel. This funnel configuration is required.

funnelBreakdown

object (FunnelBreakdown)

Optional. If specified, this breakdown adds a dimension to the funnel table sub report response. This breakdown dimension expands each funnel step to the unique values of the breakdown dimension. For example, a breakdown by the deviceCategory dimension will create rows for mobile, tablet, desktop, and the total.

funnelNextAction

object (FunnelNextAction)

Optional. If specified, next action adds a dimension to the funnel visualization sub report response. This next action dimension expands each funnel step to the unique values of the next action. For example a next action of the eventName dimension will create rows for several events (for example session_start & click) and the total.

Next action only supports eventName and most Page / Screen dimensions like pageTitle and pagePath.

funnelVisualizationType

enum (FunnelVisualizationType)

Optional. The funnel visualization type controls the dimensions present in the funnel visualization sub report response. If not specified, STANDARD_FUNNEL is used.

segments[]

object (Segment)

Optional. The configurations of segments. Segments are subsets of a property's data. In a funnel report with segments, the funnel is evaluated in each segment.

Each segment specified in this request produces a separate row in the response; in the response, each segment identified by its name.

The segments parameter is optional. Requests are limited to 4 segments.

limit

string (int64 format)

Optional. The number of rows to return. If unspecified, 10,000 rows are returned. The API returns a maximum of 250,000 rows per request, no matter how many you ask for. limit must be positive.

The API can also return fewer rows than the requested limit, if there aren't as many dimension values as the limit.

dimensionFilter

object (FilterExpression)

Optional. Dimension filters allow you to ask for only specific dimension values in the report. To learn more, see Creating a Report: Dimension Filters for examples. Metrics cannot be used in this filter.

returnPropertyQuota

boolean

Optional. Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in PropertyQuota.

Response body

The funnel report response contains two sub reports. The two sub reports are different combinations of dimensions and metrics.

If successful, the response body contains data with the following structure:

JSON representation
{
  "funnelTable": {
    object (FunnelSubReport)
  },
  "funnelVisualization": {
    object (FunnelSubReport)
  },
  "propertyQuota": {
    object (PropertyQuota)
  },
  "kind": string
}
Fields
funnelTable

object (FunnelSubReport)

The funnel table is a report with the funnel step, segment, breakdown dimension, active users, completion rate, abandonments, and abandonments rate.

The segment dimension is only present in this response if a segment was requested. The breakdown dimension is only present in this response if it was requested.

funnelVisualization

object (FunnelSubReport)

The funnel visualization is a report with the funnel step, segment, date, next action dimension, and active users.

The segment dimension is only present in this response if a segment was requested. The date dimension is only present in this response if it was requested through the TRENDED_FUNNEL funnel type. The next action dimension is only present in the response if it was requested.

propertyQuota

object (PropertyQuota)

This Analytics Property's quota state including this request.

kind

string

Identifies what kind of resource this message is. This kind is always the fixed string "analyticsData#runFunnelReport". Useful to distinguish between response types in JSON.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/analytics.readonly
  • https://www.googleapis.com/auth/analytics

Funnel

Configures the funnel in a funnel report request. A funnel reports on users as they pass through a sequence of steps.

Funnel exploration lets you visualize the steps your users take to complete a task and quickly see how well they are succeeding or failing at each step. For example, how do prospects become shoppers and then become buyers? How do one time buyers become repeat buyers? With this information, you can improve inefficient or abandoned customer journeys.

JSON representation
{
  "isOpenFunnel": boolean,
  "steps": [
    {
      object (FunnelStep)
    }
  ]
}
Fields
isOpenFunnel

boolean

In an open funnel, users can enter the funnel in any step, and in a closed funnel, users must enter the funnel in the first step. Optional. If unspecified, a closed funnel is used.

steps[]

object (FunnelStep)

The sequential steps of this funnel.

FunnelStep

Steps define the user journey you want to measure. Steps contain one or more conditions that your users must meet to be included in that step of the funnel journey.

JSON representation
{
  "name": string,
  "isDirectlyFollowedBy": boolean,
  "filterExpression": {
    object (FunnelFilterExpression)
  },
  "withinDurationFromPriorStep": string
}
Fields
name

string

The distinctive name for this step. If unspecified, steps will be named by a 1 based indexed name (for example "0. ", "1. ", etc.). This name defines string value returned by the funnelStepName dimension. For example, specifying name = Purchase in the request's third funnel step will produce 3. Purchase in the funnel report response.

isDirectlyFollowedBy

boolean

If true, this step must directly follow the previous step. If false, there can be events between the previous step and this step. If unspecified, isDirectlyFollowedBy is treated as false.

filterExpression

object (FunnelFilterExpression)

The condition that your users must meet to be included in this step of the funnel journey.

withinDurationFromPriorStep

string (Duration format)

If specified, this step must complete within this duration of the completion of the prior step. withinDurationFromPriorStep is inclusive of the endpoint at the microsecond granularity. For example a duration of 5 seconds can be completed at 4.9 or 5.0 seconds, but not 5 seconds and 1 microsecond.

withinDurationFromPriorStep is optional, and if unspecified, steps may be separated by any time duration.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

FunnelFilterExpression

Expresses combinations of funnel filters.

JSON representation
{

  // Union field expr can be only one of the following:
  "andGroup": {
    object (FunnelFilterExpressionList)
  },
  "orGroup": {
    object (FunnelFilterExpressionList)
  },
  "notExpression": {
    object (FunnelFilterExpression)
  },
  "funnelFieldFilter": {
    object (FunnelFieldFilter)
  },
  "funnelEventFilter": {
    object (FunnelEventFilter)
  }
  // End of list of possible types for union field expr.
}
Fields
Union field expr. Specify one type of filter for FunnelFilterExpression. expr can be only one of the following:
andGroup

object (FunnelFilterExpressionList)

The FunnelFilterExpression in andGroup have an AND relationship.

orGroup

object (FunnelFilterExpressionList)

The FunnelFilterExpression in orGroup have an OR relationship.

notExpression

object (FunnelFilterExpression)

The FunnelFilterExpression is NOT of notExpression.

funnelFieldFilter

object (FunnelFieldFilter)

A funnel filter for a dimension or metric.

funnelEventFilter

object (FunnelEventFilter)

Creates a filter that matches events of a single event name. If a parameter filter expression is specified, only the subset of events that match both the single event name and the parameter filter expressions match this event filter.

FunnelFilterExpressionList

A list of funnel filter expressions.

JSON representation
{
  "expressions": [
    {
      object (FunnelFilterExpression)
    }
  ]
}
Fields
expressions[]

object (FunnelFilterExpression)

The list of funnel filter expressions.

FunnelFieldFilter

An expression to filter dimension or metric values.

JSON representation
{
  "fieldName": string,

  // Union field one_filter can be only one of the following:
  "stringFilter": {
    object (StringFilter)
  },
  "inListFilter": {
    object (InListFilter)
  },
  "numericFilter": {
    object (NumericFilter)
  },
  "betweenFilter": {
    object (BetweenFilter)
  }
  // End of list of possible types for union field one_filter.
}
Fields
fieldName

string

The dimension name or metric name.

Union field one_filter. Specify one type of filter. one_filter can be only one of the following:
stringFilter

object (StringFilter)

Strings related filter.

inListFilter

object (InListFilter)

A filter for in list values.

numericFilter

object (NumericFilter)

A filter for numeric or date values.

betweenFilter

object (BetweenFilter)

A filter for between two values.

FunnelEventFilter

Creates a filter that matches events of a single event name. If a parameter filter expression is specified, only the subset of events that match both the single event name and the parameter filter expressions match this event filter.

JSON representation
{
  "eventName": string,
  "funnelParameterFilterExpression": {
    object (FunnelParameterFilterExpression)
  }
}
Fields
eventName

string

This filter matches events of this single event name. Event name is required.

funnelParameterFilterExpression

object (FunnelParameterFilterExpression)

If specified, this filter matches events that match both the single event name and the parameter filter expressions.

Inside the parameter filter expression, only parameter filters are available.

FunnelParameterFilterExpression

Expresses combinations of funnel filters on parameters.

JSON representation
{

  // Union field expr can be only one of the following:
  "andGroup": {
    object (FunnelParameterFilterExpressionList)
  },
  "orGroup": {
    object (FunnelParameterFilterExpressionList)
  },
  "notExpression": {
    object (FunnelParameterFilterExpression)
  },
  "funnelParameterFilter": {
    object (FunnelParameterFilter)
  }
  // End of list of possible types for union field expr.
}
Fields
Union field expr. Specify one type of filter for FunnelParameterFilterExpression. expr can be only one of the following:
andGroup

object (FunnelParameterFilterExpressionList)

The FunnelParameterFilterExpression in andGroup have an AND relationship.

orGroup

object (FunnelParameterFilterExpressionList)

The FunnelParameterFilterExpression in orGroup have an OR relationship.

notExpression

object (FunnelParameterFilterExpression)

The FunnelParameterFilterExpression is NOT of notExpression.

funnelParameterFilter

object (FunnelParameterFilter)

A primitive funnel parameter filter.

FunnelParameterFilterExpressionList

A list of funnel parameter filter expressions.

JSON representation
{
  "expressions": [
    {
      object (FunnelParameterFilterExpression)
    }
  ]
}
Fields
expressions[]

object (FunnelParameterFilterExpression)

The list of funnel parameter filter expressions.

FunnelParameterFilter

An expression to filter parameter values in a funnel.

JSON representation
{

  // Union field one_parameter can be only one of the following:
  "eventParameterName": string,
  "itemParameterName": string
  // End of list of possible types for union field one_parameter.

  // Union field one_filter can be only one of the following:
  "stringFilter": {
    object (StringFilter)
  },
  "inListFilter": {
    object (InListFilter)
  },
  "numericFilter": {
    object (NumericFilter)
  },
  "betweenFilter": {
    object (BetweenFilter)
  }
  // End of list of possible types for union field one_filter.
}
Fields
Union field one_parameter. The field that is being filtered. one_parameter can be only one of the following:
eventParameterName

string

This filter will be evaluated on the specified event parameter. Event parameters are logged as parameters of the event. Event parameters include fields like "firebase_screen" & "currency".

Event parameters can only be used in segments & funnels and can only be used in a descendent filter from an EventFilter. In a descendent filter from an EventFilter either event or item parameters should be used.

itemParameterName

string

This filter will be evaluated on the specified item parameter. Item parameters are logged as parameters in the item array. Item parameters include fields like "item_name" & "item_category".

Item parameters can only be used in segments & funnels and can only be used in a descendent filter from an EventFilter. In a descendent filter from an EventFilter either event or item parameters should be used.

Item parameters are only available in ecommerce events. To learn more about ecommerce events, see the Measure ecommerce guide.

Union field one_filter. Specify one type of filter. one_filter can be only one of the following:
stringFilter

object (StringFilter)

Strings related filter.

inListFilter

object (InListFilter)

A filter for in list values.

numericFilter

object (NumericFilter)

A filter for numeric or date values.

betweenFilter

object (BetweenFilter)

A filter for between two values.

FunnelBreakdown

Breakdowns add a dimension to the funnel table sub report response.

JSON representation
{
  "breakdownDimension": {
    object (Dimension)
  },
  "limit": string
}
Fields
breakdownDimension

object (Dimension)

The dimension column added to the funnel table sub report response. The breakdown dimension breaks down each funnel step. A valid breakdownDimension is required if funnelBreakdown is specified.

limit

string (int64 format)

The maximum number of distinct values of the breakdown dimension to return in the response. A limit of 5 is used if limit is not specified. Limit must exceed zero and cannot exceed 15.

FunnelNextAction

Next actions state the value for a dimension after the user has achieved a step but before the same user has achieved the next step. For example if the nextActionDimension is eventName, then nextActionDimension in the ith funnel step row will return first event after the event that qualified the user into the ith funnel step but before the user achieved the i+1th funnel step.

JSON representation
{
  "nextActionDimension": {
    object (Dimension)
  },
  "limit": string
}
Fields
nextActionDimension

object (Dimension)

The dimension column added to the funnel visualization sub report response. The next action dimension returns the next dimension value of this dimension after the user has attained the ith funnel step.

nextActionDimension currently only supports eventName and most Page / Screen dimensions like pageTitle and pagePath. nextActionDimension cannot be a dimension expression.

limit

string (int64 format)

The maximum number of distinct values of the breakdown dimension to return in the response. A limit of 5 is used if limit is not specified. Limit must exceed zero and cannot exceed 5.

FunnelVisualizationType

Controls the dimensions present in the funnel visualization sub report response.

Enums
FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED Unspecified type.
STANDARD_FUNNEL A standard (stepped) funnel. The funnel visualization sub report in the response will not contain date.
TRENDED_FUNNEL A trended (line chart) funnel. The funnel visualization sub report in the response will contain the date dimension.

Segment

A segment is a subset of your Analytics data. For example, of your entire set of users, one segment might be users from a particular country or city. Another segment might be users who purchase a particular line of products or who visit a specific part of your site or trigger certain events in your app.

To learn more, see GA4 Segment Builder.

JSON representation
{
  "name": string,

  // Union field one_segment_scope can be only one of the following:
  "userSegment": {
    object (UserSegment)
  },
  "sessionSegment": {
    object (SessionSegment)
  },
  "eventSegment": {
    object (EventSegment)
  }
  // End of list of possible types for union field one_segment_scope.
}
Fields
name

string

The name for this segment. If unspecified, segments are named "Segment". This name defines string value returned by the segment dimension. The segment dimension prefixes segment names by the 1-based index number of the segment in the request (for example "1. Segment", "2. Segment", etc.).

Union field one_segment_scope. A segment is specified in one scope. one_segment_scope can be only one of the following:
userSegment

object (UserSegment)

User segments are subsets of users who engaged with your site or app.

sessionSegment

object (SessionSegment)

Session segments are subsets of the sessions that occurred on your site or app.

eventSegment

object (EventSegment)

Event segments are subsets of events that were triggered on your site or app.

UserSegment

User segments are subsets of users who engaged with your site or app. For example, users who have previously purchased; users who added items to their shopping carts, but didn’t complete a purchase.

JSON representation
{
  "userInclusionCriteria": {
    object (UserSegmentCriteria)
  },
  "exclusion": {
    object (UserSegmentExclusion)
  }
}
Fields
userInclusionCriteria

object (UserSegmentCriteria)

Defines which users are included in this segment. Optional.

exclusion

object (UserSegmentExclusion)

Defines which users are excluded in this segment. Optional.

UserSegmentCriteria

A user matches a criteria if the user's events meet the conditions in the criteria.

JSON representation
{
  "andConditionGroups": [
    {
      object (UserSegmentConditionGroup)
    }
  ],
  "andSequenceGroups": [
    {
      object (UserSegmentSequenceGroup)
    }
  ]
}
Fields
andConditionGroups[]

object (UserSegmentConditionGroup)

A user matches this criteria if the user matches each of these andConditionGroups and each of the andSequenceGroups. andConditionGroups may be empty if andSequenceGroups are specified.

andSequenceGroups[]

object (UserSegmentSequenceGroup)

A user matches this criteria if the user matches each of these andSequenceGroups and each of the andConditionGroups. andSequenceGroups may be empty if andConditionGroups are specified.

UserSegmentConditionGroup

Conditions tell Analytics what data to include in or exclude from the segment.

JSON representation
{
  "conditionScoping": enum (UserCriteriaScoping),
  "segmentFilterExpression": {
    object (SegmentFilterExpression)
  }
}
Fields
conditionScoping

enum (UserCriteriaScoping)

Data is included or excluded from the segment based on if it matches the condition group. This scoping defines how many events the segmentFilterExpression is evaluated on before the condition group is determined to be matched or not. For example if conditionScoping = USER_CRITERIA_WITHIN_SAME_SESSION, the expression is evaluated on all events in a session, and then, the condition group is determined to be matched or not for this user. For example if conditionScoping = USER_CRITERIA_WITHIN_SAME_EVENT, the expression is evaluated on a single event, and then, the condition group is determined to be matched or not for this user.

Optional. If unspecified, conditionScoping = ACROSS_ALL_SESSIONS is used.

segmentFilterExpression

object (SegmentFilterExpression)

Data is included or excluded from the segment based on if it matches this expression. Expressions express criteria on dimension, metrics, and/or parameters.

UserCriteriaScoping

Scoping specifies which events are considered when evaluating if a user meets a criteria.

Enums
USER_CRITERIA_SCOPING_UNSPECIFIED Unspecified criteria scoping. Do not specify.
USER_CRITERIA_WITHIN_SAME_EVENT If the criteria is satisfied within one event, the user matches the criteria.
USER_CRITERIA_WITHIN_SAME_SESSION If the criteria is satisfied within one session, the user matches the criteria.
USER_CRITERIA_ACROSS_ALL_SESSIONS If the criteria is satisfied by any events for the user, the user matches the criteria.

SegmentFilterExpression

Expresses combinations of segment filters.

JSON representation
{

  // Union field expr can be only one of the following:
  "andGroup": {
    object (SegmentFilterExpressionList)
  },
  "orGroup": {
    object (SegmentFilterExpressionList)
  },
  "notExpression": {
    object (SegmentFilterExpression)
  },
  "segmentFilter": {
    object (SegmentFilter)
  },
  "segmentEventFilter": {
    object (SegmentEventFilter)
  }
  // End of list of possible types for union field expr.
}
Fields
Union field expr. Specify one type of filter for SegmentFilterExpression. expr can be only one of the following:
andGroup

object (SegmentFilterExpressionList)

The SegmentFilterExpression in andGroup have an AND relationship.

orGroup

object (SegmentFilterExpressionList)

The SegmentFilterExpression in orGroup have an OR relationship.

notExpression

object (SegmentFilterExpression)

The SegmentFilterExpression is NOT of notExpression.

segmentFilter

object (SegmentFilter)

A primitive segment filter.

segmentEventFilter

object (SegmentEventFilter)

Creates a filter that matches events of a single event name. If a parameter filter expression is specified, only the subset of events that match both the single event name and the parameter filter expressions match this event filter.

SegmentFilterExpressionList

A list of segment filter expressions.

JSON representation
{
  "expressions": [
    {
      object (SegmentFilterExpression)
    }
  ]
}
Fields
expressions[]

object (SegmentFilterExpression)

The list of segment filter expressions

SegmentFilter

An expression to filter dimension or metric values.

JSON representation
{
  "fieldName": string,
  "filterScoping": {
    object (SegmentFilterScoping)
  },

  // Union field one_filter can be only one of the following:
  "stringFilter": {
    object (StringFilter)
  },
  "inListFilter": {
    object (InListFilter)
  },
  "numericFilter": {
    object (NumericFilter)
  },
  "betweenFilter": {
    object (BetweenFilter)
  }
  // End of list of possible types for union field one_filter.
}
Fields
fieldName

string

The dimension name or metric name.

filterScoping

object (SegmentFilterScoping)

Specifies the scope for the filter.

Union field one_filter. Specify one type of filter for Filter. one_filter can be only one of the following:
stringFilter

object (StringFilter)

Strings related filter.

inListFilter

object (InListFilter)

A filter for in list values.

numericFilter

object (NumericFilter)

A filter for numeric or date values.

betweenFilter

object (BetweenFilter)

A filter for between two values.

SegmentFilterScoping

Scopings specify how the dimensions & metrics of multiple events should be considered when evaluating a segment filter.

JSON representation
{
  "atAnyPointInTime": boolean
}
Fields
atAnyPointInTime

boolean

If atAnyPointInTime is true, this filter evaluates to true for all events if it evaluates to true for any event in the date range of the request.

This atAnyPointInTime parameter does not extend the date range of events in the report. If atAnyPointInTime is true, only events within the report's date range are considered when evaluating this filter.

This atAnyPointInTime is only able to be specified if the criteria scoping is ACROSS_ALL_SESSIONS and is not able to be specified in sequences.

If the criteria scoping is ACROSS_ALL_SESSIONS, atAnyPointInTime = false is used if unspecified.

SegmentEventFilter

Creates a filter that matches events of a single event name. If a parameter filter expression is specified, only the subset of events that match both the single event name and the parameter filter expressions match this event filter.

JSON representation
{
  "eventName": string,
  "segmentParameterFilterExpression": {
    object (SegmentParameterFilterExpression)
  }
}
Fields
eventName

string

This filter matches events of this single event name. Event name is required.

segmentParameterFilterExpression

object (SegmentParameterFilterExpression)

If specified, this filter matches events that match both the single event name and the parameter filter expressions.

Inside the parameter filter expression, only parameter filters are available.

SegmentParameterFilterExpression

Expresses combinations of segment filter on parameters.

JSON representation
{

  // Union field expr can be only one of the following:
  "andGroup": {
    object (SegmentParameterFilterExpressionList)
  },
  "orGroup": {
    object (SegmentParameterFilterExpressionList)
  },
  "notExpression": {
    object (SegmentParameterFilterExpression)
  },
  "segmentParameterFilter": {
    object (SegmentParameterFilter)
  }
  // End of list of possible types for union field expr.
}
Fields
Union field expr. Specify one type of filter for SegmentParameterFilterExpression. expr can be only one of the following:
andGroup

object (SegmentParameterFilterExpressionList)

The SegmentParameterFilterExpression in andGroup have an AND relationship.

orGroup

object (SegmentParameterFilterExpressionList)

The SegmentParameterFilterExpression in orGroup have an OR relationship.

notExpression

object (SegmentParameterFilterExpression)

The SegmentParameterFilterExpression is NOT of notExpression.

segmentParameterFilter

object (SegmentParameterFilter)

A primitive segment parameter filter.

SegmentParameterFilterExpressionList

A list of segment parameter filter expressions.

JSON representation
{
  "expressions": [
    {
      object (SegmentParameterFilterExpression)
    }
  ]
}
Fields
expressions[]

object (SegmentParameterFilterExpression)

The list of segment parameter filter expressions.

SegmentParameterFilter

An expression to filter parameter values in a segment.

JSON representation
{
  "filterScoping": {
    object (SegmentParameterFilterScoping)
  },

  // Union field one_parameter can be only one of the following:
  "eventParameterName": string,
  "itemParameterName": string
  // End of list of possible types for union field one_parameter.

  // Union field one_filter can be only one of the following:
  "stringFilter": {
    object (StringFilter)
  },
  "inListFilter": {
    object (InListFilter)
  },
  "numericFilter": {
    object (NumericFilter)
  },
  "betweenFilter": {
    object (BetweenFilter)
  }
  // End of list of possible types for union field one_filter.
}
Fields
filterScoping

object (SegmentParameterFilterScoping)

Specifies the scope for the filter.

Union field one_parameter. The field that is being filtered. one_parameter can be only one of the following:
eventParameterName

string

This filter will be evaluated on the specified event parameter. Event parameters are logged as parameters of the event. Event parameters include fields like "firebase_screen" & "currency".

Event parameters can only be used in segments & funnels and can only be used in a descendent filter from an EventFilter. In a descendent filter from an EventFilter either event or item parameters should be used.

itemParameterName

string

This filter will be evaluated on the specified item parameter. Item parameters are logged as parameters in the item array. Item parameters include fields like "item_name" & "item_category".

Item parameters can only be used in segments & funnels and can only be used in a descendent filter from an EventFilter. In a descendent filter from an EventFilter either event or item parameters should be used.

Item parameters are only available in ecommerce events. To learn more about ecommerce events, see the Measure ecommerce guide.

Union field one_filter. Specify one type of filter. one_filter can be only one of the following:
stringFilter

object (StringFilter)

Strings related filter.

inListFilter

object (InListFilter)

A filter for in list values.

numericFilter

object (NumericFilter)

A filter for numeric or date values.

betweenFilter

object (BetweenFilter)

A filter for between two values.

SegmentParameterFilterScoping

Scopings specify how multiple events should be considered when evaluating a segment parameter filter.

JSON representation
{
  "inAnyNDayPeriod": string
}
Fields
inAnyNDayPeriod

string (int64 format)

Accumulates the parameter over the specified period of days before applying the filter. Only supported if criteria scoping is ACROSS_ALL_SESSIONS or WITHIN_SAME_SESSION. Only supported if the parameter is event_count.

For example if inAnyNDayPeriod is 3, the eventName is "purchase", the event parameter is "event_count", and the Filter's criteria is greater than 5, this filter will accumulate the event count of purchase events over every 3 consecutive day period in the report's date range; a user will pass this Filter's criteria to be included in this segment if their count of purchase events exceeds 5 in any 3 consecutive day period. For example, the periods 2021-11-01 to 2021-11-03, 2021-11-02 to 2021-11-04, 2021-11-03 to 2021-11-05, and etc. will be considered.

The date range is not extended for the purpose of having a full N day window near the start of the date range. For example if a report is for 2021-11-01 to 2021-11-10 and inAnyNDayPeriod = 3, the first two day period will be effectively shortened because no event data outside the report's date range will be read. For example, the first four periods will effectively be: 2021-11-01 to 2021-11-01, 2021-11-01 to 2021-11-02, 2021-11-01 to 2021-11-03, and 2021-11-02 to 2021-11-04.

inAnyNDayPeriod is optional. If not specified, the segmentParameterFilter is applied to each event individually.

UserSegmentSequenceGroup

Define conditions that must occur in a specific order for the user to be a member of the segment.

JSON representation
{
  "sequenceScoping": enum (UserCriteriaScoping),
  "sequenceMaximumDuration": string,
  "userSequenceSteps": [
    {
      object (UserSequenceStep)
    }
  ]
}
Fields
sequenceScoping

enum (UserCriteriaScoping)

All sequence steps must be satisfied in the scoping for the user to match the sequence. For example if sequenceScoping = USER_CRITERIA_WITHIN_SAME_SESSION, all sequence steps must complete within one session for the user to match the sequence. sequenceScoping = USER_CRITERIA_WITHIN_SAME_EVENT is not supported.

Optional. If unspecified, conditionScoping = ACROSS_ALL_SESSIONS is used.

sequenceMaximumDuration

string (Duration format)

Defines the time period in which the whole sequence must occur; for example, 30 Minutes. sequenceMaximumDuration is inclusive of the endpoint at the microsecond granularity. For example a sequence with a maximum duration of 5 seconds can be completed at 4.9 or 5.0 seconds, but not 5 seconds and 1 microsecond.

sequenceMaximumDuration is optional, and if unspecified, sequences can be completed in any time duration.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

userSequenceSteps[]

object (UserSequenceStep)

An ordered sequence of condition steps. A user's events must complete each step in order for the user to match the UserSegmentSequenceGroup.

UserSequenceStep

A condition that must occur in the specified step order for this user to match the sequence.

JSON representation
{
  "isDirectlyFollowedBy": boolean,
  "stepScoping": enum (UserCriteriaScoping),
  "segmentFilterExpression": {
    object (SegmentFilterExpression)
  }
}
Fields
isDirectlyFollowedBy

boolean

If true, the event satisfying this step must be the very next event after the event satifying the last step. If false, this step indirectly follows the prior step; for example, there may be events between the prior step and this step. isDirectlyFollowedBy must be false for the first step.

stepScoping

enum (UserCriteriaScoping)

This sequence step must be satisfied in the scoping for the user to match the sequence. For example if sequenceScoping = WITHIN_SAME_SESSION, this sequence steps must complete within one session for the user to match the sequence. stepScoping = ACROSS_ALL_SESSIONS is only allowed if the sequenceScoping = ACROSS_ALL_SESSIONS.

Optional. If unspecified, stepScoping uses the same UserCriteriaScoping as the sequenceScoping.

segmentFilterExpression

object (SegmentFilterExpression)

A user matches this sequence step if their events match this expression. Expressions express criteria on dimension, metrics, and/or parameters.

UserSegmentExclusion

Specifies which users are excluded in this segment.

JSON representation
{
  "userExclusionDuration": enum (UserExclusionDuration),
  "userExclusionCriteria": {
    object (UserSegmentCriteria)
  }
}
Fields
userExclusionDuration

enum (UserExclusionDuration)

Specifies how long an exclusion will last if a user matches the userExclusionCriteria.

Optional. If unspecified, userExclusionDuration of USER_EXCLUSION_TEMPORARY is used.

userExclusionCriteria

object (UserSegmentCriteria)

If a user meets this condition, the user is excluded from membership in the segment for the userExclusionDuration.

UserExclusionDuration

Enumerates options for how long an exclusion will last if a user matches the userExclusionCriteria.

Enums
USER_EXCLUSION_DURATION_UNSPECIFIED Unspecified exclusion duration. Do not specify.
USER_EXCLUSION_TEMPORARY Temporarily exclude users from the segment during periods when the user meets the userExclusionCriteria condition.
USER_EXCLUSION_PERMANENT Permanently exclude users from the segment if the user ever meets the userExclusionCriteria condition.

SessionSegment

Session segments are subsets of the sessions that occurred on your site or app: for example, all the sessions that originated from a particular advertising campaign.

JSON representation
{
  "sessionInclusionCriteria": {
    object (SessionSegmentCriteria)
  },
  "exclusion": {
    object (SessionSegmentExclusion)
  }
}
Fields
sessionInclusionCriteria

object (SessionSegmentCriteria)

Defines which sessions are included in this segment. Optional.

exclusion

object (SessionSegmentExclusion)

Defines which sessions are excluded in this segment. Optional.

SessionSegmentCriteria

A session matches a criteria if the session's events meet the conditions in the criteria.

JSON representation
{
  "andConditionGroups": [
    {
      object (SessionSegmentConditionGroup)
    }
  ]
}
Fields
andConditionGroups[]

object (SessionSegmentConditionGroup)

A session matches this criteria if the session matches each of these andConditionGroups.

SessionSegmentConditionGroup

Conditions tell Analytics what data to include in or exclude from the segment.

JSON representation
{
  "conditionScoping": enum (SessionCriteriaScoping),
  "segmentFilterExpression": {
    object (SegmentFilterExpression)
  }
}
Fields
conditionScoping

enum (SessionCriteriaScoping)

Data is included or excluded from the segment based on if it matches the condition group. This scoping defines how many events the segmentFilterExpression is evaluated on before the condition group is determined to be matched or not. For example if conditionScoping = SESSION_CRITERIA_WITHIN_SAME_SESSION, the expression is evaluated on all events in a session, and then, the condition group is determined to be matched or not for this session. For example if conditionScoping = SESSION_CRITERIA_WITHIN_SAME_EVENT, the expression is evaluated on a single event, and then, the condition group is determined to be matched or not for this session.

Optional. If unspecified, a conditionScoping of WITHIN_SAME_SESSION is used.

segmentFilterExpression

object (SegmentFilterExpression)

Data is included or excluded from the segment based on if it matches this expression. Expressions express criteria on dimension, metrics, and/or parameters.

SessionCriteriaScoping

Scoping specifies which events are considered when evaluating if a session meets a criteria.

Enums
SESSION_CRITERIA_SCOPING_UNSPECIFIED Unspecified criteria scoping. Do not specify.
SESSION_CRITERIA_WITHIN_SAME_EVENT If the criteria is satisfied within one event, the session matches the criteria.
SESSION_CRITERIA_WITHIN_SAME_SESSION If the criteria is satisfied within one session, the session matches the criteria.

SessionSegmentExclusion

Specifies which sessions are excluded in this segment.

JSON representation
{
  "sessionExclusionDuration": enum (SessionExclusionDuration),
  "sessionExclusionCriteria": {
    object (SessionSegmentCriteria)
  }
}
Fields
sessionExclusionDuration

enum (SessionExclusionDuration)

Specifies how long an exclusion will last if a session matches the sessionExclusionCriteria.

Optional. If unspecified, a sessionExclusionDuration of SESSION_EXCLUSION_TEMPORARY is used.

sessionExclusionCriteria

object (SessionSegmentCriteria)

If a session meets this condition, the session is excluded from membership in the segment for the sessionExclusionDuration.

SessionExclusionDuration

Enumerates options for how long an exclusion will last if a session matches the sessionExclusionCriteria.

Enums
SESSION_EXCLUSION_DURATION_UNSPECIFIED Unspecified exclusion duration. Do not specify.
SESSION_EXCLUSION_TEMPORARY Temporarily exclude sessions from the segment during periods when the session meets the sessionExclusionCriteria condition.
SESSION_EXCLUSION_PERMANENT Permanently exclude sessions from the segment if the session ever meets the sessionExclusionCriteria condition.

EventSegment

Event segments are subsets of events that were triggered on your site or app. for example, all purchase events made in a particular location; app_exception events that occurred on a specific operating system.

JSON representation
{
  "eventInclusionCriteria": {
    object (EventSegmentCriteria)
  },
  "exclusion": {
    object (EventSegmentExclusion)
  }
}
Fields
eventInclusionCriteria

object (EventSegmentCriteria)

Defines which events are included in this segment. Optional.

exclusion

object (EventSegmentExclusion)

Defines which events are excluded in this segment. Optional.

EventSegmentCriteria

An event matches a criteria if the event meet the conditions in the criteria.

JSON representation
{
  "andConditionGroups": [
    {
      object (EventSegmentConditionGroup)
    }
  ]
}
Fields
andConditionGroups[]

object (EventSegmentConditionGroup)

An event matches this criteria if the event matches each of these andConditionGroups.

EventSegmentConditionGroup

Conditions tell Analytics what data to include in or exclude from the segment.

JSON representation
{
  "conditionScoping": enum (EventCriteriaScoping),
  "segmentFilterExpression": {
    object (SegmentFilterExpression)
  }
}
Fields
conditionScoping

enum (EventCriteriaScoping)

conditionScoping should always be EVENT_CRITERIA_WITHIN_SAME_EVENT.

Optional. If unspecified, a conditionScoping of EVENT_CRITERIA_WITHIN_SAME_EVENT is used.

segmentFilterExpression

object (SegmentFilterExpression)

Data is included or excluded from the segment based on if it matches this expression. Expressions express criteria on dimension, metrics, and/or parameters.

EventCriteriaScoping

Scoping specifies which events are considered when evaluating if an event meets a criteria.

Enums
EVENT_CRITERIA_SCOPING_UNSPECIFIED Unspecified criteria scoping. Do not specify.
EVENT_CRITERIA_WITHIN_SAME_EVENT If the criteria is satisfied within one event, the event matches the criteria.

EventSegmentExclusion

Specifies which events are excluded in this segment.

JSON representation
{
  "eventExclusionDuration": enum (EventExclusionDuration),
  "eventExclusionCriteria": {
    object (EventSegmentCriteria)
  }
}
Fields
eventExclusionDuration

enum (EventExclusionDuration)

eventExclusionDuration should always be PERMANENTLY_EXCLUDE.

Optional. If unspecified, an eventExclusionDuration of EVENT_EXCLUSION_PERMANENT is used.

eventExclusionCriteria

object (EventSegmentCriteria)

If an event meets this condition, the event is excluded from membership in the segment for the eventExclusionDuration.

EventExclusionDuration

Enumerates options for how long an exclusion will last if an event matches the eventExclusionCriteria.

Enums
EVENT_EXCLUSION_DURATION_UNSPECIFIED Unspecified exclusion duration. Do not specify.
EVENT_EXCLUSION_PERMANENT Permanently exclude events from the segment if the event ever meets the eventExclusionCriteria condition.

FunnelSubReport

Funnel sub reports contain the dimension and metric data values. For example, 12 users reached the second step of the funnel.

JSON representation
{
  "dimensionHeaders": [
    {
      object (DimensionHeader)
    }
  ],
  "metricHeaders": [
    {
      object (MetricHeader)
    }
  ],
  "rows": [
    {
      object (Row)
    }
  ],
  "metadata": {
    object (FunnelResponseMetadata)
  }
}
Fields
dimensionHeaders[]

object (DimensionHeader)

Describes dimension columns. Funnel reports always include the funnel step dimension in sub report responses. Additional dimensions like breakdowns, dates, and next actions may be present in the response if requested.

metricHeaders[]

object (MetricHeader)

Describes metric columns. Funnel reports always include active users in sub report responses. The funnel table includes additional metrics like completion rate, abandonments, and abandonments rate.

rows[]

object (Row)

Rows of dimension value combinations and metric values in the report.

metadata

object (FunnelResponseMetadata)

Metadata for the funnel report.

FunnelResponseMetadata

The funnel report's response metadata carries additional information about the funnel report.

JSON representation
{
  "samplingMetadatas": [
    {
      object (SamplingMetadata)
    }
  ]
}
Fields
samplingMetadatas[]

object (SamplingMetadata)

If funnel report results are sampled, this describes what percentage of events were used in this funnel report. One samplingMetadatas is populated for each date range. Each samplingMetadatas corresponds to a date range in order that date ranges were specified in the request.

However if the results are not sampled, this field will not be defined.

SamplingMetadata

If funnel report results are sampled, this metadata describes what percentage of events were used in this funnel report for a date range. Sampling is the practice of analyzing a subset of all data in order to uncover the meaningful information in the larger data set.

JSON representation
{
  "samplesReadCount": string,
  "samplingSpaceSize": string
}
Fields
samplesReadCount

string (int64 format)

The total number of events read in this sampled report for a date range. This is the size of the subset this property's data that was analyzed in this funnel report.

samplingSpaceSize

string (int64 format)

The total number of events present in this property's data that could have been analyzed in this funnel report for a date range. Sampling uncovers the meaningful information about the larger data set, and this is the size of the larger data set.

To calculate the percentage of available data that was used in this funnel report, compute samplesReadCount/samplingSpaceSize.

PropertyQuota

Current state of all quotas for this Analytics Property. If any quota for a property is exhausted, all requests to that property will return Resource Exhausted errors.

JSON representation
{
  "tokensPerDay": {
    object (QuotaStatus)
  },
  "tokensPerHour": {
    object (QuotaStatus)
  },
  "concurrentRequests": {
    object (QuotaStatus)
  },
  "serverErrorsPerProjectPerHour": {
    object (QuotaStatus)
  },
  "potentiallyThresholdedRequestsPerHour": {
    object (QuotaStatus)
  },
  "tokensPerProjectPerHour": {
    object (QuotaStatus)
  }
}
Fields
tokensPerDay

object (QuotaStatus)

Standard Analytics Properties can use up to 200,000 tokens per day; Analytics 360 Properties can use 2,000,000 tokens per day. Most requests consume fewer than 10 tokens.

tokensPerHour

object (QuotaStatus)

Standard Analytics Properties can use up to 40,000 tokens per hour; Analytics 360 Properties can use 400,000 tokens per hour. An API request consumes a single number of tokens, and that number is deducted from all of the hourly, daily, and per project hourly quotas.

concurrentRequests

object (QuotaStatus)

Standard Analytics Properties can send up to 10 concurrent requests; Analytics 360 Properties can use up to 50 concurrent requests.

serverErrorsPerProjectPerHour

object (QuotaStatus)

Standard Analytics Properties and cloud project pairs can have up to 10 server errors per hour; Analytics 360 Properties and cloud project pairs can have up to 50 server errors per hour.

potentiallyThresholdedRequestsPerHour

object (QuotaStatus)

Analytics Properties can send up to 120 requests with potentially thresholded dimensions per hour. In a batch request, each report request is individually counted for this quota if the request contains potentially thresholded dimensions.

tokensPerProjectPerHour

object (QuotaStatus)

Analytics Properties can use up to 35% of their tokens per project per hour. This amounts to standard Analytics Properties can use up to 14,000 tokens per project per hour, and Analytics 360 Properties can use 140,000 tokens per project per hour. An API request consumes a single number of tokens, and that number is deducted from all of the hourly, daily, and per project hourly quotas.

QuotaStatus

Current state for a particular quota group.

JSON representation
{
  "consumed": integer,
  "remaining": integer
}
Fields
consumed

integer

Quota consumed by this request.

remaining

integer

Quota remaining after this request.