Learn R Programming

ganalytics (version 0.10.7)

SegmentConditionFilter: SegmentConditionFilter

Description

Create a new gaSegmentConditionFilter object

Usage

SegmentConditionFilter(object, ..., negation, scope)

# S4 method for ANY SegmentConditionFilter(object, ..., negation, scope)

Arguments

object

An expression to be used as a non-sequential segment condition.

...

Other expressions to be Anded to the first expression provided.

negation

Optional logical TRUE or FALSE to match segments where this condition has not been met. Default is FALSE, i.e. inclusive filter.

scope

Optional scope, "users" or "sessions" (default).

Value

A gaSegmentConditionFilter object.

Methods (by class)

  • ANY: Create a non-sequential segment condition filter from one or more expressions. All conditions within the filter must hold true within a single session if applied to a gaDynSegment scoped at session-level, or to a single hit if scoped at user-level.

See Also

Other dynamic segment functions: DynSegment, Exclude, Include, IsNegated, PerHit, PerProduct, PerSession, PerUser, ScopeLevel, Segments, Segment

Examples

Run this code
# NOT RUN {
bounced_sessions <- SegmentConditionFilter(Expr(~bounces > 0))
return_shoppers <- SegmentConditionFilter(
  Expr(~transactions > 1, metricScope = "perUser"),
  scope = "users"
)

# }

Run the code above in your browser using DataLab