Set Cookie, then Redirect when Expired

I’d like to set up an evergreen sale page on my site where I can set a cookie on the visitor, then redirect them to a different page if the cookie is expired.

So, something like “save 20% for 7 days only”, they get the link to that special page, they get cookie’d, after 7 days they’re sent to a “wah wah you missed the sale” page.

@vincent and @PixelGeek, I’ve seen posts here from both of you on setting cookies and performing some sort of action on those. Do you have any insight on how I’d accomplish this?

Thanks!

1 Like

Hi I assume you’ve seen this already:

I don’t code JS so I can’t be of any direct help, but what you want can be very easily done with Javascript.

2 Likes