Skip to main content
Oct 16, 2015 2:27 AM UTC
Solved

Ad Hoc Analysis Segment Builder - MATCHES vs. EQUALS

Hey there,

Can someone tell me what the difference between "MATCHES" and "EQUALS" is when used in the segment builder?  And when I would use MATCHES and not EQUALS?  

I used them the same way and both gave me the same result.

Thanks,

Rose

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
BrianAu1Accepted solution
Adobe Employee
Oct 16, 2015 2:27 AM UTC

The way to put it would be that EQUALS and MATCHES are identical and do that same thing except MATCHES is intended for use when you also apply a (*) wildcard in your value. CONTAINS is different than MATCHES in that is that it will match on substring.

http://microsite.omniture.com/t2/help/en_US/analytics/segment/seg_operators.html

equals Returns items that match exactly for a numeric or string value. [Note: If using wildcard characters, use the "matches" operator.]

matches  Returns items that match exactly based on a given numeric or string value. [Note: Use this operator when using wildcard (globbing) features.]

contains  Returns items that compare to the substrings of the values entered. For example, if the rule for "Page" contains "Search", then it will match any page that has the substring "Search" in it, including "Search Results", "Search", and "Searching".

Best,

Brian

5 replies

Adobe Employee
Oct 16, 2015 2:27 AM UTC

MATCHES does not work on substring and only CONTAINS works on substring.

The best course would be to verify the filters against your implementation on live example values.

Best,

Brian

Translate
Oct 16, 2015 2:27 AM UTC

Thanks again, Brian - this is helpful.  Just so I fully understand, can you provide an example of when MATCHES vs. CONTAINS would differ?  

Using the "Search" example below, if the rule for "Page" MATCHES "Search", then it will match any page that has the substring "Search" in it, including "Search Results", "Search", and "Searching"?  i.e. same as CONTAINS?

Translate
BrianAu1Adobe EmployeeAccepted solution
Adobe Employee
Oct 16, 2015 2:27 AM UTC

The way to put it would be that EQUALS and MATCHES are identical and do that same thing except MATCHES is intended for use when you also apply a (*) wildcard in your value. CONTAINS is different than MATCHES in that is that it will match on substring.

http://microsite.omniture.com/t2/help/en_US/analytics/segment/seg_operators.html

equals Returns items that match exactly for a numeric or string value. [Note: If using wildcard characters, use the "matches" operator.]

matches  Returns items that match exactly based on a given numeric or string value. [Note: Use this operator when using wildcard (globbing) features.]

contains  Returns items that compare to the substrings of the values entered. For example, if the rule for "Page" contains "Search", then it will match any page that has the substring "Search" in it, including "Search Results", "Search", and "Searching".

Best,

Brian

Translate
Oct 16, 2015 2:27 AM UTC

Thanks for the quick response!   Based on your description, doesn't MATCHES then do the same thing as CONTAINS?  When would I used MATCHES and not CONTAINS?

Translate
Adobe Employee
Oct 16, 2015 2:27 AM UTC

Hi,

Equals is it must match as an exact full string value statement. Matches will pull in anything of which the value string matches up with in part. You may see the same results depending on the data set in question.

You would use equals when you have a specific value(s) in mind. You would use matches if you also want to potentially pull in other associated values based on your defined logic criteria.

Best,

Brian

Translate