Description Usage Arguments Value Methods (by class) See Also Examples
Get the list of segments from the object or coerce the supplied objects into a a named list of segments.
Set the segments of the query object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
object |
A query object to get the segment list from or to set the segment list of. |
... |
Alternatively, provide one or more named arguments (segments or objects that can be coerced into segments) including dynamic segments, built-in and/or custom segments by their ID. |
value |
A named list of segments or a single segment. |
A gaSegmentList
gaSegmentList
: Returns itself
gaQuery
: Return the definition of the segment applied to the view.
ANY
: Coerce an object into a segmentList of length 1.
gaQuery
: Set the segments to be used within a query.
Other dynamic segment functions: DynSegment
,
Exclude
, Include
,
IsNegated
, PerHit
,
PerProduct
, PerSession
,
PerUser
, ScopeLevel
,
SegmentConditionFilter
,
Segment
Other dynamic segment functions: DynSegment
,
Exclude
, Include
,
IsNegated
, PerHit
,
PerProduct
, PerSession
,
PerUser
, ScopeLevel
,
SegmentConditionFilter
,
Segment
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | my_segments <- Segments(list(
bounces = PerSession(Expr(~bounces != 0)),
conversions = PerUser(Expr(~goalCompletionsAll > 0) | Expr(~transactions > 0)),
mobile_or_tablet = Expr(~deviceCategory %in% c("mobile", "tablet")),
multi_session_users = Include(PerUser(Expr(~sessions > 1)), scope = "users"),
new_desktop_users = Expr(~deviceCategory == "desktop") & Expr(~userType == "new")
))
my_query <- GaQuery(view = "987654321")
my_segments_list <- list(
bounces = PerSession(Expr(~bounces != 0)),
conversions = PerUser(Expr(~goalCompletionsAll > 0) | Expr(~transactions > 0)),
mobile_or_tablet = Expr(~deviceCategory %in% c("mobile", "tablet")),
multi_session_users = Include(PerUser(Expr(~sessions > 1)), scope = "users"),
new_desktop_users = Expr(~deviceCategory == "desktop") & Expr(~userType == "new")
)
Segments(my_query) <- my_segments_list
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.