The Shop Action 9 tag captures data about what products a customer purchases. Like the Shop Action 5 tag, one tag should be sent for each product line item purchased. In addition, these tags should be sent on the receipt or other completion page confirming a successful order.
- Shop Action 9 tag de-duplication
- Received Shop Action 9 tags are rejected from reporting if all tag parameters are identical to a prior Shop Action 9 tag received within 800 days. If any Shop Action 9 tag parameter value changes, the new Shop Action 9 tag will be accepted and reported again as new product purchase activity. This is true even when the new Shop Action 9 tag Order ID parameter value did not change and exists in a prior record within the 800-day Order ID deduplication window.
- Key Reports Populated
- Dashboards (Commerce Overview); Site Metrics; Products; Paths; Demographics (Profile Segments); Report Segments
- Digital Data Object Example
- digitalData = { page:{pageInfo:{pageID:'ORDERCONFIRMATION',onsiteSearchTerm:'', onsiteSearchResults:''},category:{primaryCategory:'CHECKOUT'}, attributes:{exploreAttributes:'',extraFields:''}}, user:[{profile:[{profileInfo:{profileID:'REGISTRATION-ID', profileEmail:'EMAIL@EMAIL.COM',exploreAttributes:''}, address:{city:'CITY',state_province:'STATE_PROVINCE', postalcode:'POSTALCODE',country:'COUNTRY'}}]}], transaction:{transactionID:'123',total:{basePrice:'19.98',shipping:''}, profile:{profileInfo:{profileID:'REGISTRATION-ID'}, address:{city:'CITY',state_province:'STATE_PROVINCE', postalcode:'POSTALCODE'}},attributes:{exploreAttributes:'',extraFields:''},
- item:new Array()}};
- digitalData.transaction.item[0]={productInfo:{productID:'productid123', productName:'productName123'},quantity:'1',price:'9.99', category:{primaryCategory:''},attributes:{exploreAttributes:'',extraFields:''}};
- digitalData.transaction.item[1]={productInfo:{productID:'productid456', productName:'productName456'},quantity:'1',price:'9.99', category:{primaryCategory:''},attributes:{exploreAttributes:'',extraFields:''}};
Tagging function
To use Shop Action 9 tags, a call is made to cmCreateShopAction9Tag(…) for each product purchased. In addition, a single call to cmDisplayShops() must be made after all calls to cmCreateShop9Tags(…) to send the data collection image request(s).
Note: The following values are automatically removed from digital 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 before data loading and reporting
- Backslash (\): this is a standard JavaScript escape character. To collect and report a "\" character, two "\" must be specified in sequence ("\\"). Then, the 2nd "\" is reported.
Tags
- Product ID (Required): Product ID. Length: 256.
- Product Name (Required): Name of the product. Length: 256.
-
Quantity (Required): Quantity of this product purchased.
For Travel, this is typically the # of tickets purchased for a given trip or event, the # of items rented for a given rental product, or the # or room-nights booked for this hotel.
For Financial Services applications, this is typically a "1" if only 1 quantity applies to a 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 upon completion. Length: 16.2.
- Registration ID (Required): Registration ID for the customer who purchased the product. This should match the Registration ID field in the accompanying Order Tag. Length: 256.
- Order ID (Required): Order ID for the order to which this line belongs. This should match the Order ID in the accompanying Order Tag. Length: 64.
-
Order Subtotal (Required): Subtotal for the order to which the line item belongs. This should not include Shipping and Handling or Tax and should match the Order Subtotal in the accompanying Order Tag. This value should be a decimal number and should not include a dollar sign ($).
The Order Subtotal should match the sum of Quantity * Unit Price for all ShopAction9 tags (products) purchased in this order. 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 before the tag function calls. Length: 100 per value.
Examples
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 ({"cmAutoCopyAttributesToExtraFields":true}); on the page before the tag function calls.
<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("Order Thank You", "CART"); // A separate call to cmCreateShopAction9Tag should be made for each cart entry cmCreateShopAction9Tag("12345", "Product X", "2","5000.42", "cust123", "order123", "10011.79", "CATXYZ"); cmCreateShopAction9Tag("67890", "Product Y", "1", "10.95", "cust123", "order123", "10011.79", "CATABC"); cmDisplayShops(); cmCreateOrderTag("order123", "10011.79", "5.95", "cust123", "Austin", "TX", "78727"); cmCreateRegistrationTag("cust123", "registrant@mail.com", "Austin", "TX", "78727", "US"); </script> </body>
Travel: 2 hotels simultaneously booked (1 and 2 rooms respectively)
cmCreatePageviewTag("Booking: Thank You", "Booking"); cmCreateShopAction9Tag("12345", "Property ABC", "1", "49.99", "cust123", "booking123", "180.97", "US:TX:Austin"); cmCreateShopAction9Tag("67890", "Property XYZ", "2", "65.49", "cust123", "booking123", "180.97", "US:TX:Austin"); cmDisplayShops();
Financial Services: application completed
cmCreatePageviewTag("APPLICATION STEP 5(COMPLETION):Home Equity Loan", "consumer loans"); cmCreateShopAction9Tag("12345", "APPLICATION:Home Equity Loan", "1", "0", "cust123", "application123", "0", "consumer loans"); cmDisplayShops();
Comments
0 comments
Article is closed for comments.