Integrating Mailchimp with WordPressLeave a Comment
I recently had a request from a client to give them the ability to offer free downloads to site visitors through mailchimp signups to a downloadable asset, though the Mailchimp interface to access the final personalised thank you emails for clients with download links was proving too difficult to manage.
The solution i found best was to tie in the Mailchimp extension to Contact form 7.
Below is a useful step-by-step guide
Create a new list in Mailchimp named after your download:
- Log into mailchimp
- Top right, where the name of your account is, click the dropdown and select ‘Profile’
- From the list of options, click on ‘Extras’ and select API keys
- Scroll down to where it says ‘Your API keys’. Create a Key.
- Name your API key and Copy and paste the new API Key into a blank document and keep for use later.
- Go to lists from the main menu at the top
- Create new list
- Name list after your new download and fill in all the other fields asrequired
- Once your list is created, select the down arrow beside your newly created list and select ‘settings’ from the dropdown
- Scroll to the bottom of the page and you will see an ID code named ‘Unique id for list ‘NAME OF LIST’’
- Copy this code into the same blank document as your API key as you will need it as part of WordPress form setup later.
Creating form in WordPress
- Whilst logged into WordPress on your website, click on CONTACT’ from the sidebar
- Create a new form
- Name the title of the form
- You will see tabs underneath the title. Click on Mailchimp
- You will paste the API key you created in Mailchimp earlier into the first field.
- The ID you copied from Mailchimp earlier should be pasted into ;’MailChimp List ID:’ This links up your new list so you know who has specifically been downloading your pdf
- Subscriber email field – Copy and paste [your-email] into this field. This should be whatever your email address field is named. By default it is [your-email].
- Subscriber Name – Copy and paste [yournamefield] into this field. This should be the shortcode from your contact form ‘name’ field
- Click on advanced settings and check Enable Double opt in. This helps with GDPR as it gives the customer the chance to opt in or not to your mailing list. You could alternatively leave this unchecked, though you would need to put a small print on your form to confirm that they are signing up to your mailing list
- Click save at the bottom of the settings
- Click the ‘Mail’ tab.
- Scroll all the way to the bottom, check the box for ‘Mail (2)’ and you will see the message that is sent to the user. Writea message alonf the lines of ‘Please download your eBook at the following link – <a href=”YOUR-DOWNLOAD-LINK”>Download eBook</a>‘ Replace ‘YOUR-DOWNLOAD-LINK’ with the new download link. It may be best to have your download link already copy and pasted into a blank document at the same time you are keeping your ID and API key somewhere before you are using them.
- It is important to update this link in your form as this is where the person will download the link from.
- You can find your download links to media uploads via ‘MEDIA’ from the sidebar.
- Once you have saved your form if you click on Contact from the sidebar again, it will display a list of all of your forms. You will see a Shortcode beside each one.
- Copy the shortcode from the form you want to use, then go to the page where you wish to display it. Paste shortcode and publish page.
Following the steps above will now alert you of any new submissions via the form. If you have a double opt in option on the form via the mailchimp settings, the user will need to confirm in their email that they wish to be added to the mailing list. Unchecking this setting will directly add them to your mailing list.
Things you will need:
WordPress Plugins – ‘Contact Form 7‘ & ‘Contact Form 7 MailChimp Extension‘