Description Usage Arguments Methods (by class) See Also Examples
Create a new gaSequence object
1 2 3 4 5 6 7 8 9 10 11 12 13 |
object |
A sequence step or another expression that should be coerced to a sequence condition. |
... |
Other steps within the sequence condition, in the order in which they should be applied. |
negation |
Logical TRUE or FALSE to match segments where this sequence has not occurred. |
scope |
Optional scope, "users" or "sessions". |
.compoundExpr
: Defines a sequence step using the supplied expression that does
not need to be immediately at the start nor immediately following any
preceding step.
.compoundExpr
: Defines a sequential step using the supplied expression
that should immediately follow any preceding step or be the very first
required interaction in any sequences being matched to this sequential
segment definition.
.compoundExpr
: Alias to Then.
ANY
: Return a sequence of one or more steps using the
supplied expression(s) that define the steps, where those step can occur
anywhere within the sequences of interactions being matched, but in the
order specified.
Other sequence segment functions: First
,
Later
, Then
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | expr1 <- Expr(~pagepath == "/")
expr2 <- Expr(~eventCategory == "video")
expr3 <- Expr(~timeOnPage > 10)
expr4 <- Expr(~transactionRevenue > 10)
expr5 <- expr1 & expr2
expr6 <- Expr(~eventAction == "click")
expr7 <- Expr(~eventCategory == "video") & Expr(~eventAction == "play")
expr8 <- Expr(~source == "google")
Segment(
PerUser(
expr1, # treat an expression as 'condition type segment filter' by default
PerHit(expr3)
),
Sequence(
expr2,
Then(expr4), # 'then' means 'immediately followed by'.
Later(expr5) # 'later' means 'followed by', but not necessarily immediately.
),
Sequence(
First(expr6), # First expressly means 'first interaction' within the date range.
Then(expr7), # By default, treat an expression within a sequence as happening
expr8 # at any point after any preceding steps in the sequence, i.e. 'later'.
)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.