Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Expired promotion date still showing after deploy: how to fix it

OPS-303Medium impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

A hardcoded promotion date is a fixed date written directly into your site's code or content, such as Sale ends 31 March in a template, or new Date('2025-03-31') in a countdown script. Nobody has to update it for it to keep working, which is the problem. When the date passes, the page keeps saying the offer is live.

Why it costs you leads or sales

An expired offer hurts in several ways. Visitors who click an ad promising a sale find a past date and lose trust. Some leave. Others complete the purchase and then ask for the discount you no longer give, which creates support work and refunds.

Conversion rate before and after the offer expires on the pageExample numbers
Conversion rate before and after the offer expires on the page (example)Offer live: 4 %; Expired date showing: 1.5 %02341.5Offer liveExpired date showing%

Example: illustrative numbers only. A landing page converting at 4% with a live offer might drop sharply once the page shows an expired date.

Where an expired date breaks the funnel
  1. Ad clickAd promises the sale
  2. Landing pageShows 'Ends 31 March' after that date
  3. TrustVisitor doubts the offer
  4. Checkout or formNever reached

The ad is still running, but the page contradicts it.

How to check if your site has it

Start with the pages your ads and emails link to. Read the banners, hero text, pricing blocks, popups and footers with fresh eyes, then search the code.

Manual checks
  • Open each live landing page in a private window and read every date, price and offer line.
  • Check the countdown timer: does it show zero, negative values or a past date?
  • Look at the page after your last deploy, not only in the CMS preview.
  • Search your code repository for month names, years and strings like 'ends', 'until' and 'sale'.
  • Search for date literals such as new Date( with a fixed value.
  • Check popups, exit-intent overlays, email capture bars and the mobile view.
  • Check the page source, because some banners are injected by scripts or plugins.
Search a codebase for hardcoded dates and promo wordingbash
grep -rniE "(ends|until|valid through|sale ends|offer ends)" ./src ./templates
grep -rnE "new Date\(['\"][0-9]{4}-[0-9]{2}-[0-9]{2}" ./src

How to fix it

Remove the stale date and stop it returning
  1. Replace the live text now

    Update or remove the expired banner, countdown and offer copy on every page and popup that uses it.

  2. Find every copy of the date

    Search templates, scripts, theme settings, email capture tools and page builders. The same date often appears in several places.

  3. Move the date to one source

    Store the end date in a single setting, such as a theme option, a CMS field or a config value, and read it everywhere else.

  4. Hide the offer automatically after the date

    Make the banner render only while the current time is before the end date, so it disappears by itself instead of showing a past date.

  5. Deploy and re-check the live page

    Load the live URL, not the preview, and confirm the old text is gone, including from cached versions.

Where to change it on your platform
  1. Search content and widgets

    Use Tools or a search plugin to find the old date in posts, pages, widgets, reusable blocks and the Customizer. Check the theme files if it is in a template.

  2. Use a custom field for the date

    Store the end date in a field or theme option and compare it to the current time in the template.

  3. Clear caches

    Purge your caching plugin and any CDN so visitors stop seeing the old page.

Show the offer only until a single configured end datejavascript
const PROMO_ENDS_AT = new Date('2025-03-31T23:59:59Z'); // one place to edit
const banner = document.querySelector('#promo-banner');

if (banner) {
  if (Date.now() < PROMO_ENDS_AT.getTime()) {
    banner.hidden = false;
  } else {
    banner.remove();
  }
}
Hardcoded date vs managed date

Before

  • Date typed into three templates and a popup
  • Deploy restores old banner copy
  • Countdown shows zero after the end
  • Someone must remember to edit it

After

  • One setting holds the end date
  • Banner hides itself when the date passes
  • Deploy reads the same setting everywhere
  • A monitor flags old offer text if it appears

How to confirm it's fixed

Confirmation checks
  • Open the live URL in a private window and confirm no past date or old price is visible.
  • Check desktop and mobile layouts.
  • Check the popup, announcement bar and footer.
  • View the page source and search for the old date string.
  • Purge page and CDN caches, then reload.
  • Confirm the real discount or coupon end date matches the page.

How to prevent it happening again

Treat every promotion as something with a start, an end and an owner. A short routine removes most of the risk.

A safer promotion routine
  1. Before launch

    Put the end date in one setting and note every page that uses it.

  2. Launch day

    Check the live pages, ads and emails all show the same dates.

  3. Day after the end

    Confirm the banner is gone and ads are paused or repointed.

  4. Every deploy

    Re-read key landing pages, since a release can bring back old copy.

Prevention checklist
  • Keep promo dates out of code; use a config value or CMS field.
  • Add a promotion end task to your release or campaign checklist.
  • Pause or update ads on the end date.
  • Review old branches before merging so stale banners are not restored.
  • Monitor landing pages for stale offer text.

How FunnelGuard handles this

FunnelGuard detects this today with a text absent check. You choose text that should not appear on a page, such as the old date or Sale ends 31 March. A robot visitor loads the page on a schedule, from the EU or the US, and checks that the text is not there.

If the old text shows up, for example after a deploy restores it, the failure is re-checked from a second region first. Then one alert goes out by email, Slack, Teams, WhatsApp, webhook or PagerDuty, with a screenshot and a likely cause. It checks only text you name, so it will not spot every possible outdated offer on its own.

Questions people ask

Why is my sale banner still showing after the sale ended?

The end date is probably typed into a template, script or page builder block that nothing updates automatically. A deploy can also restore older content. Remove the banner, then move the date to one setting that hides the offer when it passes.

Why does my countdown timer show zero or negative numbers?

The timer counts down to a fixed date that has already passed. Update the date, remove the timer, or switch to a rule that hides it once the end time is reached. Also check for copies in popups and injected scripts.

How do I stop expired promotions from showing on my website?

Store the end date in one place, such as a CMS field or config value, and render the offer only while the current time is before it. Add an end task to your campaign checklist and monitor key pages for the old text.

Why did a deploy bring back my old promotion?

A release can ship a branch or template that still contains last season's banner, or overwrite a manual edit made in the CMS. Compare the deployed code with what is live and remove the old copy from the source.

How can I find a hardcoded date in my website code?

Search your repository for month names, years, words like 'ends' or 'until', and fixed new Date( values. Also check theme settings, page builder blocks, popups and tag manager Custom HTML tags.

Can I monitor my site for outdated offer text?

Yes. A text absent check loads the page on a schedule and alerts you if text you named, such as an old end date, appears. FunnelGuard offers this check, and it only looks for the text you give it.

Does an expired date affect Google Ads or SEO?

Ads that promise an offer your page contradicts can lead to poor visits and wasted spend, and ad platforms expect landing pages to match ad claims. Fix the page and update the ad together.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: text_absent.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.