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.
In this article:
Before setting up Cart Abandonment user case, we will need to ensure add to cart and puchase event are being sent to AudienceStream.
For 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.
The utag.link() will trigger the Tealium Collect Tag to fire and automatically send this information to AudienceStream even if no tags fire.
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.
Create a Visit Boolean attribute titled "Has Added to Cart". We will need to apply two Enrichments to the Flag:
Our first Enrichment sets the "Has Added to Cart" boolean to false at the beginning of every new visit (session). The logic is "any time a new visit occurs set the boolean to 'False'".
The second Enrichment sets the "Has Added to Cart" boolean to "True" any time an Add to Cart event occurs. We will need create a rule that determines when an Add to Cart event occurred. Looking at the onHandler above we can use the "tealium_event" parameter and when it equals "add_to_cart" we know it's the correct event.
This allows us to distinguish at the visit level whether or not an Add to Cart event occurred.
Next, we need to create another Visit Boolean attribute titled "Has Completed an Order". We will need to apply two Enrichments to the Flag:
The first Enrichment, similar to the first Enrichment on the "Has Added to Cart" boolean will set the "Has Completed an Order" boolean to false at the beginning of every new visit.
The second Enrichment for Has Completed an Order will set the flag to "True" when a visitor reaches the Order Confirmation page. We will need to create a rule that determines when an Order confirmation page has been reached. Similar to the identification of add to cart event, we could use the "tealium_event" parameter.
This allows us to distinguish at the visit level whether or not an Order has been submitted.
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."
Create a Badge named "Cart Abandoner" that is applied when the "Visit ended" and Cart Abandoned rule is evaluated to true, where "Has Added To Cart" is true and "Has Completed an Order" is false.
Now that the Badge has been configured, an Audience needs to be created so that a Connector can take action.
Create Audience named "Cart Abandoners" with condition "Cart Abandoner" Badge is assigned.
Now that an Audience has been created, any Connector can be configured to use the Audience.
Learn more about setting up connectors.