Mixpanel collects timestamps by default, allowing users to target messages according to date. It is also possible to build more specific date targeting by sending a date event property in with events.
Targeting Messages by Date
There are several ways to send messages using dates. All Mixpanel messages require message targeting, which can be specified by date. Messages targeted by date will look at events that have or have not already happened. In order to do this:
1- Create a message. Stop at the 'Target criteria' step.
2- Specify the timeframe during which the event occurred.
3- Determine the delivery settings and send the message.
In order to send messages based on upcoming dates:
1- Create a message. Stop at the 'Delivery settings' step.
2- Specify the delivery settings. Note that this message can be sent one-time or on a recurring basis.
3- Specify the delivery time and date.
Extra steps must be taken if the date on which you’d like to target has long since passed (like a birthday or an anniversary). For example, if you have a user’s birthday stored as May 25, 1986 and try to target by “Birthday will occur within four weeks,” they will never be targeted as this condition will never occur (due to the year).
For annual recurring events such as birthdays, set a people property called “Birthday Month.” Once the people property is set:
- Create a message. Stop at the 'Target criteria' step.
- Filter all users by the property 'Birthday Month'.
- Select a one time message to be sent at a later date, sent one day before the specified month.
- Repeat this process for every month. This will need to be re-done for annual birthday messages.
- It is also possible to Export your people profiles to CSV, change all the birthday properties to have the current year, and re-import them as a new property (so that profiles also contain the original data with the real birth year), which will then allow the “will occur within” targeting to work properly with the new property. This will have to be done annually to update the birthday year to the current year.
Target a Specific Day
In order to target a specific day after an event has been performed, e.g. "on day 5 after performing event XYZ" instead of "within the last 5 days", a work-around will need to implemented.
As it is not currently possible to target a specific day, the work-around will be to create a target where the event happened more than x days ago and less than y days ago.
In this example, to target a user who performed an event exactly 5 days ago, your target settings will appear like this: