I'm trying to create a audience of visitors who press the 'Start Now' button from credit card page. Initially I would like to put all actions within one rule, however, it seems (A OR B) AND C is not supported in rule building, I have to split it up as below two rules.
Rule 1: URL contains "card" OR page category='Card'
Rule 2: action content="button:start now"
Attribute: Assign Basge (Rule 1 AND Rule 2)
My questions is that I use above attribute to create the audience, will this ensure both occur in the same HIT? I only want to capture audience who click on 'Start Now' button from card page, not other pages. I'm thinking should I create visit level audience instead of visitor level? Appreiciate if someone can give me some guidance on this, thanks.
Solved! Go to Solution.
To do (A OR B) AND C in server side CDH, you can do (A AND C) OR (B AND C)
You actually have a couple of different ways of doing this - you can do it all in a single enrichment, or do it in two enrichments. This is because having two enrichments that assign a badge is equivalent to an OR - if the rule for either enrichment is true, then the badge is assigned. Both ways are shown below. My preference is two enrichments, as the rules are simpler. Simpler rules are (a) easier to name and (b) more likely to end up being reused.
As for using a visitor level badge vs a visit level, that depends on your use case. If you want the user to join the audience the first time they do this action only, then a badge is a good choice. If you want them to be able to join the audience again on the next visit where they repeat the action, then a visit level boolean would be a better choice. However, if you go with the visitor level badge and later want to change that, you could add a first enrichment to the badge that removes the badge on any new visit as a quick way to convert it from visitor based to visit based.
Hi @wangting I'd suggest emailing email@example.com to check out that rule, since your two screenshots don't agree.
If you want to express the logic (A OR B) AND C, then the way to do it in a single rule is (A AND C) OR (B AND C) as I've illustrated.
If you find that the rule is getting overly complex, then you can split out the logic into multiple enrichments. I've given a simple example above. In AudienceStream, each enrichment for a single attribute is run in turn for each event, top to bottom, as long as the rule for each enrichment is true on that event. You can use this to achieve most logic that you need.