Expand my Community achievements bar.

SOLVED

Ad Hoc Analysis Segment Builder - MATCHES vs. EQUALS

Avatar

Level 1

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

1 Accepted Solution

Avatar

Correct answer by
Employee

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

View solution in original post

5 Replies

Avatar

Employee

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

Avatar

Level 1

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?

Avatar

Correct answer by
Employee

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

Avatar

Level 1

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?

Avatar

Employee

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