Learn R Programming

ganalytics (version 0.10.7)

PerHit: PerHit

Description

Set the scope of a gaMetExpr object to hit-level, or transforms a condition filter to a sequence filter of length one (i.e. a combination of conditions for matching a single hit).

Usage

PerHit(object, ..., negation)

# S4 method for .compoundExpr PerHit(object, ..., negation)

# S4 method for gaMetExpr PerHit(object, ..., negation)

# S4 method for formula PerHit(object, ..., negation)

Arguments

object

A gaMetExpr object to coerce to hit-level or if multiple expressions are provided, then the first expression to combine into a single step sequence filter.

...

Further expressions to be included in the filter definition if defining a sequence filter of length one.

negation

Boolean value indicating whether to negate the condition.

Value

A gaMetExpr or gaSegmentSequenceFilter.

Methods (by class)

  • .compoundExpr: Create a single step sequence filter from the supplied expression.

  • gaMetExpr: Set the scope of the supplied metric condition to hit-level.

  • formula: Set the scope of the supplied non-standard-evaluation metric condition to hit-level.

See Also

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

Examples

Run this code
# NOT RUN {
spent_more_than_100_in_a_transaction <- PerHit(Expr(~transactionRevenue > 100))
played_intro_video <- PerHit(
  Expr(~eventCategory == "Video") &
  Expr(~eventAction == "Play") &
  Expr(~eventLabel == "Intro")
)

# }

Run the code above in your browser using DataLab