Pages

Friday 6 January 2012

tracking shopping cart in omniture

This blog post is about how to track the shopping cart actions and better understand what users are adding to the cart, how often it is happening and what you can potentially do to improve it.

Variables needed
s.products variable
s.events for all events occurring before the cart (prodView), within the cart (additions, views, removals, starts) and checkout funnel (checkout start, each page within checkout process and the purchase event)
s.purchaseID variable
two eVar variables
s.zip variable
s.state variable

steps to be followed
1) pass the product view event when a product page is viewed. Also, on the product detail page, pass the product viewed into the s.products variable.

Example
s.products=”;xyz1234″
s.events=”event1,prodView”

event1 is considered a page view event so that you can see page views by each captured commerce variable.

2)The second step occurs when a user clicks on the "add to cart" button. When this occurs for the first time (i.e. the first time a user adds something to the cart), you must pass both the scOpen + scAdd events to establish that the cart was initially opened and that an item was added to the cart. On other subsequent cart adds, you will just need to pass only scAdd event. With both paths above, you must also remember to pass the s.products string for the item that was just added to the cart. Only pass the product that was just added and not all items within the cart.

Example
for both cart created/opened and cart add,Cart Open
s.products=”;xyz1234″
s.events=”event1,scOpen,scAdd”
s.eVar1=”+1″

Cart Add – Single Product
s.products=”;xyz1234″
s.events=”event1,scAdd”
s.eVar1=”+1″

Cart Add – Multiple Products
s.products=”;xyz1234,;abc5678″
s.events=”event1,scAdd”
s.eVar1=”+2″

The s.eVar passed above is acting as a counter eVar. A counter eVar counts the number of times a specific action occurs (in this instance the number of items added to the cart). This allows you to see the revenue generated by the number of items that were in the cart.

viewing cart
If a user doesn’t purchase immediately, goes to do something else, then goes to view the cart prior to purchasing, you will need to pass a scView event to show that the cart was viewed.

Example
s.events=”event1,scView”
s.products=;”xyz1234″

removing item from cart
If the user decides to remove an item from the cart, you will need to pass the scRemove event and the product that is being removed.

example
s.events=”event1,scRemove”
s.products=”;xyz1234″

checkout
On the next page after a user clicks checkout, usually the checkout login page, pass the scCheckout event as well as the products variable with the associated productID(s) that were within the cart when checkout was selected.

example
s.products=”;xyz1234″
s.events=”event1,scCheckout”

For each page within the checkout process (i.e. enter shipping info, payment info, checkout confirmation, etc), pass a unique custom event and the associated s.products.

Shipping Info
Pages.products=”;xyz1234″
s.events=”event1,event10″

Payment Info
Pages.products=”;xyz1234″
s.events=”event1,event11″

Order Review
Pages.products=”;xyz1234″
s.events=”event1,event12″

A best practice to follow is to pass the products variable on the same page as an event. This ties the product(s) on the page to the event for reporting purposes.

3) Lastly, on the order thank you/confirmation page, set the purchase event, the purchaseID variable and the products variable to the associated product ID(s) with each products associated units and revenue. The revenue amount is the total for that product (i.e. units x price of each unit), not the unit price.



example
s.products=”;xyz1234;2;150.00″
s.events=”event1,purchase”
s.purchaseID=”20100327-123456A789″
s.zip=”10977″
s.state=”NY”
s.eVar1=”10977″

Passing the zip to an eVar allows you to classify the zip codes captured into their corresponding states and regions that they belong to. Now you can see product consumption by region/state/zip to better understand how different areas are purchasing your products.

The s.purchaseID variable is passed to prevent the over counting of orders due to page loads, clicking back after order is placed and user moves on, etc.

With this in place, business users will be able to not only improve the conversion of their products but also better identify and tap into opportunities via product affinities.