PRICING
PRODUCT
SOLUTIONS
by use cases
AI Lead ManagementInvoicingSocial MediaProject ManagementData Managementby Industry
learn more
BlogTemplatesVideosYoutubeRESOURCES
COMMUNITIES AND SOCIAL MEDIA
PARTNERS
Learn how to seamlessly incorporate Mixpanel analytics into your email communication by integrating it with Mailgun.
This guide will walk you through the steps to set up this powerful no-code automation and leverage it for better insights and more intelligent decision-making.
Mailgun.com is a popular email delivery service used by thousands of projects but lacks advanced analytics capabilities. To gain deeper insights into your clients' behavior, consider using a tool like Mixpanel.com. However, tracking email effectiveness can be a challenge. That's where Latenode comes in.
With Latenode's simple cloud workflow automation, you can easily track the delivery and open rates of emails sent to each specific user on your platform. By measuring email campaigns' success and identifying improvement opportunities, you can enhance your clients' experience and boost engagement with your product.
To listen webhook calls from Mailgun.com on Delivery and Open events in latenode.com, you must set up receiving webhooks. Simply click the 'Add New Scenario' button and add the 'HTTP -> Triggers -> Webhook' node to your workflow.
Congratulations! You now have everything you need to integrate Mailgun.com with your workflow in Latenode. To complete the setup, copy the Webhook URL in your Latenode scenario.
To complete the integration, you must set up webhooks for delivery and open events on Mailgun.com. Here's how you can do it:
That's it! Mailgun.com will now send webhook calls to your Latenode scenario whenever an email is delivered or opened.
After taking the previous steps, you will start to get data about Delivery and Open events direct in the Latenode workflow:
Before sending the data to Mixpanel, you must transform it to match the Mixpanel API documentation. To do this, you can use a JS node in your workflow. Here's how:
That's it! Your data is ready to be sent to Mixpanel for analysis and insights.
The final code for data transform the Email Delivered event:
let result = [];
let timestamp = Date.now();
let distinct_id = data["{{1.body.`event-data`.`user-variables`.`email_location`}}"] + "_" + data["{{1.body.`event-data`.`user-variables`.`email_to_id`}}"];
let insert_id_hash = data["{{1.body.`event-data`.id}}"];
result.push({
"event": "Email delivered",
"properties": {
"time": timestamp,
"distinct_id": distinct_id,
"$insert_id": insert_id_hash
}
});
return {
result
}
Add “HTTP -> HTTP request” node and setup it up as follows
Great, you have successfully integrated Mixpanel analytics with emails sent from Mailgun using Latenode's no-code automation platform. Now you can track your users' email engagement and behavior more effectively and use the insights to improve your service.
With the workflow set up, you can create reports and dashboards in Mixpanel to better understand how your users interact with your service. This can help optimize your email campaigns, improve user engagement, and ultimately grow your business.