Use abandoned browse

The product a contact last browsed is identified in Dotdigital with our extended web behavior tracking script.

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

Because of the extended web behavior tracking script and its support of custom values, you can target your contacts with email campaigns that highlight what they last browsed.

Enable abandoned browse features

Talk to your Customer Success representative to enable the abandoned browse feature. It might require custom JavaScript and dynamic personalisation to be enabled on your account.

Using last browsed variables

When you create a segment that contains a WebInsight data block, variables appear that are related to last browsed. The variables are:

Variable *



product_name (✔️)


"Nitro Fate Women's Hybrid Camber Snowboard 147cm 2018"

product_sku (✔️)



product_price (✔️)



product_url (✔️)


product_image_path (✔️)







"In stock"



"New Styles, Sale, Snowboards"










* ✔️ - The variable is required because it's used to power the default content in the Last browsed product block.

Set up the script

The script below extends the web behavior tracking code by including the last browsed product variables described above:

Edit the script

This script requires a developer to install and set up. Make sure to read the Script requirements below and make all appropriate edits to the script.

<script>/* -------------------------------------------------------IMPORTANT!The code below requires a developer to install and set up.Please do not simply copy/paste this onto your website. ----------------------------------------------------------- */

// Initiate Web Behaviour Tracking (this section MUST come prior any other dmPt calls)
(function(w,d,u,t,o,c){w['dmtrackingobjectname']=o;c=d.createElement(t);c.async=1;c.src=u;t=d.getElementsByTagName (t)
[0];t.parentNode.insertBefore(c,t);w[o]=w[o]||function(){(w[o].q=w[o].q||[]).push(arguments);};})(window, document,
'//', 'script', 'dmPt');

// Replace DM-000000000-00 with your web behaviour profile's Unique ID
// Replace with the domain of your store
window.dmPt('create', 'DM-000000000-00', '');

// Setup the last browsed product
var viewed_product = { product_name: "Name of Product", product_url: "", product_image_path: "",
product_description: "The description of the product", product_sku: "ABC123", product_price: "99.99", product_status: "In stock", product_currency: "GBP", product_specialPrice: "89.99", product_categories: "Category1, Category 2,Category 3",
product_brand: "Brandname" };

// Initiate the tracking script, pass the product object
window.dmPt('track', viewed_product);

// Replace with the email address of the identified contact
window.dmPt("identify", "");</script>

Script requirements

Your script requires the following edits so it works correctly:

  • Set the web behavior tracking profile ID and the domain to be tracked:

    • Replace DM-000000000-00 with your WBT ID. You can find your store's WBT ID in your store account.

    • Replace with your store's domain.

  • Complete the variables in the viewed_product object with the product details from your ecommerce store.

    • product_name, product_url, product_sku, etc. all need to be set.

  • Complete the identification event by using the ecommerce platform with the email address of the identified contact.

    • Replace with email address of the identified contact.

This is a simplified script version. The script configuration might also include abandoned cart and guest abandoned cart.

Using abandoned browse for Adobe Commerce or Magento Open Source

To use abandoned browse for Adobe Commerce or Magento Open Source, make sure you're using version 4.3.0 (or higher) of our connector.

To use abandoned browse in your Adobe Commerce or Magento Open Source account:

Go to Stores > Configuration > Dotdigital. Under the Tracking area, you can find the Web Behavior Tracking Profile Id. From here you can turn on the abandoned browse functionalities.

Using abandoned browse for Shopify

Our Shopify connector automatically incorporates the necessary scripts into your theme, enabling the use of Abandoned Browse.

Did this answer your question?