© 2011 IBM Corporation IBM Coremetrics Integration with IBM WebSphere Commerce v7 Priyajith Chembakassery ([email protected]) – WebSphere Commerce Development
Nov 08, 2014
© 2011 IBM Corporation
IBM Coremetrics Integration with IBM WebSphere Commerce v7
Priyajith Chembakassery ([email protected]) – WebSphere Commerce Development
© 2011 IBM Corporation2
Agenda
� Coremetrics Web analytics integration with IBM WC v7
– IBM Custom tag library for Coremetrics integration
– Auto tag utility
– CDF Generator utility
– Closed loop customer segmentation
– Web2.0 Store tagging framework for Coremetrics
– Intelligent Offer integration
� Coremetrics integration with IBM Sales center
IBM Coremetrics Integration with IBM WebSphere Commerce v7
© 2011 IBM Corporation3
Coremetrics Web analytics solution
� How Coremetrics Work
– IBM Coremetrics uses Web Beacons – also known as single pixel– Generates a HTTP request for an invisible image
• http://data.coremetrics.com/eluminate?query_string
– Data packed query string stored for analysis– Provides a JavaScript library which defines a set of functions which is used to “tag” the web
pages
� What data is captured– Page views/Search results– Product views– Shopping cart views– Order/Promotions/B2B Contracts – Member create/update
– Marketing campaigns/experiments views/clicks (Web/Email activity)– Conversions
IBM Coremetrics Integration with IBM WebSphere Commerce v7
© 2011 IBM Corporation4
Data flow
IBM Coremetrics Integration with IBM WebSphere Commerce v7
© 2011 IBM Corporation5
Coremetrics web analytics configuration
� biConfig.xml<store biprovider="coremetrics" debug="true" enable d=" true " storeId=" 10101 ">
<clientid> 12345 </clientid>
<instrumentation ><![CDATA[
<script language="JavaScript1.1" type="text/JavaScr ipt" src="/wcsstore/coremetrics/v40/eluminate.js">< /script>
<script language="JavaScript1.1" type="text/JavaScr ipt" src="/wcsstore/coremetrics/cmdatatagutils.js"> </script>
<script language="JavaScript1.1" type="text/JavaScr ipt">
cmSetProduction();
</script>]]>
</instrumentation>
</store>
� Flex flow feature
IBM Coremetrics Integration with IBM WebSphere Commerce v7
© 2011 IBM Corporation6
IBM Custom tag library for Coremetrics
� JSTL based custom tag library provided with WC
– Simplifies tagging process– Wrapper that generates Coremetrics JavaScript tags
– Minimizes the amount of code that needs to be implemented on the JSP’s
– Does all the hard work in getting the necessary data for analysis– WC v7 starter stores comes pre-tagged with Coremetrics tags
<%@ taglib uri=“http://commerce.ibm.com/coremetrics ” prefix=“cm” %>
<cm:pageview />
<cm:product />
<cm:cart />
<cm:order />
<cm:registration />
<cm:campurl /><cm:element /><cm:conversion />
IBM Coremetrics Integration with IBM WebSphere Commerce v7
© 2011 IBM Corporation7
IBM Custom tag library for Coremetrics…
IBM Coremetrics Integration with IBM WebSphere Commerce v7
cmCreateConversionEventTag(…)<cm: conversion />Non eCommerce conversion pages (e.g. Add to Wishlist)
cmCreateElementTag(…)<cm:element />Pages that contain elements that get refreshed without refreshing the whole page
Update the URL to include tracking parameter: cm_cr<cm:campurl />eMarketingSpot display page
cmCreateRegistrationTag(…)<cm:registration />My account display page
cmCreateShopAction9Tag(…) for every item in the cartcmCreateOrderTag(…)
<cm:order />Order confirmation page
cmCreateShopAction5Tag(…) for every item in the cart<cm:cart />Shooping cart page
cmCreateProductviewTag(…)<cm:product />Product/Item/Bundle/Package view page
cmCreatePageviewTag(…)<cm:pageview />All pages, search results page, error page
IBM JSTL tags to the Coremetrics tagging function mappings
© 2011 IBM Corporation8
Coremetrics standard tag libraries
� With WC v7 FEP3, IBM JSTL tag library supports both Coremetrics custom tag library and
Coremetrics standard tag library.
� To use Coremetrics standard tag library, set the attribute useHostedCMHLibraries to"true"
<store storeId="10101" biprovider="coremetrics" ena bled="true" debug="true“
useHostedCMHLibraries="true" useEmailForCustomerId="false"
segmentExportMode="append" ><clientid>69999999</cli entid>
<output section="header">
<![CDATA[<script type="text/javascript" src=" //libs.coremetrics.com/eluminate.js "></script> <script type="text/javascript">
…………………
</script> ]]>
</output>
</store>
IBM Coremetrics Integration with IBM WebSphere Commerce v7
© 2011 IBM Corporation9
Auto tag utility
� Places the Coremetrics “page view” tag on all of your site pages
� Reduces the implementation time to tag the store pages
� Only page view tags are applied and advanced tags must be implemented manually
� <WC>/bin/AutoTag -dir /store_jsp_path/
IBM Coremetrics Integration with IBM WebSphere Commerce v7
CDF Generator utility
� Category Definition File (CDF)– Comma separated value text file listing product and content categories names, id’s and
parent id’s if applicable
– Used by Coremetrics to build a proper tree structure of the WC product catalog hierarchy
� CDF Generator is a command line utility to generate the CDF
� <WC>/bin/cm_cdfgen.bat –dbtype DB2 –dbname mall –dbuser wcsuser –dbpw passw0rd –clientid 12345 –langid -1 –catalogid 10001 –output catalogCDF.csv
© 2011 IBM Corporation10
Closed loop customer segmentation
� Coremetrics provides customer segmentation workbench by which the business user can
define a customer segment
� Defined segments can be exported to WebSphere Commerce and can be modified in the WebSphere Commerce segmentation tool
IBM Coremetrics Integration with IBM WebSphere Commerce v7
Export to WC icon
© 2011 IBM Corporation11
Closed loop customer segmentation …
� A new segment is created if the imported segment does not exist in WC
� If the segment exist in WC, the imported segment details are updated based on the export
mode provided in biConfig.xml
� <store storeId="10101" biprovider="coremetrics" enabled="true"
segmentExportMode="append" >
� Export Modes
– append
• The members in the imported segment is appended to the existing segment– replace
• The previous segment is replaced with the imported segment
IBM Coremetrics Integration with IBM WebSphere Commerce v7
© 2011 IBM Corporation12
Web2.0 store tagging framework for Coremetrics
� Cannot rely completely on JSTL based tags in a Web2.0 store– Web2.0 stores does not always have full page refreshes
� For a Web2.0 store, use JSTL tags + a tagging framework that is aware of asynchronous requests
� Store tagging framework for Coremetrics
– Uses Dojo event publish/subscribe model
– Store events converted to Analytics events– An Event listener waits for the Analytics events and fires Coremetrics javascript tags
• analyticsJS is a JavaScript object that listens for Web2.0 store events and publishes corresponding analytics events
• AjaxAddOrderItem event is triggered when customer adds an item to shopping cart• The handler in analyticsJS object that handles the AjaxAddOrderItem event publishes another
event /wc/analytics/cartview which represents a analytics shopping cart view event
• CoremetricsEventListener receives a notification for this event and invoke the appropriate handler.
• The handler triggers cmCreateShopAction5Tag()
IBM Coremetrics Integration with IBM WebSphere Commerce v7
© 2011 IBM Corporation13
Web2.0 store tagging framework for Coremetrics …
IBM Coremetrics Integration with IBM WebSphere Commerce v7
publish other store events
publish Interest Item Change events
publish User Registration Change events
publish Order Item Change events
Store Page
Analytics Event Publisher Coremetrics Event Listener
Order Item Change Controller
Other web2.0 widget controllers
User Registration Change Controller
Interest Item Change Controller
publish analytics event
Triggers Coremetrics tags
© 2011 IBM Corporation14
Coremetrics Intelligent Offer integration
� Identifies optimal product recommendations to present within various site contexts
� Two methods of returning recommendations
– Dynamic Recommendations – real time call from storefront to Coremetrics to provide personalized recommendations
• e-Marketing Spot snippet integration
– Flat File Recommendations – Coremetrics provides a fixed list of recommendations that can be imported and used to deliver static recommendations
• Merchandising association integration
� New ‘action’ added in the Activity builder to display Intelligent Offer integration
� ImportIntelligentOfferAssociations scheduled job imports the flat file provided by
Coremetrics
� New flex flow feature ‘Enable Coremetrics Intelligent Offer integration’
IBM Coremetrics Integration with IBM WebSphere Commerce v7
© 2011 IBM Corporation15
Recommendation flow
IBM Coremetrics Integration with IBM WebSphere Commerce v7
© 2011 IBM Corporation16
Web activities using Intelligent offer recommendation
IBM Coremetrics Integration with IBM WebSphere Commerce v7
© 2011 IBM Corporation17
Flat file import status
� The status of each Intelligent offer flat file import is saved and displayed under catalog tools in CMC
IBM Coremetrics Integration with IBM WebSphere Commerce v7
© 2011 IBM Corporation18
Coremetrics integration with IBM Sales center
� JavaScript tagging technique wont work since Sales Center is a stand alone application
� Uses a solution based on the existing WebSphere Commerce business event infrastructure and web services
� The business events will be sent as a cumulative SOAP attachment through Web services using HTTPS to Coremetrics
� Configured in the instance xml under the component “Analytics Event Configuration”
� Enable the business events whose data need to be transmitted to Coremetrics.
� Following events are enabled by default:
– MemberCreateUpdate
– OrderCreation
– OrderItemCreation
– OrderItemUpdate
– OrderItemShipment
– OrderCancellation
– OrderSubmission
IBM Coremetrics Integration with IBM WebSphere Commerce v7
© 2011 IBM Corporation19
Architecture of Coremetrics integration with IBM Sales center
IBM Coremetrics Integration with IBM WebSphere Commerce v7
BUSEVENT
MemberOrder
Gift Reg
Event Processor Command
Event Mapper
Generic Event Transmitter
FTP TransmitterWeb Service Transmitter
Event File Generator
Scheduler
Instance
XML
Calls
Is input to
Analytics
Component
Config
Event
Mapping
Def’n XMLs
© 2011 IBM Corporation20
Q & A
IBM Coremetrics Integration with IBM WebSphere Commerce v7