Setting up abandoned carts

Initial considerations

If you are not able to answer 'yes' to any of these questions, we may not be able to add the abandoned carts feature:

  1. Do you have a developer/organisation who can make modifications to your website?
  2. Can your ecommerce site generate a JSON object based on the example below?
  3. Can this JSON object be presented on every page of the site after the card is created?
  4. On cart completion, are you able to send the complete cart, with a code to say it is competed?

There are also a further set of points to consider that may make installation harder:

  • Is it possible to access an abandoned cart from a single URL (for example: https://www.my-site.com/card?id=12345)?
  • Is it possible to test the payment process (with a fake promo code or credit card number)?
  • Is the your ecommerce site a single-page app, or are full page refreshes infrequent?
  • Is the domain of your ecommerce site the same as the domain for the checkout?
  • Is a different domain used for the mobile site and is this domain different to the checkout?
  • Are the checkout/payment options done via a third party?  If so, what third party is used, and how is this implemented (for example, in an iframe)?

To provide us with the answers to the above, you'll need to fill in our abandoned carts questionnaire.

Implementation schedule

The following details the typical steps for an integration implementation sequence. Each step is approximately a week, depending on specific requirements, testing, etc.

 

Our responsibility

Your responsibility

Installation

Provide Integration Guide

Create initial program, and provide program ID.

Provide cartInsight ID

Review Integration Guide

Install JavaScript

Post JSON object to the cartInsight servers

Review installation

Review the installation, check the JSON object is valid and check the cart completion process is correct.

Provide information required for the email and program built (design requests, header and footer information, email program scheduling etc)

Configure email
and program

 

Build the email(s) and construct the program

Review email

Testing

Test the abandoned cart process

Test the abandoned cart process

Sign-off

Request sign-off of the process

Sign off the process

Example JSON script

Here is an example of the script you will need to include in your site. This script will be customised for your site, and will need to be installed by yourselves or the people who developed your website.

A few pointers:

  • This should be on every page of your site, after the initial cart is created
  • Once the cart has been completed, this will need be done one last time with a cartPhase of 'ORDER_COMPLETE'.
  • Once you know who your user is (when they register/log in), you will need to identify them with the 'identify' request below.
  • The cartInsight script must be on the page before the cart tracking code is executed.
  • For single-page apps, you will need to manually call the tracking code when any user action occurs.

A full explanation of this script can be found here.

Example script

<script>

// Initiate cartInsight (this section MUST come prior any other dmPt calls) var dm_insight_id = 'DM-123SAMPLE123-01';
(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);};w[o]('track'); })(window, document, '//static.trackedweb.net/js/_dmptv4.js', 'script', 'dmPt'); // Identify the user via their email window.dmPt("identify", "test@user.com"); // Track your cart window.dmPt("cartInsight", { "programID": 12345, "cartDelay": 25, "cartID": "123ABC", "cartPhase": "CUSTOMER_LOGIN", "currency": "USD", "subtotal": 35.98, "discountAmount": 0, "taxAmount": 0, "grandTotal": 35.98, "cartUrl": "https://www.my-website.com/checkout/cart", "lineItems": [ { "sku": "576879", "name": "Shirt", "description": "A super great description of the product", "category": "Shirts > T-Shirts > Blue", "other": "This can be any string value you like", "unitPrice": 11.99, "salePrice": 11.99, "quantity": 2, "totalPrice": 23.98 "imageUrl": "http://www.my-website.com/a/p/shirt.jpeg", "productUrl": "http://www.my-website.com/index.php/shirt.html", }, { "sku": "1112296", "name": "Fleece Jacket", "description": "A well appointed Fleece jacket", "category": "Shirts > T-Shirts > Blue", "other": "This can be any string value you like", "unitPrice": 65.99, "salePrice": 55.50, "quantity": 1, "totalPrice": 55.50 "imageUrl": "http://www.my-website.com/a/p/fleece.jpeg", "productUrl": "http://www.my-website.com/index.php/fleece.html" } ] }); </script>

Testing checklist

Once you have access to dotmailer, and you have the tracking code:

  • Install the tracking code on your website
  • Check it is installed. In your browser’s console, type window.dmPt("version"). The version number should appear in the console window.
  • Create the JSON object, and make sure it is output after the webInsight script. Tip: It is better to put the JSON object at the footer of your page, before the </body> tag, where possible.
  • Verify that, when there are no products in your cart, the JSON object is either not output, or there are simply no line items within the cart.
  • Add a product your cart, and verify that the JSON object is output, with the single product within
  • Add another product to your cart and verify the JSON object now has the two expected products within.
  • Verify that, as you navigate around your site, the JSON object is included on every page.
  • Remove a product from your cart, and verify the item has been removed.
  • Remove all items from your cart, and verify that the JSON object is present on your page, but has no line items within.
  • Add some products back to your cart, and go to your checkout page. Verify the JSON object is output on this page as expected.
  • Place a test order, and check that, once the order is complete, the JSON object is present, with a cartPhase of 'ORDER_COMPLETE'
Have more questions? Submit a request

Comments

Powered by Zendesk