View this on GitHub
On my website matthew.krupczak.org AKA foobarbat.org:
- I would like to make it so that readers can sign up to be notified of new posts via email on the Homepage or at the bottom of any post
- An email should be sent out to the reader daily if new posts are created
- The email should contain a list of the posts created since they were last notified, along with the HTML content of the latest post in the body of the email
- The campaign should auto populate to Twitter as well
Use Existing Wordpress setup:
- Digital Ocean hosting a Linux Ubuntu server
- Easy Engine for installing Wordpress
- Mailchimp for Wordpress plugin (M4WP) to add sign-up forms to site on Homepage and at bottom of every post
- (alternate) you could use Jetpack for Wordpress
Make use of RSS newsfeed provided by Wordpress websites
- Every Wordpress website provides an RSS newsfeed at example.com/feed in a standard format
- This feed contains the titles, dates, and contents of the website's posts
- By telling Mailchimp to monitor it, we can set up an automation to send out an email and post to Twitter whenever a new post is created
Personalize our campaign info, customized using the merge tag *|RSSFEED:DATE|* to inform and entice the reader
Set up an auto Twitter post, customized using the RSS merge tag *|RSS:RECENTxxx|*. xxx is a number, in our case 10 indicating that the 10 newest posts since the last email was sent will be included. They will show up as hyperlinks where the text is the title of the posts.
Hello, *|IF:EMAIL ! <<Email Address>>|**|EMAIL|**|ELSE:|*friend*|END:IF|*, You may be interested in new article(s) I've written on my website, matthew.krupczak.org:
In my signup form, I only ask for an email address (and not first name / last name) in order to reduce user friction.
If a user is reading the campaign in email, it would be nice to mention their email address specifically so they know it's not mass spam.
If a user is viewing the campaign page from Twitter, no email address will be available. We can greet them as 'friend' instead
This can be accomplished using conditional block tags:
*|IF:EMAIL ! <<Email Address>>|**|EMAIL|**|ELSE:|*friend*|END:IF|*
If the user's email address is not a placeholder from Mailchimp's software, print the user's email. Else, print "friend".
*|RSS:RECENTxxx|*. xxx is a number, in our case 10 indicating that the 10 newest posts since the last email was sent will be included. They will show up as hyperlinks where the text is the title of the posts.
RSS Merge Tags are included directly after this which will show the title, date of publication, and full HTML content of the latest post on my website