Using site and ROI tracking


By setting up site and ROI tracking for your account, you can do three things:

  • track the journey of contacts who go on to access your website via links in your campaigns
  • track ROI values for those same customers if you're an e-commerce business
  • split test campaigns using ROI metrics

Site tracking enriches your data and your understanding of your contacts' engagement with your site, whilst ROI tracking gives you a greater appreciation of your campaigns' ROI conversion rates. 

Before you can begin to use site and ROI tracking, you must first set it up. This involves adding lines of JavaScript code to your web pages. However, don't worry - we provide this code for you, so just carry out the following steps to add and enable it.

You're also able to set up third-party tracking for all of your campaigns from this area of the app, if you wish.

Setting up site and ROI tracking

Please note:
  • Our site and ROI tracking script can't be applied via Google Tag Manager. It needs to be added directly to your site as outlined below.
  • For Magento users, ROI tracking must be set up using the Magento connector and not in Engagement Cloud. Learn how in the Magento 1 and Magento 2 tracking articles.
  1. Select Campaigns > Advanced features, and then select the Site & ROI tracking tab to display the following screen.

  2. The site tracking code is displayed at the top of this screen. Copy this code and add it before the closing </body> tag on every page of your website that you would like to track. This will enable you to track which pages your contacts go to after clicking a link in your email. 


    This site tracking information is then provided within the reporting area against the relevant campaign.
  3. If it's the case that you'll require tracking across different subdomains (for instance, and then enter the name of your domain (without the subdomain) into the Domain to track box under the Sub domains section.


  4. Click on the Generate button and the JavaScript above will generate the correct code to be copied and added to your web page.


  5. The ROI tracking code is displayed lower down the screen. It enables you to track purchases made by a contact arriving at your website from a link in your campaign. 

    This code is set out with example markers of "product", "Product name" and "CheckOutAmount" which should be replaced with the markers you’re planning to track.CP_ROI_tracking_code2.2.png

    In the example given, this code would need to be added to your post-purchase confirmation page or its equivalent and it needs to be appended underneath the last line of the site tracking code of that page. This will enable you to track a list of the products purchased and the total checkout amount.

    Any purchases made are tracked and this information is shown in the reporting area against the relevant campaign.

    Please note

    • Site tracking code should be added to every page that you wish to track.
    • ROI tracking code only needs to be added to your post-purchase confirmation page.

    However, you need to make sure you append the ROI tracking code to the site tracking code, and not just have the ROI tracking code by itself. Without the site tracking code, your post-purchase confirmation page won't get tracked, meaning the ROI information won't get retrieved.
  6. As explained on the screen, there is an optional third parameter that can be set on your pages. By default, multiple values per ROI marker are recorded, so if a user clicked to go back in their browser, more than one value might be stored as a consequence. To store only the latest value you must add and set this parameter to 'true'. An example of the notation required is provided for you to edit, copy and paste.

ROI tracking session length

An ROI tracking session lasts for one hour.

Setting up ROI split testing markers 

Once you have ROI tracking set up you can enable ROI split testing, which will allow you to measure winning split test campaigns on ROI data, not just the amount of clicks and opens.

Firstly, you must set up your ROI split testing markers. ROI markers are the parameter names discussed above in step 5, which will be the corresponding names you use for such fields in your own system.

Go to the bottom of the page and click on Add new to add your ROI marker's details.


A box will appear for you to set the name of the marker and select its data type from the dropdown options - either text, number, date or 'yes/no' (known as a Boolean value).


Click Save to commit the ROI marker.

It will then be listed in this section, available for editing or deletion. If you delete markers here, it will mean you can no longer use them for split testing purposes but they will still be tracked if you call them on your site.


Adding at least one ROI marker will ensure the ROI metric option becomes available to select under 'Set your split testing options' when reaching step 4 ('Contacts') of the campaign creation process. Selecting the ROI radio button will produce a dropdown of ROI marker options which is populated by the ROI markers you've created here. 

Viewing information about ROI in campaign reports

On the campaign report overview page, ROI data is displayed in the ROI headline tile. This headline tile displays the following data, depending on the results of your ROI reports:

  • 'No markers have been tracked for this campaign': This notice is displayed if either you haven't included ROI tracking on your webpages, or your campaign has not collected any ROI tracking data.
  • The number of markers that were tracked: Mouse over the headline tile and click 'View full report' to find out which markers were tracked.
  • The total checkout amount of your ROI tracking: If you want the ROI headline tile to report this amount, you need to set up your ROI tracking with the CheckOutAmount marker, which is in the example code under the 'ROI tracking' section.

You may also find the following articles useful:

Setting up third-party tracking

At the foot of the 'Site & ROI tracking' tab, you can set up third-party tracking - such as for Return Path or 250ok - for all of your campaigns. 

Insert your third-party tracking code into the field and click Save. The code will get added before the closing </body> tag for all campaigns sent from the account.



  • Be very careful to avoid any mistakes or typos when entering this, as we'll apply the tracking code exactly as it's provided. If mistakes are present, your third-party tracking won't work correctly.
  • After saving, you'll need to save a campaign at least once for the tracking code to then be applied to it.

When the code has been configured properly, the results should look similar to the following example:


You can access this view by clicking View full report link that's available in the 'Campaign report' area.



Have more questions? Submit a request


  • Avatar

    Hi Stu

    We've been using ROI for a while now but are currently working on campaign where the email directs a user to a domain say and then from the page they can clickthrough to a different domain

    We have tracking codes on both and each allows us to track separately but if the User journey goes to and then to we are unable to track this cross domain activity.  

    Is this possible?

  • Avatar

    Hi Jon,

    I'm afraid the tracking is tied to the domain at present; this means that other domains cannot read the tracking data when you move from one to the next. So while you can track across sub-domains, tracking across different domains isn't possible at the moment.

    Not to say it's something we couldn't do, so do add in a feature request. There are a few other ROI feature requests that you might be interested in dropping a vote on too.



  • Avatar

    Hi there,

    I asked our dev to add the tracking code to our site and he said it's taking a while to load (8 seconds? I'm not sure if thats right, that seems a long time!) - but he asked if we can install the javascript locally rather than externally. Is that possible?

    Thanks for your help!

  • Avatar

    Hi Stoo, 

    If we add the tracking code to our site, once a customer has clicked through from one of our emails will it also track them whenever they return to the website?



  • Avatar

    Hi Rebecca,

    It will track them if they come from an email campaign sent from the system. If i was to navigate away for an hour and then come back to your site directly it would not maintain the tracking as we would no longer know they campaign from the campaign sent on 16/01/2013 at 11:00 am. Hope that helps

  • Avatar

    Hi Tom,

    Thanks for your response. Is there no way that it can recognise a users IP address so that everytime they return to the website we can track their behaviour? This would be really useful for updating a users profile and creating targetted campaigns around the pages on our website that they look at.



  • Avatar

    Hi Rebecca,

    The issue you have is that most home broadband customers are on a rolling IP address so this isn't going to be of much benefit as if i was at home went to your site on a regular basis you would assume i am a different person when infact i just used a different IP address to connect to the site. 

    Are you looking to monitor behavior like frequently viewed products and abandoned shopping carts? 

  • Avatar


    Earlier in this thread I asked about tracking ROI across different domains.  The feature request that Stoo references above is now a broken link.  Is this likely to be possible in the future or possible to do now?

    We work with a client where the ROI we want to track is contained within some iframe hosted pages on our server, but the email we send out will need to reference their Domain/URL.  As the landing page is not on the same domain as the iframe hosted content I dont think we are able to track this yet using your platform? 

    Please confirm



  • Avatar

    Is there documentation on how to track page views?

  • Avatar

    Hi Marina,

    This is documented in steps 1 to 4 of the above article, which explains how to set up it up page view tracking so you can track the views which come as a result of a click through from your campaign. Page view reporting will also detail how many times each page was viewed, and by which contacts.

    Unless you're referring to something slightly different?

  • Avatar

    The I.T team are going to get this code added to our website, but are asking if it uses cookies for tracking?

    Can someone please confirm?


  • Avatar

    Hi Andrew. Thanks for your question. Yes, it uses cookies to track contacts whilst they browse your site’s pages and records any ROI data, should they make a purchase. This data is then available in reporting, and for ROI split testing. The cookies expire after an hour.