Site and ROI tracking

Enrich your understanding of contact engagement with your site, and gain a greater appreciation of your campaigns' ROI conversions.

Gareth Burroughes avatar
Written by Gareth Burroughes
Updated over a week ago

The Dotdigital Tag

We have a new feature currently in Public preview which simplifies the process of adding Dotdigital scripts to your site. Learn more in Add the Dotdigital Tag to your website.

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

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.

Before you start

Things you need to know:

  • 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 the ROI tracking and ROI split testing sections to be available, your account must be using the Direct revenue attribution method.

  • For Magento users, ROI tracking must be set up using the Magento connector and not in Dotdigital.

Set up site and ROI tracking

  1. Expand the User menu and go to Settings > Tracking > Site & ROI tracking.

  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 enables 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 analytics area against the relevant campaign.

  3. If you 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. Select GENERATE, and the JavaScript above generates 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.

    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 analytics 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 are the corresponding names you use for such fields in your own system.

Go to the bottom of the page and select ADD NEW to add your ROI marker's details.

In the ROI marker details popover, 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).

Select SAVE to confirm the ROI marker.

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

Adding at least one ROI marker ensures 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 produces 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 email 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.

Setting up third-party tracking

You can set up third-party tracking - such as for Return Path or 250ok - for all of your campaigns.

Before you start

  • Be very careful to avoid any mistakes or typos when entering this, as we apply the tracking code exactly as it's provided. If mistakes are present, your third-party tracking won't work correctly.

  • After saving, you need to save a campaign at least once for the tracking code to then be applied to it.

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

Cookie management for Site and ROI tracking

Our Site and ROI tracking features use non-essential cookies to work. To be GDPR compliant, you must get consent from your users if your site uses any non-essential cookies. You can do this with a cookie management solution.

Learn more about essential and non-essential cookies, and when and how to use cookie management, in Make sure you're cookie compliant.

Did this answer your question?