How do I dynamically set the current year in an email and landing page?
How do I dynamically set the current year in an email and landing page?
Is there Marketo code that can dynamically set the current year as in copyright 2015?
How do I dynamically set the current year in an email and landing page?
Is there Marketo code that can dynamically set the current year as in copyright 2015?
You have to use 2 methods — JavaScript for LPs, Velocity for Emails.
On LPs, this snippet will do the trick:
<img src="" style="display:none;" onerror="this.outerHTML=new Date().getFullYear();">
Note: the above is ridiculously far from best practices for authoring JS on the browser side. It's a pretty cringey hack. BUT if you're completely unfamiliar with JS and the DOM, it lets you insert a single HTML element which replaces its own contents at runtime. No prettier ways to accomplish that, AFAIK!
For Velocity, I've posted the code a few times before, if you search.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.