Cookies setting

Cookies help us enhance your experience on our site by storing information about your preferences and interactions. You can customize your cookie settings by choosing which cookies to allow. Please note that disabling certain cookies might impact the functionality and features of our services, such as personalized content and suggestions. Cookie Policy

Cookie Policy
Essential cookies

These cookies are strictly necessary for the site to work and may not be disabled.

Information
Always enabled
Advertising cookies

Advertising cookies deliver ads relevant to your interests, limit ad frequency, and measure ad effectiveness.

Information
Analytics cookies

Analytics cookies collect information and report website usage statistics without personally identifying individual visitors to Google.

Information
mageplaza.com

How integrate MailerLite with Magento 2

06-25-2020

How integrate MailerLite with Magento 2

MailerLite Introduction

MailerLite is a free email marketing support software with many easy-to-use features. MailerLite helps you to build subscriber lists, create Campaigns more effectively, etc. You can also keep track of your Magento store activities by integrating MailerLite via Webhook extension developed by Mageplaza


Webhook

Webhook Extension for Magento 2

Unlock the power of Magento 2 Webhook today and enhance the flexibility and interactivity of your website!

Check it out!


Magento Webhook supported entities:

  • Order
  • Invoice
  • Shipment
  • Credit Memo
  • Customer
  • Product
  • Category
  • Customer Login
  • Subscriber
  • Abandoned Cart

MailerLite supported entities:

  • Campaigns
  • Segments
  • Account Subscribers
  • Subscriber Groups
  • Adding Subscribers to a Group
  • Subscribers in a Group
  • Account Fields
  • webhooks
  • Account Stats
  • Account Settings
  • Objects Reference

How to configure Webhook

1. How to register and user MailerLite

Go to MailerLite> Click Sign up> enter your account information:

  • Company or Organization: Enter your company name or organization
  • Email Address: Enter your email
  • Password: Enter your password for MailerLite

register

After completing your account information, click on Create my account to be directed to the following page before clicking on Complete profile button.

Complete profile

Complete personal information

Complete personal information

Enter your timezone and answer questions:

Enter your timezone and answer questions:

Accept terms and policy

Accept terms and policy

After completing the required information, click on Save> Request Approval

Save

Request Approval

Enter the email domain

Enter the email domain

After completing the email domain and clicking on NEXT, you will be directed to the following page:

NEXT

A confirmation email will be delivered to your mailbox. Open that email and click on Confirm my email address to confirm

Confirm my email address

Your account will be verified by MailerLite after 24h

Your account will be verified

Get API Key

Follow these steps to get API Key

  • Login to your MailerLite
  • Click on your account in the right corner before choosing Integrations
  • From MailerLite API > Developer API , click on Use button. Now you can see your API

your API

2. MailerLite data fields

See the newest MailerLite data fields from here

3. How to create Hook

How to create a new subscribers in MailerLite via Magento 2?

  • Required fields
    • email
  • Optional fields:
    • name
    • fields
      • company
      • city
    • resubscribe
    • type
    • signup_ip
    • signup_timestamp
    • confirmation_ip
    • confirmation_timestamp

In this section, we will guide you on how to configure Wehook with MailerLite integration

From the Admin Panel go to System > Webhook > Manage Hooks and click on Add New button. Multiple options, including New Order, New Customer, Update Customer, Delete Customer, New Order, etc will be displayed.

With this instruction, please choose subscriber

Step 1: Complete General Information

Complete General Information

Step 2: Enter the required data in Action tab

Enter the required data in Action tab

Enter the required data in Action tab

Note

  • Payload URL:
    • POST URL: https://api.mailerlite.com/api/v2/subscribers
  • Headers : Click on Add button to add headers’ values such as Name and Value according to the requirement of server to call API. To integrate with MailerLite, fulfill the following information of Headers:
    • Name = X-MailerLite-ApiKey
    • Value = your api key. See how to get API Key
  • Content Type =application/json.
  • Body : Body is a required field when using POST or PUT
    • When creating a hook with subscriber, you need to add this body:
{
    "email": "[email protected]"
}

Note: When you retrieve any data field, replace it by the variant from Insert Variable. For example, with email field, you can replace { “email”: “”} by

Result

Result

When making new subscribers, all data will be saved in the Hook Log

Hook Log

Click Select> View to go to View Log, where you can see the data

View Log

The result shown in MailerLite

In your MailerLite account, choose Subscribers tab. From this tab, you can view subscribers list

choose Subscribers tab

Summary

In this post, we have guided you on how to register MailerLite and creat Hook when using Webhook Extension and integrating MailerLite by Webhook.

Related posts:

x


    Related Post

    Website Support
    & Maintenance Services

    Make sure your store is not only in good shape but also thriving with a professional team yet at an affordable price.

    Get Started
    mageplaza services