Skip to content
  • There are no suggestions because the search field is empty.

Running an Experience during a scheduled time period

Limit an experience to set days, hours or an exact date range

 THIS ARTICLE WILL HELP YOU:


Choose the right way to limit when an experience runs

There are three ways, depending on what you need:

  • Start and end on set dates. Use scheduling. The experience's status changes on its own, so nobody sees it before the start or after the end. See Scheduling Experiences.
  • Only on certain days or at certain hours, every week. For example, weekdays from 9:00 to 17:00. Use the Visit Time rules in an audience. The experience stays Active and only shows during those times.
  • Between two exact moments while the experience stays Active. For example, a holiday banner from midnight on December 24 to the end of December 26. Use a JS condition in an audience.

Run it only on certain days or hours

Create an audience and add rules from the Visit Time group. Day of week, Hour of day and Minute use the time on each visitor's own device, so they follow each visitor's local hours.

Hours use the 24-hour clock (0 to 23). For Day of week you pick days from a list. With Equals, the rule matches on any of the days you pick. With Is not equal, picking several days makes the rule match every day, so to leave out days, use Equals with the days you want instead.

For example, to run an experience on weekdays from 9:00 to 17:00 in each visitor's local time, add these rules joined with AND:

  • Day of week Equals Monday, Tuesday, Wednesday, Thursday, Friday
  • Hour of day Greater than or equal 9
  • Hour of day Less than 17

Then add the audience to your experience. Set the audience type as described in Stop it for visitors who are already in it.

Use the hours of one time zone for every visitor

The Project tz - Week day, Project tz - Day hour and Project tz - Minute rules use your project's time zone setting. They can be an hour off for some visitors, for example while a visitor's device is on daylight saving time. For exact hours in one time zone, add this as a JS Condition in the audience instead:

(function () {
  var parts = new Intl.DateTimeFormat('en-US', { timeZone: 'Europe/Berlin', weekday: 'short', hour: 'numeric', hourCycle: 'h23' }).formatToParts(new Date());
  var day = '', hour = -1;
  parts.forEach(function (p) {
    if (p.type === 'weekday') day = p.value;
    if (p.type === 'hour') hour = Number(p.value);
  });
  return ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'].indexOf(day) !== -1 && hour >= 9 && hour < 17;
})()

Replace Europe/Berlin with your time zone's name from the list of time zone names, such as America/New_York or Asia/Tokyo, and change the days and the hours 9 and 17 to yours. The condition follows daylight saving time in that zone by itself.

Run it between two exact dates and times

Add a JS Condition to the experience's audience with this code, and change the two dates:

(function () {
  var start = Date.parse('2026-12-24T00:00:00+01:00'); // when it starts showing
  var end = Date.parse('2026-12-26T23:59:59+01:00');   // when it stops
  var now = Date.now();
  return now >= start && now <= end;
})()

Write each date as year-month-day, then T, then the time, then the time zone offset. In the example, +01:00 is Central European winter time. Use Z instead of an offset for UTC, for example 2026-12-24T00:00:00Z.

The condition reads the clock on the visitor's device, so a visitor whose clock is wrong may see the experience a little early or late. It doesn't need any extra library.

If you used the earlier version of this article, you can remove the Moment.js library from your Project Global JS once no other code uses it. Convert doesn't include Moment.js, and the old condition kept rechecking on pages where the library hadn't loaded.

Stop it for visitors who are already in it

Set the audience type to Transient. A transient audience is checked every time the visitor reaches the experience, so the experience stops showing as soon as the time window closes.

With a Permanent audience, the conditions are only checked until the visitor is bucketed. A visitor who joined during the window keeps seeing the experience after it closes. See Select Audience Type for more.

Visitors who saw the experience during the window stay in its report.