ScopeLevel: ScopeLevel

Description Usage Arguments Value Methods (by class) See Also Examples

Description

Get or set the scope level of a .gaSegmentFilter or gaMetExpr.

Set the scope level of a .gaSegmentFilter or a gaMetExpr.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
ScopeLevel(object, value)

ScopeLevel(object) <- value

## S4 method for signature 'gaSegMetExpr,missing'
ScopeLevel(object)

## S4 method for signature 'gaSegMetExpr,character'
ScopeLevel(object, value)

## S4 replacement method for signature 'gaMetExpr,character'
ScopeLevel(object) <- value

## S4 method for signature '.gaSegmentFilter,missing'
ScopeLevel(object)

## S4 method for signature '.gaSegmentFilter,character'
ScopeLevel(object, value)

## S4 replacement method for signature '.gaSegmentFilter,character'
ScopeLevel(object) <- value

## S4 replacement method for signature 'gaDynSegment,character'
ScopeLevel(object) <- value

Arguments

object

A .gaSegmentFilter or gaMetExpr object.

value

Optional new scope level to return an updated copy of the object with the new scope applied. For .gaSegmentFilters this can be either 'users' or 'sessions'. For metric expressions use either 'perUser', 'perSession', 'perHit' or 'perProduct'.

Value

The scope level as a character string, or returns a .gaSegmentFilter or gaMetExpr object with the newly set scope.

Methods (by class)

See Also

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

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

Examples

1
2
3
4
5
sessions_with_value <- Expr(~eventValue > 0, metricScope = "perSession")
ScopeLevel(sessions_with_value)
users_with_value_sessions <- Include(sessions_with_value)
ScopeLevel(users_with_value_sessions) <- "users"
sessions_with_value_segment <- ScopeLevel(users_with_value_sessions, "sessions")

ganalytics documentation built on May 2, 2019, 8:34 a.m.