segment_element
is the lowest hierarchy of segment creation, for which you will also need:
segment_define : AND combination of segmentFilters
segment_element that are combined in OR lists for segment_vectors_*
segment_element(
name,
operator = c("REGEXP", "BEGINS_WITH", "ENDS_WITH", "PARTIAL", "EXACT", "IN_LIST",
"NUMERIC_LESS_THAN", "NUMERIC_GREATER_THAN", "NUMERIC_BETWEEN", "LESS_THAN",
"GREATER_THAN", "EQUAL", "BETWEEN"),
type = c("METRIC", "DIMENSION"),
not = FALSE,
expressions = NULL,
caseSensitive = NULL,
minComparisonValue = NULL,
maxComparisonValue = NULL,
scope = c("SESSION", "USER", "HIT", "PRODUCT"),
comparisonValue = NULL,
matchType = c("PRECEDES", "IMMEDIATELY_PRECEDES")
)
Name of the GA metric or dimension to segment on
How name shall operate on expression or comparisonValue
A metric or dimension based segment element
Should the element be the negation of what is defined
[dim] What the name shall compare to
[dim] Whether to be case sensitive
[dim] Minimum comparison values for BETWEEN
Max comparison value for BETWEEN operator
[met] Scope of the metric value
[met] What the name shall compare to
If used in sequence segment, what behaviour
An SegmentFilterClause object
Other v4 segment functions:
segment_define()
,
segment_ga4
,
segment_vector_sequence()
,
segment_vector_simple()