company logo

Help center

Go to Mailercloud
About usPricingContact us
All collectionsCampaignsPostback Conversion Setup Guide

Postback Conversion Setup Guide

This guide will help you create and set up postback conversions to accurately measure your campaign performance.

Postback conversions allow you to track user actions (like purchases, signups, or downloads) that occur after a recipient interacts with your campaign — even when the conversion happens outside Mailercloud.

How to Create a Postback Conversion

Step 1: Log in and Create Conversion Pixel

  1. Log in to your Mailercloud account.

  2. Navigate to Accounts → Settings → Conversion Pixel.

  3. Click Create Conversion.

  4. Select the Type as Postback.

  5. Once created, Mailercloud will generate a Postback URL in the following format:

https://your-domain/postback?conversion_id=CI&transaction_id=TRANSACTION_ID&link_id=LINK_ID

Step 2: Map the Conversion Pixel to a Campaign

  1. Go to Campaigns and create a new campaign.

  2. Under Campaign Settings, select the conversion pixel you created in Step 1.

  3. Click Publish to activate your campaign.

Step 3: How the Postback URL Works

When a recipient clicks any link in your campaign, Mailercloud automatically adds tracking parameters — transaction_id and link_id — to your original campaign link.

Example:

  • Original Link:

https://www.mailercloud.com/login
  • After Click (Redirected URL):

https://www.mailercloud.com/login?transaction_id=svjYWRSEziWleHwkwdMcChJfdJKEIMvHgKgURblGGARdFBnaMCzF&link_id=79206

Step 4: Capture and Store Tracking Parameters

When your landing page loads, you’ll need to capture and store these parameters locally for later use (for example, in localStorage, sessionStorage, or cookies).

Example (JavaScript):

const urlParams = new URLSearchParams(window.location.search);
const transactionId = urlParams.get('transaction_id');
const linkId = urlParams.get('link_id');

if (transactionId && linkId) {
  localStorage.setItem('transaction_id', transactionId);
  localStorage.setItem('link_id', linkId);
}

You can use cookies instead of localStorage if you want to persist these parameters across sessions.

Step 5: Send Postback When Conversion Occurs

When a user completes a conversion action (like signing up, making a purchase, or submitting a form), send a GET request to the postback URL with your stored parameters.

Example URL:

https://your-domain/postback?conversion_id=aBc&transaction_id=svjYWRSEziWleHwkwdMcChJfdJKEIMvHgKgURblGGARdFBnaMCzF&link_id=79206

JavaScript Example:

const conversionId = 'aBc'; // Your Conversion ID
const transactionId = localStorage.getItem('transaction_id');
const linkId = localStorage.getItem('link_id');

if (transactionId && linkId) {
  const postbackUrl = `https://your-domain/postback?conversion_id=${conversionId}&transaction_id=${transactionId}&link_id=${linkId}`;
  
  fetch(postbackUrl)
    .then(response => console.log('Conversion tracked:', response.status))
    .catch(error => console.error('Error tracking conversion:', error));
}

Summary

1

Create Conversion

Create postback conversion pixel in Mailercloud

2

Map to Campaign

Attach the conversion pixel to your campaign

3

Link Click

Mailercloud appends tracking parameters automatically

4

Capture Parameters

Store transaction_id and link_id on landing page

5

Trigger Postback

Send postback request when conversion occurs

Conclusion

By following these steps, you can effectively implement Postback Conversion Tracking in Mailercloud.
This setup allows you to measure conversion events that occur outside of Mailercloud, giving you a complete and unified view of your campaign performance and ROI.

Did this answer your question?
😞
😐
😁