Skip to main content

I’m trying to create a derived property that has a value based on event name. If it ends in “Viewed”, it is a “Pageview”, ends in “Clicked” it’s a Click.  Otherwise it’s Other.

What am I doing wrong in this?

 

I figured this out!  the regex wasn’t matching correctly.  The correct formula is:

 

SWITCH(
REGEXEXTRACT(
PROPERTY(
'event_type_value',
'event'
),
'(Viewed|Clicked)$'
),
'Viewed',
'Pageview',
'Clicked',
'Click'
)

 


Reply