Back

Summary

Cart Abandonment is any representation of a visitor adding items to the cart and not purchasing. This post describes how to setup Cart Abandonment within AudienceStream. The example discussed below will explore the use case where a visitor adds a product to the cart and then the session ends without an order completion event. Another basic example is when the visitor is on the Cart page and then exits back to the Marketing pages.

Requirements

If tracking the click event of a product being added to the cart, a utag.link() call is required so that the event and product information can be sent to AudienceStream. Here is a sample jQuery onHandler extension that shows the event and product information being declared.
Screen_Shot_2014-04-11_at_11.33.40_AM.png

The utag.link() will trigger the DataCloud tag to fire and automatically send this information even if no tags fire.

Note: No matter the cart action, the product information needs to be made available. This is because Cart Abandonment is usually tied to an email campaign which will reference the products added to the cart. The product information will help the user be targeted correctly.

 

Incorrect Setup

*Added July 14, 2014

As clients have began to take a shot at implementing rules and attributes, there have been some incorrect implementations. Below a modified badge transformation of one such Cart Abandonment campaign. While correct in the sense that it is looking to see if the current page is the free trial page and the confirmation page isn't viewed, it is still incorrect because this badge would be applied on the free trial page without taking any later page views into consideration. If a later page view is the receipt page the badge would incorrectly still be applied.

Screen_Shot_2014-07-14_at_2.58.06_PM.png

Therefore tracking each page view separately with a flag and then viewing the flag's state at the end of the session will be the correct logic. Here is how that is done.

 

Rules Setup

First, create a rule that determines when an Add to Cart event occurred. Looking at the onHandler above we can use the "as_event_type" parameter and when it equals "addproducttocart" we know it's the correct event.
Screen_Shot_2014-04-11_at_11.26.57_AM.png

Second, create a rule that determines when an Order has been completed. This logic was copied directly from the Order load rule in Tealium iQ.
Screen_Shot_2014-04-11_at_11.27.27_AM.png

Attributes Setup

Create a Flag attribute titled "Add to Cart". We will need to apply two transformations to the Flag:

Our first Transformation sets the "Add to Cart" to flag at the beginning of every new visit (session). The logic is "any time a new visit occurs set the flag to 'False'".

Screen_Shot_2014-04-11_at_11.28.00_AM.png

The second Transformation sets the "Add to Cart" flag to "True" any time an Add to Cart event occurs.
Screen_Shot_2014-04-11_at_11.28.07_AM.png

This allows us to distinguish at the visit level whether or not an Add to Cart event occurred.

 

Next, we need to create Transformations for our "Order Complete" Flag. The first transformation, similar to the first transformation on the "Add to Cart" flag will set the "Order Complete" flag to false at the beginning of every new visit.

Screen_Shot_2014-04-11_at_11.28.25_AM.png

The second transformation for "Order Complete" will set the flag to "True" when a visitor reaches the Order Confirmation page.
Screen_Shot_2014-04-11_at_11.28.30_AM.png

This allows us to distinguish at the visit level whether or not an Order has been submitted.

 

Cart Abandonment Setup

Now that we have the basics in place to track an Add to Cart event and Order Complete event, we can build the logic to determine the Cart Abandonment.

 

The logic is: "If an Add to Cart event occurred and at the end of the visit there is not an Order Complete event then apply the Badge."

 

To create the above logic, we need to set up two more rules:

First, create a new rule called "Cart Abandoned" where the "Add to Cart" flag is "True" and the "Order Complete" flag is f
Screen_Shot_2014-04-11_at_11.31.31_AM.png

Now create a Badge named "Cart Abandoner" that is applied when the "Visit ended" and the Cart Abandoned rule is evaluated to true.
Screen_Shot_2014-04-11_at_11.44.17_AM.png

Explanation

  • When a new visitor enters the site, both the "Add to Cart" and "Order Complete" flags are set to "False".
  • When a product is added to the cart, the "Add to Cart" flag is changed to "True" while the "Order Complete" flag remains false.
  • These values will persist until either one of two actions occur.
    1. If an order is completed then the "Order Complete" flag is changed to "True". At the end of the session the "Cart Abandoned" rule will not evaluate to true so the Badge will not be applied.
    2. If an order is not completed then the "Order Complete" flag will remain "False". At the end of the session the "Cart Abandoned" rule will evaluate to true so the Badge will be applied

Configure Audience

Now that the Badge has been applied, an Audience needs to be created so that a Service can take action. In the drop-down next to the "Add Filter" button, select the "Cart Abandoner" Badge and add the filter. Give the Audience a name such as "Cart Abandoners".

Screen_Shot_2014-04-11_at_1.29.24_PM.png

Distribute

Now that an Audience has been created, any Service can be configured to use the Audience. Other posts describe creating a Service in detail.