I've merged your two posts together, as they are basically the same question asked slightly different ways.
The segment that you created looking at the URL contains, can work... however, IF your site is large, with a lot of different URLs, and if your URL dimension contains campaign parameters, yo...