Event data in emails

Pass through the data you send over events to the email you are sending.

Usage

To get event date inside your email, you'll be required to use Django tags.

These tags will be rendered as a text as user receives the email. Below you can find example code to use in your email messages.

{% events 'event_name' for_last_days=7 count=100 order=1 as events %}
{% for event in events %}
  {% for item in event.items %}
    {{ item.name }}: {{ item.value }}
  {% endfor %}
{% endfor %}

You just put the code in your email message, change to event_name and we'll do the rest!

Lines of code described

{% events 'event_name' for_last_days=7 count=100 order=1 as events %}

event_name is the name of your event.

for_last_days is the number of days for last occurance of this event. Default is 30.

count is the number of last X events fired. Default 10

order for descending order, set negative number -1, and for ascending order set positive number 1. Default -1

{{ item.name }}: {{ item.value }}

{{ item.name }} will output the name of each key data of this event.

{{ item.value }} will output the value of each key data of this event.