jdeboer/ganalytics

Language for defining segments

jdeboer opened this issue · 1 comments

Example of a proposed idea for expressing a sequence:

segment(
  perUser(
    expr1, # treat an expression as 'condition type segment filter' by default
    perHit(
      metrixExpr1
    )
  ),
  sequence(
    epxr2,
    then(expr3), # 'then' means 'immediately followed by'
    later(expr4) # 'later' means 'followed by', but not necessarily immediately.
  ),
  sequence(
    first(expr5), # First expressly means 'first interaction' within the date range.
    then(expr6), # By default, treat an expression within a sequence as happening
    expr7 # at any point after any preceding steps in the sequence, i.e. 'later'.
  )
)

Has now been implemented.