I’m creating audiences on Google Analytics 4 and I found that there is quota when applying conditions to the same audience. Therefore I am trying to use regex to solve the issue.
The goal is to include audiences completed purchase event with item_name contains any of the below terms: Cappuccino, Flat White, Mocha, Latte, Americano, Ovaltine, Bubble Milk, Croissant, Sugar Loaf, Thick Toast, Mini Donuts, Ciabatta, Pizza Bread, Baked Pasta, mousse cake, cheesecake, tiramisu
The regex I’m trying to apply to acheieve the above goal is:
- purchase event WITH condition item_name matches regex
(^Flat White$).*|(^Bubble Milk$).*|(^Sugar Loaf$).*|(^Thick Toast$).*|(^Mini Donuts$).*|(^Pizza Bread$).*|(^Baked Pasta$).*|(^mousse cake$).*
OR - purchase event WITH condition item_name matches regex
^(Cappuccino|Mocha|Latte|Americano|Ovaltine|Croissant|Ciabatta|mccafe|cheesecake|tiramisu)
Any experts can tell if I applying a correct regex?
The audience pool is still smaller than expected, is there anything wrong on the above regex?
You can try constructing the regex so that it matches 1 OR 2 like this:
Here is a link to play around with the regex