user_engagement
Description
Returns the current user’s engagement level.
integer user_engagement()
Returns a number from 0 to 6 representing the engagement level of the user being emailed, where:
| result | Engagement Level |
|---|---|
| 0 | Hardbounce or Opt-out |
| 1 | Dormant |
| 2 | Disengaged |
| 3 | New |
| 4 | Passive |
| 5 | Active |
| 6 | Engaged |
For more on these engagement levels, see Engagement.
Customized Subject Line Based on Engagement Level
Use Case: For all your disengaged dormant users, you want to show a more tailored subject line, incentivizing them to open.Zephyr: In the Setup:
{if user_engagement(email) < 3}
{subjectLine = "We miss you!"}
{else}
{subjectLine = "Here are today's top stories!"}
{/if}In the Basic Tab:![]()
We miss you!
All Other Users:
Here are today’s top stories!
Explanation: This scripts uses the user_engagement() function to reference the user’s current engagement level. If their engagement level is less than 3, they’ll receive a unique, incentivizing subject line; otherwise, they’ll receive the standard subject line. Note, this particular script would disengaged (a score of 2) and dormant (a score of 1) users. Opted out/hardbounced users (a score of 0) fall into this category but do not get mailed.