ROI Tracking

ROI Tracking enables Maxemail to track conversions and revenue from your email campaigns.

Optionally, it also allows gathers full website page visit data for each recipient that clicks through from an email campaign. There is no direct usage for this data in Maxemail however, so we recommend alternative tools like Google Analytics to monitor user visits on your site.

How it works

When enabled by ticking Track ROI in an email's Setup page, Maxemail will add a special query string to every link in the email, which looks similar to: mxmroi=1-1-1-0

When a recipient clicks on a link, this information is passed in the URL to your website, where the ROI Tracking script must be deployed. The tracking script picks up the information from the URL so it can identify the email recipient, and then tracks them on your website until they complete a transaction. The completion and optionally the revenue is sent back to Maxemail so it can be recorded in the email stats.

By default, the ROI code that identifies the recipient is stored in a cookie for 45 days. If the recipient returns to the site within this time, any transaction will be recorded against the email which they originally clicked. To adjust the lifetime of this cookie, see #setExpiryDays.

Cookie details

These details may be required for your own website privacy or cookie policy:

Cookie namemxmroi
Cookie valueeg. 1-1-1-0
Cookie lifetimedefault 45 days (change with #setExpiryDays)

Tracking Domain Restriction

Because Maxemail has to modify the link URLs to include the ROI query string, it should be configured to only do this for your own website. This prevents Maxemail from modifying the URL of any other websites which may be linked, eg. third-party sites. A user with administration rights can modify the Tracing Domains configuration of a customer space. If you do not have access to the Admin window, please contact Support using the details provided in Help > About.

Standard Setup

There are three parts to a successful implementation:

1. Track the recipient

The first step is to add the ROI Tracking script to your website. This will make the ROI Methods available for you to use (so must be loaded on the page before trying to call any of the methods) but it will only execute once the page load is complete.

We recommend simply adding the following to your website's main template so it is applied to every page. Usually this would be added in the HEAD section of your HTML document.

<script src=""></script>

// ROI config options go here

Any ROI config options must be included immediately, before the page load is complete. These are marked in ROI Methods.

2. Set the revenue

This section can be skipped for websites that do not have a revenue to track, eg. restaurant reservation sites.

Maxemail will display various revenue statistics for an email for completed transactions. It's also possible to export the data for incomplete transactions separately.

In order to display the revenue for completed transactions, the revenue must be defined before the transaction is marked as complete.

If tracking incomplete baskets is required, then the revenue should be set whenever it's available on your site (eg. when a shopping basket total is available/updated). The system will update the revenue value stored against that particular recipient for the current transaction, so that if the transaction is never marked as complete, the system will have the most up-to-date revenue value available for the incomplete transactions report.

The revenue should be set using either #setRevenue or #setRevenueEl. This must then be followed by a call to #track or #complete (unless autoTrack is enabled and the revenue has been defined before page load is complete).


Revenue must be tracked as an integer (whole number). No currency symbols or decimal points are allowed.
For example, £200.00 is tracked as 20000

3. Mark the transaction complete

In order to show conversions stats against the email, the system should be instructed that the current transaction is complete. Use the #complete method on your completion page.

In order to record more than one transaction per recipient for a given email, it is necessary to provide a unique transaction reference. Without this any subsequent transactions will not count towards the email stats.

The example below shows how the revenue and completion can be set in one request on the completion page.