You've posed another great question. For this use case, I would recommend using the combination of a badge for the audience and setting a date for the cool down.
For example, I created a test use case to create an Audience for people that like Pepperoni Pizza, which is driven by a Pepperoni Lover Badge. The badge uses 3 enrichments:
1. Assign the badge once the user has visited a pepperoni product page 2+ times
2. Remove the badge if no date has been captured
3. Remove that badge after 2 minutes (in your case 30 days)
For the Date Attribute, I have 2 enrichments:
1. Capture the date, when the badge is assigned
2. Remove the date after 2 minutes (in your case 30 days)
That is the basic structure for how I set up a cool down. For your case, you may want to set up a cool down badge that is removed after 30 days. Hope this helps!
Hey @namngo - thank you for the detailed approach. But this would work for a fixed period / rolling of 30 days right? I am looking to limit the cool down for the particular month for the visitor, based on when they joined the audience last. For ex.
1. Visitor views the pepperoni page twice on 2/26/2020 and are badged that day and removed after 2 hrs.
2. Visitor views the pepperoni page twice again the next day 2/27/2020, but because it is still February, they do not join the audience.
3. But if the visitor comes back again in two days on 03/01/2020 and view the page twice, they will join the audience as it is a new month.
So looking to implement a rule during badging where we check what was the month when the visitor joined the audience last. And if that month = current month, they do not join the audience.
The part I am trying to figure out is how to extract the month from the date. And the fact that can we even refer to the date when a visitor joined the audience last? Probably store the date with visitor ID somewhere like a Google Sheet and look it up again everytime?
Appreciate any help around this.
Gotcha! So there is a way to do that, except you would need to adjust the rule every month:
You could set a badge or remove a badge with a rule that states the date is greater than or less than a specific date.
Might be best to calculate the Date in EPOCH.
Alternatively, you could parse and transform the date and pass the current and next month as a number attribute and base your rules on that.
Hope this helps!
So I tested this out. You can calculate the last date of the month and set it as a string type. For example, I have in my data layer myDate as "2019-01-01"
What this means is that you could calculate the last day of the month and set it to a string in this format "yyyy-MM-dd"
Next, create an Event Attribute to capture the date string:
Then create an Audience Stream Attribute that is enriched off of the Event Stream Attribute:
As you can see, the date is capture in a trace in this format 1-1-2019
And so it can be used as part of conditional logic for a cooldown
I do want to add that this is not a common request that we implement and I advise you to test to ensure it is working correctly. Also if you are wanting to set up a cooldown in order to send data via an Audience Stream Connector, most Vendors have a cool down option, so looking into that may save you some time.