Skip to main content

How to Create a Calendar Campaign

Learn how to create a calendar campaign in Triggerbee.

Updated yesterday

Calendar Campaigns are multi-day onsite experiences that automatically reveal one offer or "door" per day. They are perfect for daily offers and seasonal campaigns like Christmas calendars, Black Week countdowns, or other week / month-long campaigns.

All available calendar templates can be accessed directly here: Calendar Templates.

You must be logged in to your Triggerbee account for the link to open the template gallery.

Use Beesly for guided help

Our in-app chat bot can give you step-by-step instructions and answer questions along the way. Just click on Ask Beesly and open the chat in the bottom left corner to get guidance!

Types of Calendar Campaigns available

There are two types of calendar campaign templates available.

Advanced

Dynamic, timezone-aware calendar using JavaScript generator

Yes (2 scripts)

Simple

Static image-based version (manual editing only)

No (or minimal script)

How to create a calendar campaign

1. Advanced Calendar Campaigns (Script-Based)

Advanced calendar campaigns use JavaScript to handle logic such as door unlocking, date progression, and today’s offer display. We've built a calendar script generator so you don't need to be a developer to set one up yourself.

Available templates: Advanced Calendars

These are the template names of all advanced calendar campaigns currently available as of Nov 10, 2025.

Preview

Template Name

Days

Sign up

Note

Image Title

Dynamic Christmas Calendar

24

❌ No

Sign up form can be added

Image Title

Dynamic Christmas Calendar with Sign-up

24

✅ Yes

Image Title

Dynamic Christmas Calendar with Scratch Off

24

❌ No

Sign up form can be added

Image Title

Black Week 7-Day Calendar

7

❌ No

Sign up form can be added

Image Title

Black Week 7-Day Calendar with Sign-up

7

✅ Yes

Structure

Advanced calendar campaigns have a simple setup. Most of the functionality is controlled by the scripts.

  • Slides / Steps: 2 (plus one instruction slide that should be deleted before publishing)

  • Main components: Columns, images, text, and buttons

  • Scripts: Two — one in Step Changed (the generator script) and one in Widget Opened (the static script)
    These campaigns can run for either 7 days (short campaigns like Black Week) or 24 days (longer campaigns like Christmas calendars).

Step by step

  1. Go to Onsite Experiences → New Campaign.

  2. Select your calendar template from this link.

  3. Open the Calendar Generator in a new browser tab.

    1. Add your calendar content (images, URLs, and text) in the generator.

  4. Copy the generated script.

  5. In your campaign editor, go to Custom Scripts (left menu) → JavaScript → Step Changed and replace the default script with your generated one. See the video on where to place your generated script.

  6. Customize the campaign by changing colors, replacing images, etc, to make it fit your brand and campaign. The components in Step 2 (Door content) must NOT be removed.

  7. Test your campaign:

    • Under Step Changed, temporarily change TEST_DATE to a date (e.g., "2025-12-03").

    • Click Preview to check the correct door highlight and offer.

    • Remove TEST_DATE before publishing.

Using the calendar generator

The Calendar Generator is where you create the content and logic for your advanced calendar campaigns. You’ll use it to set up all doors, dates, and links before copying the final JavaScript code into your campaign.

Here’s how it works:

  1. Select a date template

    • Black Week (Mon–Sun) for a 7-day calendar.

    • Christmas Calendar (Dec 1–24) for a 24-day campaign.

  2. Select timezone (optional)
    Europe/Stockholm is selected by default. Change this only if your campaign targets another region.

  3. Edit your fallback message
    The fallback message appears when a visitor tries to open a door before it’s unlocked. Example: Come back on {{NEXT_DATE}}

  4. Add door content

    Each door includes:

    • Image URL (calendarImg) – the image displayed for that day.

    • Title (calendarTitle) – the headline shown above the offer.

    • Door content (calendarText) – the text or description of the offer.

    • CTA URL (calendarCTA) – the link your button opens.

  5. Preview your door
    Use the preview box on the right to check how each day’s door looks before generating your script.

  6. Generate and copy your script
    When all doors are filled in, click “Generate calendar code”, then Copy code.
    You’ll paste this code in your campaign under Custom Scripts → JavaScript → Step Changed.

Testing your calendar

Testing your calendar involves a bit of JavaScript editing, but don’t worry, you can do it yourself without knowing any code.


Follow the steps below to temporarily set a test date so you can preview specific days in your campaign before publishing.

Step 1

In the campaign editor, go to Custom scripts > Javascript > Widget Opened.

Find line 10 (const TEST_DATE = null) and change null to any date within the date range of the campaign.

Default value

With test date set

const TEST_DATE = null;
const TEST_DATE = "2025-12-05";

The test date must be within the date range of the calendar. For example, if you use a christmas calendar, the date range will be dec 1 - dec 24 (2025-12-01 - 2025-12-24).

Set the test date to any day within that date range in the format yyyy-mm-dd.

Step 2

Click on the "Widget Opened" dropdown and select Step Changed.

Find line 12 and replace "null" with the same date as you used in Widget Opened

Ensure that both line 10 in Widget Opened and line 12 in Step Changed have the same date. If the dates mismatch, test mode will not work.

Correct:

Javascript state

Line

Test value

Date match?

Default

Widget Opened

10

"2025-12-05"

✅ Dec 5

null

Step Changed

12

"2025-12-05"

✅ Dec 5

null

Incorrect (date mismatch)

Javascript state

Line

Test value

Date match?

Default

Widget Opened

10

"2025-12-05"

❌ Dec 5

null

Step Changed

12

"2025-12-12"

❌ Dec 12

null

Step 3

Click Save to save your changes, and Preview your campaign. If you're using an embedded layout, make sure you have the embedded snippet on your page.

After confirming that everything looks correct, repeat steps 1 and 2, but instead of adding dates, remove the date and write null to deactivate test mode.

Notes

  • The campaign is timezone-aware and uses the visitor’s local time.

  • Works as both overlay or embedded (select under Layout).

  • Doors unlock automatically based on your start and end dates.

Common Pitfalls

Issue

Cause

Fix

Calendar stuck on first door

TEST_DATE still active or mismatched dates

Remove TEST_DATE or sync start/end dates

Door content not updating

Required component IDs missing

Restore default component IDs. See below.

Wrong day highlighted

Timezone mismatch

Confirm correct timezone in script. Change the timezone in the calendar generator and repeat all steps.

CTA not working

Missing URL in generator

Add CTA link for each day in the generator

All doors visible

Wrong template type

Use an Advanced (script based) calendar template

Default ID's and Component Structure (Advanced calendars)

Each door and offer relies on specific component IDs. If removed or renamed, the script will not update correctly.

Order of appearance

Component type

Custom ID

Notes

1

Headline

(none)

Freely editable

2

Image

calendarImg

ID must remain unchanged

3

Headline

calendarTitle

ID must remain unchanged

4

Headline

calendarText

ID must remain unchanged

5

Button

calendarCTA

ID must remain unchanged

6

Button (Back)

(none)

Freely editable, optional

To verify IDs: Click the component → Right panel → General → Advanced.

Troubleshooting for script-based campaigns

Check

Expected

Script placement

Step Changed = generator script, Widget Opened = static script

Matching dates (not test mode)

START_DATE and END_DATE identical in both scripts

Matching test dates

TEST_DATE identical in both scripts

Timezone

Correct (e.g., Europe/Stockholm)

Variant

VARIANT: 24 or VARIANT: 7 matches campaign type

TEST_DATE

Must be null before publishing

Component IDs

calendarImg, calendarTitle, calendarText, calendarCTA

2. Simple Calendar Campaigns (No Script)

Simple calendar campaigns use static images, steps, and links to create a calendar experience. You manually replace each day’s image and (optionally) add links.

Available Templates: Simple Calendars

These are the template names of all advanced calendar campaigns currently available as of Nov 10, 2025.

Preview

Template Name

Days

Notes

Image Title

Black Week Calendar Open Doors

7

Images and links.

Image Title

Christmas Calendar Open Doors

24

Images and links. Contains a script that highlights today's date.

Image Title

Christmas calendar

1

Uses scheduling and manual adjustment each day.

Step by step

  1. Go to Onsite Experiences → New Campaign.

  2. Select a Simple Calendar template (See above).

  3. Edit colors, fonts, and styles. Replace each image in the editor with your daily image.

  4. (Optional) Add a link under Actions to direct each day to an offer or product page.

  5. If using the template Christmas Calendar Open Doors, don’t modify the built-in script.

  6. Preview the campaign and check each door.

  7. Remove any test steps before publishing.

Tip

You can switch from embedded to overlay if you prefer the calendar to pop up instead of sitting inline.

Did this answer your question?