One of the main advantages of using the MailChimp module to integrate Drupal with MailChimp is that you can allow users of your site with a Drupal account to manage their MailChimp subscriptions right through the Drupal user interface. In this tutorial we'll look at adding a MailChimp Lists field to Drupal's user entity type and then configuring that field so that we can allow users to subscribe/unsubscribe from a MailChimp list by signing in to their account. We'll also look at how we can allow users to opt-in to a MailChimp list when they register for a new account on our Drupal site.
The MailChimp Lists module is super flexible, and allows you to create a relationship between any fieldable Drupal entity and a list in MailChimp. While we're going to be using the module exclusively with user entities there are a lot of other options available. Basically, any entity with an email address can be subscribed to a list by adding the MailChimp Lists field to the entity type, choosing the list that subscriptions should be added to, and telling the field which other property, or field, on entities of this type contains a valid email address.
By the end of this tutorial you should be able to configure your Drupal site to allow users to manage their MailChimp subscription from within Drupal. As well as allow new users to opt-in to your mailing lists when they sign up for an account.
Further your learning
- Why does the MailChimp Lists module use a Drupal field API field to track subscriptions?
- Can you describe the primary difference(s) between allowing users to subscribe via the MailChimp Lists module, and allowing users to subscribe via the MailChimp signup module?
- Further exploration: What happens if you delete the account of a user who is subscribed to a MailChimp list?
- Further exploration: Can you create a new node type that can be subscribed to a MailChimp List? Give a use case for doing so.
Additional resources
- MailChimp Lists module documentation (drupal.org)
Mailing lists are the heart of all things MailChimp. Lists allow us to gather a database of email address, and other additional information, by asking people to subscribe to our list or by doing so automatically based on other actions they take within our application. Once subscribed, and added to a list, these addresses can be sent emails. MailChimp lists allow users to manage their own subscriptions, and to easily opt-out as desired.
In this tutorial we'll look at creating our first list in the MailChimp UI. We'll create one for a weekly newsletter on our site. And then we'll install the MailChimp Signup module and use it to create a simple form that allows users to subscribe to our mailing list.
The MailChimp Signup module can be used to create a page with a sign up form on it by specifying the internal path for the new page and choosing which list, or lists, the sign up form should allow a user to subscribe to. In addition, you can also create a sign up form as a block. These blocks are then available to place into any region on your site via the Drupal block administration screen. This gives you a lot of flexibility when it comes to placing sign up forms. Learn more about placing blocks on your site in the Working with Blocks in Drupal 7 video lesson.
Sign up forms created using the MailChimp Signup module will work equally well for anonymous and authenticated traffic. These are a great substitute for the copy/paste HTML forms that MailChimp gives you, with some distinct advantages, like for example keeping the labels of fields up to date if they change in MailChimp without having the copy/paste a new version of the HTML form.
By the end of this tutorial you should be able to create a MailChimp list and allow people to subscribe to that list via your Drupal site.
Further your learning
- When you create a list in MailChimp you provide some default configuration for that list. Where do you change those default settings?
- Which of the MailChimp project's sub-modules are required to be able to create a form that will allow visitors to subscribe to a MailChimp list? (Hint: there are 2 of them).
- What are the display modes available for a signup form created in Drupal? How do they differ?
- Further exploration: Can you add an “Interest group" to your MailChimp list and then have it displayed on the subscription form in Drupal?
Additional resources
Before you can do anything else with MailChimp you'll need to create a MailChimp account. In this tutorial we'll walk through creating an account on MailChimp.com. Then, we'll look at where to find your API key, and how to add it to Drupal so that the Drupal MailChimp module can communicate with MailChimp on your behalf. Adding your API key is a required step to get MailChimp integration working with Drupal. Without an API key, Drupal can't make requests to MailChimp on your behalf.
By the end of this lesson you should have an account on MailChimp.com. You should also have located your account's API key and configured Drupal to use it.
Further your learning
- Why does MailChimp require personal details like address and phone number when creating an account?
- What is the purpose of providing Drupal with a MailChimp API key?
- Further exploration: In theory you can share a single MailChimp API key between multiple different Drupal sites. What effect would this have on your integration?
Additional resources
In order to integrate Drupal 7 with MailChimp we need to first install the MailChimp module, and its dependencies. This will provide the framework that we'll use for our integrations throughout the rest of this series. The MailChimp module depends on the Entity API module, the Libraries module, and the MailChimp PHP API Client, so we'll need to install these as well.
The MailChimp project on Drupal.org consists of the main MailChimp module (mailchimp.module) that provides API integration, and a handful of sub-modules that use this API integration to allow Drupal to interact with various aspects of MailChimp. These are:
- mailchimp_signup: Create anonymous signup forms for your Mailchimp Lists, and display them as blocks or as standalone pages. Provide multiple-list subscription from a single form, include merge variables as desired, and optionally include Interest Group selection.
- mailchimp_lists: Subscribe any entity with an email address to MailChimp lists by creating a mailchimp_list field, and allow anyone who can edit such an entity to subscribe, unsubscribe, and update member information. Also allows other entity fields to be synced to Mailchimp list Merge Fields. Add a Mailchimp Subscription field to your User bundle to allow Users to control their own subscriptions and subscribe during registration.
- mailchimp_campaigns: Create and send campaigns directly from Drupal, or just create them and use the Mailchimp UI to send them. Embed content from your Drupal site by dropping in any Entity with a title and a View Mode configured into any area of your email template.
- mailchimp_activity: Display a tab on any entity with an email address showing the email, subscribe, and unsubscribe history for that email address on your Mailchimp account.
By the end of this tutorial you should be able to install the MailChimp module and all it's required dependencies and libraries, and confirm that they are all working.
Further your learning
- List the other non-core modules that are required in order to use the MailChimp module.
- What version of the MailChimp PHP API client does the MailChimp Drupal module use?
- The MailChimp project contains multiple sub-modules. What role does the MailChimp Campaigns sub-module fulfill?
- Explore further: What other projects on drupal.org that are not part of this series aid with integrating MailChimp with Drupal? When might you use one of those instead?
Additional resources
This series is about integrating MailChimp with Drupal 7 using the Drupal MailChimp module. It will help site builders and content creators create awesome email marketing campaigns and grow the number of subscribers on their mailing lists.
Email marketing is a proven way of increasing the traffic to your website. Even better, it’s a great opportunity to engage with your site's visitors, your store's customers, or your application's users, and learn more about them. When it comes to email marketing, MailChimp is one of the best tools for managing emails lists and analyzing email data. Lucky for us, the Drupal MailChimp module makes integrating MailChimp and a Drupal powered application easy.
In this series we'll cover:
- What is MailChimp?
- Installing and enabling the Drupal MailChimp module and its requirements
- Creating, managing, and soliciting subscribers to mailling lists in MailChimp and Drupal
- Keeping MailChimp data in sync with a Drupal user's profile
- Sending email campaigns in both Drupal and MailChimp
- Email marketing best practices
- Monitoring activity with MailChimp
And a lot more!
Our case study is the Anytown Ice Cream shop, which has three physical stores, and a website that provides its customers with info about the stores. We’ll create a mailing list for semi-regular updates, similar to a newsletter, and another that allows people to receive flavor of the day updates, optionally targeted to the stores they've listed on their profile. To keep things easier for our employees, we’ll automate the process of sending the flavor of the day emails using an RSS-based campaign. We’ll also look at collecting a customer's birthday so we can send them specials. I’ll refer back to this case-study a few times or use it to explain concepts.
Before you dive into this series, there are a couple of things you’ll want to know how to do first. I'm going to assume that you've already got some basic Drupal administration knowledge, notably how to download and install a module, and are at least familiar with Drupal’s UI for adding and editing fields as we’ll be using it a lot without going into details about the non MailChimp-specific parts. If you need to brush up take a look at our Drupal 7 site building guide for a refresher.
Finally, if you want to take your learning further look for the follow up questions in the description for each tutorial in this series. These questions are presented to help you make sure you’re understanding the material, and to encourage you to explore how what you've just learned could apply to your own use case.
Ready to learn how to integrate MailChimp and Drupal so you can create an awesome email campaign? Then you're going to love this series.
Additional resources
Drupal can already send email, and there are plenty of contributed modules that allow you to maintain a mailing list within Drupal. But there are some distinct advantages to using a service like MailChimp to maintain your mailing list and send your emails. In this tutorial we’ll talk about what MailChimp is, look at the benefits of using MailChimp with Drupal, cover some terminology that you'll want to be familiar with, and take a really high level look at how the MailChimp module goes about accomplishing its integration.
What is MailChimp? MailChimp is a web based service for designing and sending email marketing campaigns, and maintaining one or more lists of subscribers.
Why should you choose MailChimp? There are a lot of reasons to choose MailChimp as the tool to use for managing your email marketing efforts. At a really high-level it boils down to the fact that a service like MailChimp, which has an entire team dedicated to improving it's application, can potentially create tools and manage infrastructure that would be hard for you to develop on your own. In addition, MailChimp has a strong track record, and great integration with Drupal via the MailChimp Drupal module.
The MailChimp Drupal module allows you to tightly integrate your Drupal site with the MailChimp service by leveraging the MailChimp API. You can allow users to subscribe to your mailing lists, and manage their subscriptions, from within Drupal. Values collected for a field attached to a Drupal entity can be synchronized with merge fields for contacts in a MailChimp list. Administrators can send email campaigns right from within the Drupal UI, and monitor their performance. And much more.
By the end of this tutorial, you should be able to explain to someone why they might want to use MailChimp with Drupal. You should also be able to list the various types of integration provided by the MailChimp module.
Take your learning further
- In one paragraph answer the question: What is MailChimp?
- List the modules contained within the MailChimp project on Drupal.org.
- Describe two ways that MailChimp helps prevent you from being flagged as a Spammer.
- How does MailChimp aid content creators who are trying to create and send email campaigns?
- Further exploration: Can you generate a pros/cons list to use when deciding wether or not you should use MailChimp for your project?
Additional resources
Load Testing your Site with Siege
Blog postSiege is a useful load testing tool to add to your performance testing tool kit. From the website: "Siege is an HTTP load testing and benchmarking utility. It was designed to let web developers measure their code under duress, to see how it will stand up to load on the internet. Siege supports basic authentication, cookies, HTTP, HTTPS and FTP protocols. It lets its user hit a server with a configurable number of simulated clients. Those clients place the server 'under siege.'"
Load testing is useful for testing the performance of your site, and the infrastructure that it runs on. There’s nothing worse than having one of your blog posts end up on Hacker News and then having your site crumble under the load. Siege can simulate activity on your site, and you can then use your site from your browser as you normally would, while your siege is running and really get a feel for how your site responds under load.
This blog post will cover installing Siege on OS X and Linux, and running a basic load test with Siege.
Why is SEO important to site owners? What tools and strategies can be used to gather and analyze site visitor data?
This week we are wrapping up our Introduction to Project Management series. We've talked with the Lullabot sales and project management teams about many aspects of working with people, and setting your project up for success. As we wind things down we're going to discuss dealing with problems and and red flags that may be taking the project off course, along with different ways of adding quality assurance. We'll then get to talk about demoing your work and conducting retrospectives to review your processes. Finally, we get to tips for a successful launch and the importance of celebration!
In this lesson you will learn about different approaches to Quality Assurance (QA), the importance of doing QA throughout the project, and how QA can be used as a basis for documentation and help for the client.
Additional resources
Testing the front end with CasperJS
Automate Your Life with Phing
CSS Regression Testing with Resemble.js
Write A Hello World Test for Drupal 7 with SimpleTest
Automated Testing in Drupal 7 with SimpleTest
Quality Assurance with Selenium
Careful with that Debug Syntax
In this lesson, you’ll learn about demoing your progress to the client and the team, along with some things to consider in a prototyping process. We'll also talk about retrospectives, when the team takes time to review not just the work produced but the process behind it as well.
In this lesson, you’ll learn strategies for identifying and dealing with problems, risks, and red flags on a project. You’ll also learn tips for being a proactive and diplomatic communicator, ensuring that progress and velocity is up to speed, and the importance of minding the boundaries of your relationship with the client and how to effectively advocate for the project, without forgetting the people who can ultimately make the project successful.
Additional resources
In this lesson, you’ll learn some tips for ensuring a successful launch and the importance of celebrating the accomplishments of the team.
PHP Classes and Objects
Blog postObject-oriented programming (OOP) is way of organizing your code to be more efficient, and it takes advantage of some really nice features in modern versions of PHP. One of the basic concepts of OOP is, not surprisingly, an object. Directly related to working with objects is understanding PHP classes. Drupal 8 is taking big steps to move to an OOP architecture, and so you will get very familiar with both of these as you start to jump into Drupal 8 development.
This tutorial, based on the video Create a Basic PHP Class, will explain what a class is, show you how to set up a class, and look at a PHP object. By the end of this tutorial, you will be able to create a class, an object, add a property to your object, and set the value of the property inside the class.
Learning Drupal 8 from Boilerplate Code
Blog postOne of the hardest things about a project is finding the right balance when working with your client. This week in our Introduction to Project Management series we take a look at client relations. Lullabot's project and account management teams discuss client communication, managing expectations before and throughout the project, and getting the project started off right from the kick-off meeting.
In this lesson, you’ll learn about the essential elements of a successful project kick-off meeting or on-site, including who should be there and what should be done during this time.
In this lesson, you will learn some strategies for aligning and managing client expectations from the perspective of sales and account management. Learn how you, as a project manager, can work with an account manager to effectively communicate with a client to find out whether or not expectations are being met.
In this lesson, you will hear a variety of perspectives on the many facets of client communication. As trust directly impacts communication, you will hear about how trust varies depending on the type of project. In difficult conversations, learn about the importance of listening. To build trust and manage tricky situations, learn about transparent, proactive communication of risk factors. On a practical level, you’ll learn about the importance of translating client discussions into action items for the development team, and how the ticket queue can be a great place to capture important discussions and facilitate client communication with the project team.
Drupalize.Me Update, June 2015
Blog postIt's that time again! Here's an overview of what we've been working on at Drupalize.Me.