How to ensure actions occur in the same HIT?

Silver Contributor
Silver Contributor

Hi all,

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.

Regards,

Jody

7 REPLIES 7

How to ensure actions occur in the same HIT?

Tealium Employee

Hi @wangting 

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.

TwoEnrichments.pngOneEnrichment.png

How to ensure actions occur in the same HIT?

Silver Contributor
Silver Contributor

Thanks your suggestion, will use your recommended way to modify audience!

How to ensure actions occur in the same HIT?

Silver Contributor
Silver Contributor

Hi Mark, 

If the criteria get a bit hard such as (A OR B) AND (C OR D) AND (E OR F) or even more variables. Are there any better solution besides creating multiple rules based on possibilibities of all combination?

 

How to ensure actions occur in the same HIT?

Silver Contributor
Silver Contributor

Hi Mark,

One more, I actually built audience in this way, wondering any difference from your versions?

Capture.JPG

How to ensure actions occur in the same HIT?

Tealium Employee

Hi @wangting Can you post a screenshot of the "JTest - Card pages" rule you posted above, but in the "Edit Rule" view?

How to ensure actions occur in the same HIT?

Silver Contributor
Silver Contributor

Capture2.JPG

How to ensure actions occur in the same HIT?

Tealium Employee

Hi @wangting I'd suggest emailing support@tealium.com to check out that rule, since your two screenshots don't agree.

In general;

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.

Public