3,283 total views, 5 views today
View this on GitHub
Using Mailchimp with Wordpress's RSS feed to email subscribers with new posts
Scenario:
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
Wordpress setup
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
RSS campaign with Mailchimp
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
Creating a Mailchimp RSS Campaign:
Create a new campaign
Search for "RSS" and create an "RSS" or "Blog" campaign
Input the feed URL provided by our Wordpress site to Mailchimp
Email to the whole list
merge tag *|RSSFEED:DATE|* to inform and entice the reader
Personalize our campaign info, customized using themerge 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.
Set up an auto Twitter post, customized using the RSSSelect the full width campaign template for more space
Now we customize our email template
Greeting for the user in text:
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
conditional block tags:
This can be accomplished using*|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".
Let's look at our template again:
*|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