The Shop Action 5 tag captures data about selected products and which products are present in a shopping cart, if any, when the cart is viewed.
When a visitor views a shopping cart with carted products, a Shop Action 5 tag should be called for each displayed carted product including information about the products such as Product ID, quantity, and price. In cases where a visitor can select or cart a product without actually being directed to the cart page, a single Shop Action 5 tag should also be called for the product just added. For linear purchase or application processes without a 'cart', the Shop Action 5 tag should be sent when the product is 'selected'. Typically, this occurs at the earliest point in time when the selected product ID, unit price, and unit quantity values are known.
- Key Reports Populated
- Dashboards (Commerce Overview); Site Metrics; Products (all); Paths; Demographics (Profile Segments); Report Segments
- Digital Data Exchange Object Example
-
digitalData = {page:{pageInfo:{pageID:'CART',onsiteSearchTerm:'',onsiteSearchResults:''}, category:{primaryCategory:'CHECKOUT'}, attributes:{exploreAttributes:'',extraFields:''}},
cart:{item:new Array()}};
digitalData.cart.item[0] = {productInfo:{productID:'productID123',productName:'productName123'}, quantity:'1',price:'9.99',category:{primaryCategory:'',virtualCategory:''}, attributes:{exploreAttributes:'',extraFields:''}};
digitalData.cart.item[1] = {productInfo:{productID:'productID456',productName:'productName456'}, quantity:'1',price:'9.99',category:{primaryCategory:'',virtualCategory:''}, attributes:{exploreAttributes:'',extraFields:''}};
Tagging function
In order to use the Shop Action 5 tag, a call is made to cmCreateShopAction5Tag(…). This call should be made for the product selected or for each product viewed in the cart.
In addition to these function calls, you must also make a single call to the function cmDisplayShops() at the end of the sequence of 1 or more cmCreateShopAction5(…) tags. This function evaluates the Shop Action 5 tag data and performs any needed client-side aggregation of identical products. The ShopAction5 data collection image request(s) are sent only when the cmDisplayShops() function is called.
Note: The following values are automatically removed fromDigital Analytics tag parameter data and cannot be collected or reported:
- Single quote (')
- Double quote (")
- Carriage return (hex 0D; regular expression \r)
- Line feed (hex 0A; regular expression \n)
- Comma (,): replaced with a space character prior to data loading and reporting
- Backslash (\): this is a standard JavaScript escape character. In order to collect and report a "\" character, two "\" must be specified in sequence ("\\"). The 2nd "\"is reported.
Tags
- Product ID (Required): Product ID. Length: 256.
- Product Name (Required): Name of the product in the cart. Length: 256.
- Quantity (Required): Quantity of this product currently selected or viewed in a cart.
For Travel, this is typically the # of tickets selected for a given trip or event, the # of items selected for a given rental-product, or the # or room-nights selected for booking in the hotel.
For Financial Services applications this is typically "1", if only 1 quantity is applicable to a given financial product.
Length: 8.
- Unit Price (Required): Price of each unit of the product. This value should be a decimal number and should not include a dollar sign ($).
For Travel this is typically the price for a given route or event ticket, rental product, hotel room/night price, etc.
For Financial Services applications this is usually "0" if no revenue value is associated with the application.
Length: 16.2.
- Category ID (Optional): Category ID for the leaf node to which this product belongs. This should match with a category ID sent in the CDF file. Length: 256.
- Attribute String (Optional): Up to 50 "-_-" delimited 'attribute' values accessible in Explore reporting. Shop Action 5 and 9 tags both share the same 50 attributes. Length: 256 per value.
- Extra Fields (Optional): Up to 15 "-_-" delimited 'extrafield' values accessible through optional Standard Data Export. It is possible to copy the first 15 values from the first 15 Attribute String values by calling cmSetupOther ({"cmAutoCopy AttributesToExtra Fields" :true}); on the page prior to tag function calls. Length: 100 per value.
- Virtual Category (cm_vc) (Optional): This parameter causes all same-session and same-category product tag activity to be re-categorized during report processing using the specified Virtual Category. This is useful for scenarios where products can be selected or carted without first viewing a product detail page, such as 'Add to Bag' links in a 'Customers Also Purchased' list of recommended products.
Shop Action 5 tags received with a specific Virtual Category value are treated as unique Shop Actions during deduplication processing at Acoustic servers. During report processing, Virtual Categorization for Shop Action 5 tags is applied only to other same-session Product View and Shop Action activity having identical Category ID values.
Session Example:
- Virtual Category value "ALSO PURCHASED" is collected with a Shop Action 5 tag for Product ID "123" and Category ID "ABC".
- A second Shop Action 5 tag is collected for Product ID "123" and Category ID "XYZ". No Virtual Category value is collected with this tag.
Reporting Result:
The Virtual Category "ALSO PURCHASED" will be applied only to Shop Action session activity for Product ID "123" and Category ID "ABC". The Shop Action activity assigned to Category "XYZ" in the session will continue to be reported in Category "XYZ".
Length: 256.
Examples
The following example shows Shop Action 5 tags being sent for a couple of products on the Cart page:
<head> <script type="text/javascript" src="//libs.coremetrics.com/eluminate.js"> </script> <script type="text/javascript"> cmSetClientID("99999999",true,"data.coremetrics.com","thesite.com"); </script> </head> <body> ... <script type="text/javascript"> cmCreatePageviewTag("Cart", "CART"); // A separate call to cmCreateShopAction5Tag should be made for each cart entry cmCreateShopAction5Tag("12345", "Product X", "2","5000.42","CATXYZ"); cmCreateShopAction5Tag("67890", "Product Y", "1", "10.95", "CATABC"); cmDisplayShops(); </script> </body>
Travel: 2 hotels simultaneously selected for booking (1 and 2 rooms respectively)
cmCreatePageviewTag("Booking: Billing Page", "Booking"); cmCreateShopAction5Tag("12345", "Property ABC", "1", "49.99", "US:TX:Austin"); cmCreateShopAction5Tag("67890", "Property XYZ", "2", "65.49", "US:TX:Austin"); cmDisplayShops();
Financial Services: selected application and started the application process
cmCreatePageviewTag("APPLICATION STEP 1(START):Home Equity Loan", "consumer loans"); cmCreateShopAction5Tag("12345", "APPLICATION:Home Equity Loan", "1", "0", "consumer loans"); cmDisplayShops();
Comments
0 comments
Article is closed for comments.