We just kicked off our blog notification campaign this past week. Maybe you are even reading this because of that email! As is often the case, while building out this campaign, I stumbled on several hurdles to creating what I thought would be the best experience for our readers (You!). There are a lot of important questions to ask yourself as you put together an email campaign, even if it’s just for a blog notification. This article will walk you through the process I went through in building out our Article Notification email Campaign.
What I realized in building this out is that creating custom bold and striking pixel perfect blog notifications in MailChimp — while totally possible — is not as straight forward as I imagined. MailChimp’s great strength is just like WordPress’. It gives you the ability to put up a simple and nice looking email campaign without much skill or code needed at all. Those are great. But as soon as you want to do a bit more complex stuff, it takes quite a bit of creativity and dedication and a bit of thinking outside the box. But the good news is that it’s totally possible.
So here’s the overview of an Advanced MailChimp RSS Feed:
This is an RSS-Driven Email campaign. This means that an email is populated automatically based on our blog’s RSS feed. Every weekday when MailChimp scan’s our site and notices a new blog post, it populates the email and sends it out to our subscribers. This is one of the major reasons why I love MailChimp, it’s a really powerful and flexible tool.
If you are not familiar with RSS-Driven campaigns, here’s two great resources to get you started. Read these first and then come back:
- MailChimps “MailChimp for Bloggers” Article is very user-friendly and detailed.
- WPBeginner has some WordPress-specific info and discusses email groups and lists in detail as well.
OK. With all that in mind, here’s all that went into creating our Blog notification email.
For a succinct but effective blog notification email, I wanted to have the following:
- Show the three most recent blog posts from our site per email
- Have the most recent post be formatted differently for it to have more prominence
- Highlight some of our products
- Highlight articles from other blogs we like
This makes our blog notification emails fairly robust without being overwhelming. You can take a look at it here (PDF). We wanted this email campaign to be more valuable than simply saying “Hey we wrote something!”
So to do all of this, I had to leverage quite a bit more things than I expected. Here’s a quick overview:
- Familiarity with MailChimp’s FEEDBLOCK merge tags (see here)
- Ability to create a custom WordPress RSS feed (see here)
- Do some custom code block within MailChimps templating system (see here)
- Integrate the “enclosure tag” into your custom WordPress RSS feed (see here)
- Use ChimpFeedr for feed aggregator (see here)
All this together took a full day to figure out and implement. But overall we’re pretty happy with the end result. I definitely didn’t think I’d be digging into customized WordPress RSS feeds when I started mapping out what we wanted for this campaign. Read on and you’ll see why it was necessary.
Dealing with MailChimp’s Lack of an Offset Feature
The first thing I wanted to do was to be able to highlight our latest blog post, but also link readers to the most recent posts as well. This means the first item in the RSS feed needs to have different formatting than the others. I was certain I’d see email campaigns like that and it seems like a really reasonable idea. But once I started down that path in MailChimp it became clear that it was anything but easy.
Basically, MailChimp doesn’t have any built-in features to distinguish between the first and following articles. MailChimp has these shortcodes call FEEDBLOCK which I thought perhaps I could do two seperate Feed Blocks, one showing the latest formatted differently, then another with an “offset=1” attribute to show the others.
As you can see in the example above, I also wanted that first post to have the full-bleed featured image in it. MailChimp can show images in your articles no problem. There’s also our friend Rob Marlbrough’s handy plugin “Featured Image in RSS w/Size and Position” which I’ve used in a lot of campaigns before. Unfortunately, in this case I need to be able to separate the image from the content in order for it to be the exact width I needed, and Rob’s simply shows the image within the content of the post itself. Further, WordPress’ feeds by default don’t show images at all and don’t separate them in any meaningful way.
So the combination of a lack of an offset, plus the lack of being able to separate the image from the content meant I had to do a custom RSS feed for WordPress so that MailChimp would get the information it needed.
Creating a Custom RSS Feed in WordPress
Here’s the short version of what I did: In order to have the first blog item large, I used MailChimp’s FEEDBLOCK mergetag and pulled only the latest post. But I needed that image too, so I customized our default theme to include the featured image as an “enclosure”. That is the only image type that MailChimp will recognize using WordPress’ RSS 2.0 formatting.
We chose a template in MailChimp that had a full bleed image right at the top. But the problem is that that image is static, not fed from a feed. The whole reason we set up the enclosure RSS feed was to use that image there. So — without getting into too much detail — MailChimp uses global classes to format a lot of the content of these template, including for these images. In the end, I was able to use a custom code block, and the class name that MailChimp uses for the full-bleed image to insert the enclosure image into the template. Here’s the code:
<img src="*|RSSITEM:ENCLOSURE_URL|*" style="max-width: 100%;"/> *|END:RSSITEMS|*
The Offset Feed
Next, I created an additional custom RSS feed that I called “offset” which pulls all the posts EXCEPT the latest one. This is the feature I wanted MailChimp to do, but it doesn’t. But since I could create that in WordPress, I could point the second FEEDBLOCK mergetag to that feed.
I won’t go into all the details of creating a custom feed. Instead, here’s the two invaluable sources I used to do ours:
One thing you’ll notice when you’re looking at the code in Greg Rickaby’s template is that it’s calling the posts with a simple wp_query and while statement. Because of that, I knew that I could customize the wp_query with an offset to get all the latest blog posts EXCEPT the most recent. You can grab our offset RSS code here.
One important note: if you use “sticky” any of your posts, the offset won’t work correctly. So you’ll want to add
'ignore_sticky_posts' => 1 to your query as well. Thanks to Joey Allam for pointing that out (see his comment below).
Next I needed to add featured images to our default WordPress feed as an RSS 2.0 enclsoure, since that is the image type that MailChimp recognizes as being able to be called separately with a mergetag. There is a plugin that essentially does this, but the Codex explains it perfectly and only requires a custom template and a few lines in your functions.php file, or custom functionality plugin. You can grab our custom RSS feed with enclosure template here.
Whew… all the hard stuff is over now. The rest is really just fun customization.
Why send an email to your blog subscribers without giving them a little heads up about other parts of your website besides your blog? The MailChimp template we chose had some nicely formatted accent boxes. We used them to give attention to our premium plugins.
Aggregate and Advocate Your Friends
But seriously, there’s a LOT of WordPress knowledge out there. And we love to prop up our friends. But putting together a curated list of posts is time consuming. The best way to get a nice list of relevant content is to aggregate posts from sources you trust. A really easy way to aggregate blogs into one cohesive feed is with MailChimp’s own ChimpFeedr.com service. This will collect all the posts in order of publish date/time into one feed that you can add into your email campaign. Of course, this means that sometimes one blog will be listed more times than others, or one blog doesn’t get listed at all because it hasn’t posted recently or you only list 3 or 4 posts. Regardless, adding a curated list like that to your email campaign shows that you are well connected and just want to help spread the knowledge, not just funnel all your readers just to your content.
You can see the ChimpFeeder Feed we put together here: http://mix.chimpfeedr.com/baa24-wordimpress-friends
Of course, with all that talk about our blog newsletter, now you’re just DIEING to sign-up for it, right? Here is it:
Other Good Examples?
That’s how we put together our blog notification. Are you subscribed to other really stunning e-newsletters? Have you put together something you’re really proud of? Tell us in the comments.