Emailing Users🔗

contact, message, send

Sending an Immediate Email🔗

You can email users any kind of message you want (e.g., content from your program, their results from your program, a message just to say hi, etc.). If users have a GuidedTrack account and are logged in, the below code will email them automatically. To learn how to ensure your users have an account and are currently logged into it, click here.

I'll send you an email now.

*email
	*subject: An email for you
	*body
		Hi,

		I just wanted to send you an email.
		*This statement is in bold, because it's important.*

		Bye,
		Me

So long as you hit "Allow," your email will arrive shortly in your inbox.

The most important parts of an email are the keywords *email, *subject, and *body. You must set up an email with all three parts, being mindful of tabbing *subject and *body beneath the *email keyword, and tabbing the content of your email beneath *body, as the example shows. Note: *subject has a colon, but *body does not.

In the above example, the user will see the line, "I'll send you an email now." Then they will see a "Next" button. After hitting the button, they'll see a popup prompt, asking whether they give their permission for the program to email them. The users must click "Allow" in order to receive the email. Once they are done with the prompt, they will see the next line of the program, which in this case begins with "So long..." The email they receive will look exactly like that which is tabbed beneath the *body keyword. The *subject from our example would read "An email for you."

Feel free to include any other GuidedTrack code in the body of the email. It will appear in the user's email exactly as you intend it to. For example, in the above email, the sentence with * around it (indicating that sentence should be bolded) will appear like this: This statement is in bold, because it's important.

If users are not logged in to GuidedTrack, or you would like to send an email to yourself instead, you can use the *to keyword.

*email
	*subject: Drivel from one of my users
	*to: myemail@emailaddress.com
	*body
		Someone said this about my program:
		{complaint}
		-Me

The *to field can also contain a variable. So, you could ask users their email address, save it as a variable, then email them some content from the program. Of course, you should always ask them first if it's okay to email them and only send the email if they say yes.

Send an Email for the Future🔗

You can get the current date/time and add time to it. With these skills, you can schedule future emails!

*email
	*when: calendar::now + 3.hours
	*subject: Hey
	*body
		Reminder: Go smell something beautiful!

You can schedule emails using calendar::now or using a variable. For example:

*email
	*when: QuizFollowupTime
	*subject: Retake this quiz
	*body
		It's time to retake the quiz, to see if you're more or less weird than you were before.

All you need to add to your email is the *when keyword and the time the email should go out. Then, simply add this email code somewhere in the program where the user is sure to pass over.

For example, if you want the user to complete a followup quiz, you could add the followup email reminder at the very end of the original quiz. That way, the user will pass over the code once they've completed the quiz, and the server will store the email and its contents to be delivered to your user in the allotted time. However, if the user quits the original quiz halfway through, they might never reach the code with the email for the followup quiz and will thus never be invited to your second quiz.

Control "Who" Your Emails Appear to Come From and the "Reply-to" address🔗

When GuidedTrack sends an email generated inside a program, the default sender of the email address is the program's name. You can easily customize both the sender's name and the address that their response to the email will be sent to if they reply to the email.

Control Who Your Emails Appear to Come From and the Reply to address (1)

In order to activate it, click on the program settings and go to the "Branding" tab. Enter the name that you want to display as the sender of the email in the field "Email display name", the reply-to address in the field "Email Reply-To address", click "Save", and you're done!

Cancel a Scheduled Email🔗

unsubscribe, stop email, repeating email

Let's say you have an awesome program, but 60% of people drop out halfway through and you want to know why. You'd like to send a followup email to these people to see what the hell's the matter with them.

You can create a scheduled email halfway through your program, and then cancel it at the end of the program so that those who finish never get it. Here's what I mean:

Halfway! Almost to the end now!

*email
	*when: calendar::now + 3.days
	*identifier: dropout_email
	*subject: You suck
	*body
		You didn't finish my program?
		What's wrong with you?
		Reply back so I better understand.

*button: Keep going

You finished the whole program! You rock!

*email
	*identifier: dropout_email
	*cancel

In the example above, once users get halfway through this program, an email will be scheduled for the future. However, at the end of the program, this email gets cancelled. For users who drop out early though and never reach the end, the email doesn't get cancelled; it gets sent at the scheduled time.

The key to using this feature is to add the *identifier keyword to your emails along with a unique name. When you need to cancel an email, use *identifier: emailIdentifier along with a *cancel keyword.

You can schedule and then cancel all kinds of emails, including things like:

  • The user states they want you to remind them to complete some task, but then they change their mind.
  • You've scheduled a reminder to return to the program in the future, but the user remembers to return on their own and now no longer needs the reminder.
  • You're sending a recurring reminder (see below) and now need to cancel it.

Schedule a Recurring Email🔗

repeating email, repeated email, calendar

Let's say the user will be completing an intervention each day for seven days, and you want to send out a reminder each day to complete the task.

*email
	*identifier: howl_reminder
	*every: 1.days
	*until: calendar::now + 7.days
	*subject: It's howl time!
	*body
		It's time to go howl at the moon like the wild beast you are!

You can optionally add the *identifier keyword (if you may want to cancel the email later on). You'll also use the *every keyword to specify how often the email should be sent out.

You can use *until to specify that the email should stop after 7 days.

The fastest an email can be repeated is once a day (not hourly, for example), and users are given an option to opt out of your recurring email by clicking an automatic opt-out link that will appear at the bottom.

It's also nice to give the user an option to opt out of recurring emails from within the program itself. For example, you could have a settings menu with an option to control email frequency. You would then rely on the *cancel keyword as described above to cancel the existing recurring email, and then perhaps re-create it with the user's new, preferred frequency.

It's also good to not be a creepy sketchball, and ASK the user first before sending any kind of email, especially recurrent ones!


Next: