e-comm: Checkout Started
The "Checkout Started" event is sent to indicate that a customer has proceeded past the shopping stage and is now ready to move into the checkout flow (hopefully culminating with a completed order). Adobe Analytics does not require that a product string accompany the scCheckout event, but it is common practice to include a product string which includes an entry for every product in the shopping cart at the time of the event.
In our example, we will set the scCheckout event (serialized in the Adobe Analytics report suite config to record once per visit) and a custom event (event40) to count every "Checkout Started". We'll include Category, ProductID, a product syntax merchandising eVar (eVar20) for SKU, and a product specific custom event for units (event41).
Overview
We'll start with this event being pushed to our data layer by the application. Notice that our product array is now represented by the product collection, cart.item[n].
We will create a rule in Launch that will build and send a beacon to record the event Adobe Analytics. The steps that we will detail are:
Create a rule triggered by the Data Layer Manager : Data Layer Push for "Checkout Started"
Add an Adobe Analytics Action to set scCheckout and event40 in the events string.
Add an AA Product String Builder Action to set the product string Category, ProductID, Merchandising eVars, and Custom Events fields.
Add an Adobe Analytics Action to Send a Beacon.
Test this event in the browser console.
After all is said and done, our rule will look like this:
...and the Adobe Analytics beacon will look like this:
Step 1 - Event Trigger: Data Layer Push - Product Added
The event that triggers our rule is provided by the Data Layer Manager extension. Select from the options or type in "Checkout Started" for Event Name. We get this value from the event key in the data layer push code shown above.
Step 2 - Adobe Analytics - Set Vars
Using the Adobe Analytics extension's Set Variables action, we set scCheckout and event40 in the events section.
Step 3 - AA Product String Builder - Set Variables
This action works in concert with the Adobe Analytics Set Variables action. Note that we set scCheckout and event40 using the Adobe Analytics extension, but we are setting the product specific custom events in the AA Product String Builder extension.
Root Data Object - Here we are using %Data Layer Root% which is a Context Aware Data Element provided by the Data Layer Manager. It returns a JSON object that represents the current state of the data layer (including events that may have been pushed prior).
Product Collection Path - This tells the Product String Builder how to find the product collection. A product Collection is an Array of objects containing product information. In this case, the product collection path is cart.item.
Category - This populates the first part of the product string. Setting it to "product" is one way of telling Adobe Analytics that this is a "real product". In advanced scenarios we use the product string to represent things like "payments" or "shipments" (and set the Category value accordingly).
Product ID - This is the unique identifier of the product that is being viewed. In this example, the path within the product collection to the Product ID is cart.item[n].productInfo.productID .
Product String Custom Events - For each product specific custom event, we select the event number that will be set and the path within the product collection to its value. In this example there is only one custom event (event31 which we are populating from cart.item[n].quantity) but if we were setting multiple events, the extension takes care of constructing the pipe-delimited string of events and value as required by Adobe Analytics.
Product String Merchandising Evars - For each product syntax merchandising eVar, we must select the eVar number and the path within the product collection to its value. As noted for custom events, multiple merchandising eVars may also be set here. The AA Product String Extension takes care of all of the formatting. Her, we are setting eVar20 to the value of cart.item[n].productInfo.sku.
Step 4 - Adobe Analytics - Send Beacon
This step is pretty basic, but included here to be complete. We are using a Custom Link beacon here and setting the Link Name to "Checkout Started". There is nothing special about this; use any value that you like.
Step 5 - Testing in the console
We can do an end-to-end test of this rule by building our changes into the development environment, and manually pushing the event object onto our data layer. In the image below, the Adobe Analytics Server call info is provided by a free Chrome plug-in called Debugger for Adobe Analytics.
Last updated