Home » Adding Mailchimp Subscription Forms to WordPress

Adding Mailchimp Subscription Forms to WordPress

Almost everyone knows about Mailchimp. It is a good marketing platform that enables you to keep communicating with your clients. Besides, you can make effective campaigns and obtain all-in-one data analysis. Taking into account all its benefits, we are going to speak about adding Mailchimp subscription forms to WordPress. We are going todo this both with the famous plugins and by using a simple code.


What is Mailchimp?

So, as we mentioned above Mailchimp is one of the biggest Email marketing platforms. It helps you to maintain long-lasting communication with your website visitors and subscribers. And opt-in forms are important, as well. It is more useful when you have already gained some new subscribers․ The continuing process of communication will most likely increase your site profit.

As you may guess, in order to attach Mailchimp popups to WordPress you will need to have an account. This is to collect the needed audience in your Mailchimp list and later keep in communication with them or use the mentioned subscriber’s list in your upcoming campaigns.

So, all you need to do is sign up on Mailchimp. After entering the needed details, such as name, address, and Email address, you are required to activate your Mailchimp account via the mentioned Email. So, you are all set.

Now it is time to understand how to create that interesting popup that redirects you to enter your E-mail. This is for the newsletter subscription to be aware of upcoming events or site updates. But if one day you get tired of receiving messages, you can easily unsubscribe from the newsletter.

But it is more important to understand what method you should utilize to add the subscription popups. So one way is doing it with plugins.

In this article, we spot one of the most useful plugins and it is Mailchimp Forms by MailMunch.


How To Add A Mailchimp Popup To WordPress via Plugin

At this point, we are going to speak about the Mailchimp Forms by MailMunch plugin.

1. Mailchimp Forms by MailMunch

adding-mailchimp-subscription-forms-to-wordpress.jpg

The MailChimp Forms plugin has almost 40.000+ active installations and a 4.6 out of 5-star rating.

It helps to attach a big number of Mailchimps opt-in forms to your site, blog, or E-commerce. This plugin integrates with your Mailchimp account very deeply. That is why you can synchronize your subscribers to any of your audience lists. Moreover, you are able to obtain their names, birthdays, phone numbers, email addresses, etc.

The plugin enables you to create:

  • Landing pages
  • Embedded opt-ins
  • Scroll Box
  • Popup with exit
  • Sidebar widget
  • Top bar

Here you may see the main options of this plugin:

  • You do not need API keys to connect WordPress to Mailchimp
  • Get Mailchimp forms analytics and reports
  • A/B test
  • Disable or enable Mailchimp forms
  • GDPR compliance
  • Google ReCaptcha for safety
  • Thank you message in the end

Now it is time to learn how to add a subscription popup.

Creating Subscription Form Via Mailchimp Forms

For this purpose, you need to install and activate the plugin. After that, you can enter the plugin’s “Settings“.

mailchimp-forms-by-mailmunch.jpg

Here in the Dashboard, you will find these sections:

We would like to choose “Forms and popups” to create a subscription form.

mailchimp-forms-by-mailmunch.jpg

By clicking on “New forms” you will be redirected to the Mailmunch page.

mailchimp-forms-by-mailmunch.jpg

Here you should “Select form type” and templates.

templates-mailchimp-forms-by-mailmunch.jpg

After selecting one, you can fully customize it. At this point, you have the capacity to change:

  • Design
  • Content
    • Blocks
    • Body
    • Images
    • Audit
  • Appearance
    • Colors
    • Size
    • Animate on Open
    • Close Button
    • Trigger tab
    • Branding
    • Custom CSS
  • Behavior
    • When to show
    • After user subscribes
    • Display rules
    • Tracking pixels
    • Spam protection
  • Integrate
    • ActiveCampaign
    • Infusionsoft
    • AWeber
    • GetResponse
    • Campaign Monitor
    • Convert Kit
    • Intercom
    • Mailer lite
    • Klaviyo
    • Salesforce
    • Sendlane
    • Zapier
    • </> HTTP Post
    • Jilt
    • Sendy

At this point, you can select Mailchimp. After clicking on “Mailchimp” you will be suggested to choose either the existing account or “Add new“.

mailchimp-forms-by-mailmunch.jpg

Here you can check the “Success” part to see the “Subscription done” message form.

subscription-done-mailchimp-forms-by-mailmunch.jpg

After all these operations, you can “Publish” the form and see the results on your website.

publishing-form-mailchimp-forms-by-mailmunch.jpg

So all the Email addresses that your website visitors will submit on the form will be collected on your Mailchimp account (“Audience”-“All contacts” sections).

Subscribe-to-our-newsletter-mailchimp-forms-by-mailmunch.jpg

2. MC4WP Mailchimp for WordPress

mc4wp-for-adding-mailchimp-subscription-forms-to-wordpress.jpg

Here is another plugin, with which you can easily add a subscription form to your WordPress website without using a code.

MC4WP has over 2.000.000 active installations and a 4.8 out of 5-star rating. This plugin will help you to expand your Mailchimp Audience list by creating new opt-in forms or transferring already existing forms from another website. Here are the top features of MC4WP:

  • Different add-ons and forms
  • E-mail notifications
  • Easy customization
  • Thorough statistics and reports

So, after the plugin’s installation and activation, you need to move forward by creating a new subscription form.

Firstly, it is important to connect your Mailchimp account to the plugin through an API key. To generate it, you need to:

  • Enter your Mailchimp “Account”
  • Find “Extras” then “MailChimp API Key” sections
  • “Create New” one, copy and paste into the required field of the plugin
mc4wp-mailchimp-api.jpg

So, after connecting Mailchimp to the plugin, you can start to create a subscription form. You are able to put these fields:

  • First name
  • Last name
  • Phone number
  • E-mail address
  • Address, etc.
mc4wp-for-adding-mailchimp-subscription-forms-to-wordpress.jpg

After saving changes you will get a shortcode. You need to copy it and paste it into the “New Post“. So, after that, you will see the subscription form that is published on your site.

shortcode-mc4wp.jpg

That is how the MC4WP plugin will help you put a subscription form and get more subscribers to your Mailchimp Audience list.

mc4wp-for-adding-mailchimp-subscription-forms-to-wordpress.jpg

Adding Mailchimp Subscription Form To WordPress via Code

So, using plugins for adding Mailchimp subscription form to WordPress is very easy and quick. But some people prefer to do so using code. It may seem quite complicated. But it is much more beneficial than the other method with plugins. This enables you not only to create a subscription popup in a certain part or as a popup but also to place a subscription form on any function and location you prefer.

Here is a code that we have already developed:

<?php 
	function add_subscriber_to_list(){
    	// Enter your data to subscribe
        $user_name = "MAILCHIMP USERNAME ";
        $api_key  = "YOUR API KEY";
        $list_id  = "LIST ID";
        
        $email = "SUBSCRIBER'S EMAIL";
        $first_name = "SUBSCRIBER'S NAME";
        $last_name = "SUBSCRIBER'S LASTNAME";
        
        $contact_status = "subscribed";
        
        $fields = array(
            "email_address" => $email,
            "status" => $contact_status,
            "merge_fields" => array(
                "FNAME" => $fname,
                "LNAME" => $lname
            )
        );
        
        $curl = curl_init();
        curl_setopt_array($curl, array(
            CURLOPT_URL => "https://us5.api.mailchimp.com/3.0/lists/".$list_id."/members/",
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_ENCODING => "",
            CURLOPT_MAXREDIRS => 10,
            CURLOPT_TIMEOUT => 30,
            CURLOPT_SSL_VERIFYPEER => false,
            CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
            CURLOPT_USERPWD => "$username:$api_key",
            CURLOPT_CUSTOMREQUEST => "POST",
            CURLOPT_POSTFIELDS => json_encode($fields),
            CURLOPT_HTTPHEADER => array(
                "Content-Type: application/json",
                "cache-control: no-cache"
            ),
        ));

        $response = curl_exec($curl);

        $err = curl_error($curl);

        curl_close($curl);

        if ($err) {
            return "cURL Error #: " . $err;
        } else {
            return $response;
        }
    }

You need to copy and paste it into the “functions_php“. The code can excellently work with your preferable or newly created hook. This means that you can use the existing hook or create a new one and paste it with a do_action (“your_hook_name”) into your preferable location on the website. Yet, you should fill in the needed fields, such as:

  • Username- this is your Mailchimp username
  • API key- you need to copy it from Mailchimp
  • List ID
  • Email – you need to fill in the subscriber’s E-mail address
  • First name- fill in the subscriber’s name
  • Last name- fill in the subscriber’s last name

There is one more method to use this code. You can utilize it in plugins. So, in that case, you paste the code piece in the plugin’s PHP file and “Call” it in the plugin in a right place to obtain a required function.


Summary

So, you have already understood that it is too important to keep ongoing communication with your clients. You can update your website content quickly to keep your user’s interest. But that could not be enough to keep them always interested in your website content or to follow the updates. Therefore, it is more important to send updated messages and keep communicating with them from time to time.

At this point, you can highly benefit from adding Mailchimp subscription forms to WordPress. With these forms, you will get qualifying leads and use the Email addresses for further conversation. Unlike the Social Media users subscription list, this one is more convenient. As not all website visitors have Social media accounts or at least they can be frequent and inactive users.

Yet, there are many E-mail marketing platforms such as Constant Contact, GetResponse, AWeber, etc. So, one might truly ask why to choose Mailchimp?

Answering this question we would like to mention that Mailchimp is famous for its various features such as A/B testing, thorough analytics, and reports, automation, etc. Also, it is easy to use as it provides a user-friendly interface and 24/7 active customer support service with knowledgeable specialists.

Besides, you are capable of adding Mailchimp subscription forms to WordPress in two ways: via plugin and code.

Each of these ways is different and unique. Using plugins may enable you to easily overcome all the difficulties while adding a subscription form. Yet, utilizing the ready-made code will help you to put the form wherever you want and also customize the form design according to your needs.

So, you should choose one of the mentioned ways and start gathering qualified leads through Mailchimp.

If you like the article, do not hesitate to find us on Facebook and Twitter. For interesting WP tutorials, please subscribe to our YouTube channel.

Anahit V.

1 thought on “Adding Mailchimp Subscription Forms to WordPress”

  1. Avatar

    Helpful article. I liked the two ways that you have describes in it. However, I will choose one of the plugins. It seems easier btw )))))))

Leave a Comment

Your email address will not be published. Required fields are marked *

Find the Right Plugin for YOU from our Directory Listing!


This directory contains the best plugins within each category to save your time.⏳
We constantly update the list, to keep you up to date with the most useful WordPress plugins.

This will close in 0 seconds

Scroll to Top