Define a cooldown within a calendar month

Bronze Contributor
Bronze Contributor

Hi - is there a way to define a cooldown period to be within a month? I'm bascially looking to supress actions for an audience if they have already been actioned upon within a calendar month.

5 REPLIES 5

Define a cooldown within a calendar month

Employee Emeritus

Hi @jshah 

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)

 

services-nam-ngo | main 2020-02-27 16-54-19.png

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)

services-nam-ngo | main 2020-02-27 16-53-24.png

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!

Define a cooldown within a calendar month

Bronze Contributor
Bronze Contributor

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.

Define a cooldown within a calendar month

Employee Emeritus

Hi @jshah 

 

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.

services-nam-ngo | main 2020-02-28 08-58-46.png

You could probably make this dynamic by adding a UDO variable that passes the last day of every month (using javascript) and is captured by a Date attribute.  Then use that date attribute to as the basis for the condition within your rule.

 

Logic:

  • User visits site on 2/27/2020
  • lastDay variable is calculated on client-side and set in UDO variable
  • Create lastDay Event Attribute that is enriched by UDO variable
  • Create Last Day of Month Attribute that is enriched by lastDay attribute
  • Use Last Day of Month Attribute in rule for cooldown

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!

 

Define a cooldown within a calendar month

Employee Emeritus

Hi @jshah 

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"

home.ejs — localnatives 2020-02-28 09-53-38.png

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:

services-nam-ngo | main 2020-02-28 09-55-43.png

Then create an Audience Stream Attribute that is enriched off of the Event Stream Attribute:

services-nam-ngo | main 2020-02-28 09-56-48.png

As you can see, the date is capture in a trace in this format 1-1-2019

services-nam-ngo | main 2020-02-28 09-58-35.png

And so it can be used as part of conditional logic for a cooldown

services-nam-ngo | main 2020-02-28 09-59-36.png

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.

 

Cheers!

Define a cooldown within a calendar month

Bronze Contributor
Bronze Contributor

Thank you @namngo - will try this approach. And yes, will be using an Adobe Campaign connector, but the cooldown options are only absolute time periods / rolling days. No option to restrict it a calendar month.

Public