Server-side ROI Tracking

Although not the recommended method, it's possible to implement ROI tracking server-side. This requires a more in-depth implementation, but if development resources are available, reduces the requirement for extra javascript client-side.

The recipient visit

When a recipient visits the site via a click-through with ROI tracking enabled, the URL query string will contain the parameter mxmroi. The value for this takes the form a-b-c-d

VariableType
aunsigned int32, always positive
bunsigned int32, always positive
cunsigned int32, always positive
dnumeric boolean, always 0 or 1

If d is 1, it is a test email and the details should not be stored. No further action should be taken. Ideally, any pre-existing details should not be overwritten, so any completed transaction can be assigned to the previous click from a live campaign.

If d is 0, the values for ab and c should be stored for later use. As for Maxemail's own tracking script, it's suggested that these details are stored for a period of 45 days, (or whatever is chosen by Marketing), so that if a recipient revisits the website within this period their order can be assigned to the campaign that originally brought them to the site.

Completing the transaction

Once the recipient has completed the transaction, a request must be made to Maxemail. For a transaction value of 32.58 (multiplied by 100 as the revenue value is always an integer), the request follow this format:

https://mxm.xtremepush.com/trak/complete/customer/{a}/recipient/{b}/link/{c}/revenue/3258

The placeholders indicated by the braces should be replaced with the respective values. The response will be an image, but that can be ignored as it's the sending of the request that returns an HTTP 200 response that is important! The request should be made using HTTPS.

If a revenue value does not need to be sent, the last two part of the URL can be omitted, so instead ending with the value of c.