<@U01TCPDB58C> How feasible would it be to develop...
# contributing
h
@future-teacher-7046 How feasible would it be to develop “OR” operators for adding metrics (with Mixpanel data source)?
f
Probably not too hard
f
It's really easy to just give you a javascript input where you can write whatever conditions you want.
h
i mean sure I can javascript
just for some context, my use case right now is I have two different IDs that I need to track as part of an event, so ideally I can just so “Event Name” where property = a or property = b
If that’s something you guys can jazz up, would be great. In the meantime, I have to make one metric per unique ID and that makes it difficult to fully understand the results
f
Raw javascript input is the fastest to implement. I can see us adding more operators in the future too, like
is in the list
. Also, last week we just launched support for "OR" in the event name. So you can now do something like
Viewed Cart OR Purchased
to match multiple events.
h
Happy to get a raw JS input 🙂
Not sure I’m seeing the OR in the event name… maybe not for Mixpanel data source?
f
It's still just a single text input, but you can now type "OR" to separate multiple event names
It copies the syntax Mixpanel uses for their custom events
Actually, I just realized we already have regular expression support. You can use that match against multiple values.
The
~
operator is a regular expression match.
h
ah cool
cool lets see if this works
got an error
do I need to wrap it in parenthesis myself?
nope that didnt do it either
f
Looks like that event property doesn't exist for every event
We should fix that on our end. For now, for the property name can you try this?
Copy code
(event.properties.videoId||"")
h
how do I input that into the UI?
f
Instead of
videoId
in the condition
h
great that seems to have successfully queried, let me check now that its actualy the right data