hybris integration design v0_6_2.pdf

18
hybris / Adobe - Solution White Paper 1 | Page hybris : Integration Design Quick deployment of e-commerce analytics tagging Business Value Analytics is critical to the success of any e-commerce initiative. Customers of the hybris e-commerce platform need a way to quickly deploy an industry leading analytics solution without significant additional investment. This solution enables a basic “best practice” Adobe Analytics implementation to be deployed quickly and without a lengthy services engagement. How to Deploy The following assumes an intermediate level of implementation knowledge for both the hybris ecommerce platform and Adobe Analytics (including Adobe’s Dynamic Tag Management - DTM). Important note - Customizations to this baseline reporting solution may require professional services engagement from resources with deep insight on both hybris and Adobe Analytics technologies. 1- Pre-requisites: hybris a. A working e-commerce store on the hybris 5.0 platform 2- Pre-requisites: Adobe Analytics a. Create a new Adobe Analytics Report Suite. (https://microsite.omniture.com/t2/help/en_US/sc/implement/index.html#Step_1_- _Create_a_New_Report_Suite ) b. Set general Report Suite settings in the Admin Console. i. Set internal URL filters (in Admin Console and s_code – Dynamic Tag Manager) ii. Set paid search detection parameter iii. Set internal IP address blocks c. Activate Report Suite variables in the Admin Console (see Appendix A) d. Configure a new Dynamic Tag Management (DTM) property (https://microsite.omniture.com/t2/help/en_US/dtm/index.html#Dynamic_Tag_Management ) i. Activate Adobe Analytics tool within the property. 1. Click “Add Tool” 2. Select “Adobe Analytics” for the tool type 3. Enter “AA” for the tool name 4. Enter both the Production and Staging report suite IDs 5. Click Create Tool ii. Edit the newly added AA tool 1. Add the AppMeasurement library a. Click the edit icon (looks like a gear) b. Under “General” open the code editor using the Open Editor button

Upload: vuongbao

Post on 03-Jan-2017

242 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: hybris integration design v0_6_2.pdf

hybris / Adobe - Solution White Paper

1 | P a g e

hybris: Integration Design Quick deployment of e-commerce analytics tagging

Business Value

Analytics is critical to the success of any e-commerce initiative. Customers of the hybris e-commerce platform need a way to quickly deploy an industry leading analytics solution without significant additional investment. This solution enables a basic “best practice” Adobe Analytics implementation to be deployed quickly and without a lengthy services engagement.

How to Deploy The following assumes an intermediate level of implementation knowledge for both the hybris ecommerce platform and Adobe Analytics (including Adobe’s Dynamic Tag Management - DTM). Important note - Customizations to this baseline reporting solution may require professional services engagement from resources with deep insight on both hybris and Adobe Analytics technologies.

1- Pre-requisites: hybris a. A working e-commerce store on the hybris 5.0 platform

2- Pre-requisites: Adobe Analytics a. Create a new Adobe Analytics Report Suite.

(https://microsite.omniture.com/t2/help/en_US/sc/implement/index.html#Step_1_-_Create_a_New_Report_Suite )

b. Set general Report Suite settings in the Admin Console. i. Set internal URL filters (in Admin Console and s_code – Dynamic Tag Manager)

ii. Set paid search detection parameter iii. Set internal IP address blocks

c. Activate Report Suite variables in the Admin Console (see Appendix A) d. Configure a new Dynamic Tag Management (DTM) property

(https://microsite.omniture.com/t2/help/en_US/dtm/index.html#Dynamic_Tag_Management ) i. Activate Adobe Analytics tool within the property.

1. Click “Add Tool” 2. Select “Adobe Analytics” for the tool type 3. Enter “AA” for the tool name 4. Enter both the Production and Staging report suite IDs 5. Click Create Tool

ii. Edit the newly added AA tool 1. Add the AppMeasurement library

a. Click the edit icon (looks like a gear) b. Under “General” open the code editor using the Open Editor button

Page 2: hybris integration design v0_6_2.pdf

hybris / Adobe - Solution White Paper

2 | P a g e

c. Paste in the AppMeasurement for JavaScript code (retrieved from the Admin Tools > Code Manager)

d. Click Save and Close 2. Add the hybris specific integration code

a. Expand the Customize Page Code section b. Open the editor using the Open Editor button c. Paste the following code into the Editor and save it.

/* copy all hybris integration data into contextData array */ for(var k in window.s_amc_hb.contextData){ if(k=='hb_products'){ s.products=window.s_amc_hb.contextData[k] }else{

s.contextData[k]=window.s_amc_hb.contextData[k] } }

3. Under Cookies, set the appropriate values for Tracking Server and SSL Tracking Server (example, hybrispartner.d3.sc.omtrdc.net)

4. Save, Approve, and Publish these changes. iii. Retrieve the Embed URL from DTM. This will be needed as a property within the

local.properties file when configuring the hybris add-on. 1. Within your DTM property click on “Embed” 2. Under the Akamai option expand the section titled Header Code 3. Copy the Embed code for Production. 4. Using a text editor, paste what you have copied. Then extract the value from

the “src” property. This will be the value you need for the adobe.analytics.tagContainerURL property. It should look similar to this example: //assets.adobedtm.com/680343cb3672d5bfaa28395a27d25dd586ba6797/satelliteLib-23e430f867ecb694443b20e18900f2d66720abcd.js

3- Adobe Data Connector wizard. Complete the hybris integration wizard. (see Appendix J) a. During the Wizard, the Admin user will complete the following steps…

i. Initialization Step 1. Select the report suite 2. Provide a Name for this integration instance

ii. Step 1 – Integration Settings 1. Provide a contact email address 2. Provide a Description (optional)

iii. Step 2 – Variable Mappings 1. Provide mappings to custom variables (6 eVars, 3 events, 4 props) – see

Appendix A iv. Step 3 – Data Settings

1. Acknowledge (and optionally rename) the 7 calculated metrics that will be created. See Appendix B.

v. Step 4 – Report Settings 1. Choose to have one or more Dashboards created.

b. Following the Wizard submission i. 13 Processing Rules will be deployed

ii. 7 Calculated Metrics will be deployed iii. 3 Dashboards will be deployed

Page 3: hybris integration design v0_6_2.pdf

hybris / Adobe - Solution White Paper

3 | P a g e

4- hybris Add-on. Follow the instruction provided by your hybris representative to deploy the Add-on for

Adobe Analytics. This will require that you recompile your hybris code base.

How it looks Following successful integration, the following reporting will become available in Adobe Analytics.

1. KPIs a. Site Conversion Rate (Orders/Visits) b. Add to Cart Rate (Cart Additions/Product Views) c. Average Order Value (Revenue/Orders) d. Units per Transaction (Units/Orders) e. Cart Conversion Rate (Orders/Cart Additions[serialized]) f. Checkout Conversion Rate (Orders/Checkouts[serialized]) g. Revenue per Visit (Revenue/Visits) h. Days and Visits to Purchase

2. Site Traffic: Pages and Page pathing (don’t forget order participation) 3. Site Traffic: Categories and Category pathing 4. Site Traffic: Page Types and pathing 5. Product reports

a. Product views b. Product visits c. Cart Additions d. Checkouts e. Orders f. Units g. Revenue

6. Site Conversion Funnel a. Site Visits b. Cart Additions c. Checkouts (serialized) d. Orders

7. Products Conversion Funnel a. Product Views b. Cart Additions c. Checkouts (serialized) d. Orders

8. Payment Type 9. Merchandising / Finding method 10. Fulfillment method 11. Internal Searches 12. External Campaigns (see Appendix G) 13. Traffic Sources Reporting 14. Visitor Profile Reporting 15. Visitor Rention Reporting

Page 4: hybris integration design v0_6_2.pdf

hybris / Adobe - Solution White Paper

4 | P a g e

Appendix A – Adobe Analytics Variables The following are variables that must be activated and configured within the Report Suite Manager.

Name Type Settings Notes Internal Search Term eVar Expiration: Visit

Allocation: Original Merchandising: Yes

Set using Processing Rule #2 Conversion syntax; Binding events: Product Views, Product Views (custom), Cart Adds, Internal Searches, Null Searches

Purchase ID (custom) eVar Expiration: Purchase Allocation: Most Recent Merchandising: No

Set using Processing Rule #1 Used for verification

Payment Method eVar Expiration: Purchase Allocation: Most recent Merchandising: No

Set using Processing Rule #1

Fulfillment Method eVar Expiration: Purchase Allocation: Most recent Merchandising: No

Set using Processing Rule #1

Finding Method eVar Expiration: Visit Allocation: Original Merchandising: Yes

Set using Processing Rule #2 & #6 Conversion syntax; Binding events: Product Views, Product Views (custom), Cart Adds

Merchandising Category

eVar Expiration: Visit Allocation: Original Merchandising: Yes

Set using Processing Rule #6 Conversion syntax; Binding events: Product Views, Product Views (custom), Cart Adds

Category Prop Pathing: Yes Set using Processing Rule #6 Set correlation with Page

Page Type Prop Pathing: Yes Set using Processing Rule #11 Set correlation with Page

Internal Search Term Prop Pathing: Yes Set using Processing Rule #2 Set correlation with # of Search Results

# of Search Results Prop Pathing: No Set using Processing Rule #2 Null Searches Custom

event Event Type: counter Set using Processing Rule #2a

Internal Searches Custom event

Event Type: counter Set using Processing Rule #2

Product Views (custom)

Custom event

Event Type: counter Set using Processing Rule #4 Unlike the standard Product Views metric, this one can be used outside of the Products reports

Page Name Standard Element

Pathing: Yes Set using Processing Rule #3 & #4

Products Standard Element

PurchaseID Standard Element

Set using Processing Rule #1

Zip Standard Element

Set using Processing Rule #1

Purchase (Orders, Standard Set using Processing Rule #1

Page 5: hybris integration design v0_6_2.pdf

hybris / Adobe - Solution White Paper

5 | P a g e

Units, Revenue) Event Cart Opens Standard

Event Serialize: once per visit Set using Processing Rule #7

Cart Adds Standard Event

Set using Processing Rule #7

Cart Views Standard Event

Set using Processing Rule #12

Checkouts Standard Event

Serialize: once per visit Set using Processing Rule #8

Product Views Standard Event

Set using Processing Rule #4

Appendix B – Adobe Analytics Calculated Metrics The following are calculated metrics produced by completing the Genesis wizard.

Name Formula Notes Avg. Order Value Revenue / Orders Currency, 2 decimal places Units per Transaction Units / Orders Numeric, 1 decimal places Cart Conversion Rate Orders / Cart Additions Percent, 1 decimal places Add to Cart Rate Cart Adds / Product Views Percent, 1 decimal places Site Conversion Rate Orders / Visits Percent, 1 decimal places Checkout Conversion Rate Orders / Checkouts Percent, 1 decimal places Revenue per Visit Revenue / Visits Numeric, 1 decimal places

Page 6: hybris integration design v0_6_2.pdf

hybris / Adobe - Solution White Paper

6 | P a g e

Appendix C – Context Data Variables Context Data variables are name/value pairs that are sent to Adobe Analytics as a visitor interacts with the hybris e-commerce store. The data within Context variables must be captured into Adobe Analytics variables (props, eVars, events, etc.) using Processing Rules or else it will not show up within Adobe Analytics reporting.

Learn more about Context Data variables and Processing rules at the following locations.

https://microsite.omniture.com/t2/help/en_US/sc/implement/index.html#Context_Data_Variables

https://microsite.omniture.com/t2/help/en_US/reference/index.html#Processing_Rules

Name Value Example Value(s) Scope Notes hb_currentCurrency_iso Currency value

of the current page

USD Any page Used to set the s.currency

hb_currentLanguage_iso Language value of the current page

en Any page

hb_pageType An identifier for the type of the page

ProductSearch OrderConfirmation

Any page

hb_pageTitle The document.title for the page

StoreFinder | Electronics Site

Any page Can be optionally used to set s.pageName

hb_pagePath A structured hierarchal path for the page

electronics:en:store-finder

Any page Use for setting s.pageName

hb_cmspage_label A label given to CMS pages

Storefinder Account

Any page Can be optionally used to set s.pageName

hb_server The page domain

www.adobe.com Any page Used to set s.server

hb_categoryName The name of the product category

Film Cameras Flash Memory

Product Category pages

hb_product_code The product identifier (SKU)

479956 Product Detail pages

hb_product_name A friendly(ish) name for the product

DSLR-A100H Cyber-shot W80

Product Detail pages

hb_product_price The product unit prices

216.00 152.99

Product Detail pages

hb_product_categories Array of product categories

Digital Compacts Sony

Product Detail pages

hb_searchPageData_freeTextSearch The internal search term

slr camera Search Results page

hb_searchPageData_totalResults Total number of results found from search

123 0

Search Results page

Page 7: hybris integration design v0_6_2.pdf

hybris / Adobe - Solution White Paper

7 | P a g e

hb_cartData_totalPrice Summation of prices in cart

396.88 Cart page

hb_orderData_code The order number (unique to the order)

000006Y2 Order Confirmation page

hb_orderData_totalPrice 396.88 Order Confirmation page

hb_orderData_deliveryCost 9.99 Order Confirmation page

hb_orderData_totalTax 6.17 Order Confirmation page

hb_orderData_totalDiscounts 5.00 Order Confirmation page

hb_orderData_subTotal 812.99 Order Confirmation page

hb_cartData_total The total value of the cart

801.29 Add to Cart click

hb_clickAction A label for an action that was not a full page view change

cartAdd Add to Cart click (others)

hb_cartData_firstAdd True if this was the first product added to cart

true false

Add to Cart click

Page 8: hybris integration design v0_6_2.pdf

hybris / Adobe - Solution White Paper

8 | P a g e

Appendix D – Processing Rules These Processing Rules are automatically deployed by the hybris Data Connector wizard.

Learn more about Processing Rules here… https://microsite.omniture.com/t2/help/en_US/reference/index.html#Processing_Rules

# Rule Notes 1 Set Purchase related variables

Condition: if hb_pageType equals “orderconfirmation” Action:

1. Overwrite Purchase ID with hb_orderData_code 2. Overwrite Purchase ID (custom) with hb_orderData_code 3. Set the purchase event 4. Overwrite Zip with hb_deliveryAddress_postalCode 5. Overwrite Payment Method with hb_paymentInfo_cardType 6. Overwrite Fulfillment Method with hb_deliveryMode_code

2 Set Internal Search related variables Condition: if hb_pageType equals “productsearch” Action:

1. Overwrite Internal Search Term (eVar) with hb_searchPageData_freeTextSearch

2. Set Internal Searches event 3. Overwrite Finding Method with hb_pageType 4. Overwrite # of Search Results (prop) with hb_searchPageData_totalResults 5. Overwrite Internal Search Term (prop) with

hb_searchPageData_freeTextSearch

2a Set Null Search event Condition: if hb_searchPageData_totalResults is set AND hb_searchPageData_totalResults equals “0” Action:

1. Set Null Searches event

3 Set pageName Condition: if hb_breadcrumbs is set Action:

1. Overwrite pageName with hb_breadcrumbs

4 Set pageName for search pages AND orderconfirmation Condition: if hb_pageType equals “productsearch” OR hb_pageType equals “orderconfirmation” Action:

This is to remove the unique search terms and orderNumbers from the

Page 9: hybris integration design v0_6_2.pdf

hybris / Adobe - Solution White Paper

9 | P a g e

1. Overwrite pageName with PageType

pageNames

5 Set Product View Condition: if hb_pageType = “Product” Action:

1. Set Product Views event 2. Set Product Views (custom) event

6 Set Product Category related variables Condition: if hb_pageType equals “category” Action:

1. Overwrite Product Category prop with hb_categoryName 2. Overwrite Merchandising Category with hb_pageType : hb_categoryName 3. Overwrite Finding Method with hb_pageType

7 Set Cart Open and Cart Add events Condition: if hb_clickAction equals “cartAdd” Action:

1. Set Carts event 2. Set Cart Additions event

8 Set Checkout event

Condition: hb_pageType equals “checkout” Action:

1. Set Checkouts event

10 Set Currency Code Condition: if hb_currentCurrency_iso is set Action:

1. Overwrite CurrencyCode with hb_currentCurrency_iso

11 Set PageType Condition: if hb_pageType is set Action:

1. Overwrite Page Type with hb_pageType

12 Set Cart View event Condition: if hb_pageType = “cart” Action:

Page 10: hybris integration design v0_6_2.pdf

hybris / Adobe - Solution White Paper

10 | P a g e

1. Set Cart Views event

13 Set Server Condition: if hb_server is set Action:

1. Overwrite Server with hb_server

Appendix E – Product Classifications By default, only product codes will appear within the Products reports within Adobe Analytics. Product reports can be greatly enhanced by importing SAINT Classifications for each product in the catalog. This would include product meta-data such as “Product Name“, “Category”, “Manufacturer”, etc.

Automated importing of this product meta-data is not part of this integration solution and must be set up as a separate custom project.

Go to: http://localhost:9001/hmc/ (then System > Tools > Export) OR http://localhost:9001/console/impex/export

Example Export Script:

$lang=en $catalogVersion=catalogVersion(catalog([id='apparelProductCatalog']),version[default='Staged'])[unique=true,default='apparelProductCatalog:Staged'] $catalog=apparelProductCatalog $version=Staged INSERT_UPDATE Product;code[unique=true];name[lang=en]; unit(code);$catalogVersion; supercategories(code) "#% impex.exportItems(""SELECT {P:pk} FROM {Product as P}, {CatalogVersion as CV}, {Catalog as C} WHERE {P:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND {C:id}='$catalog' AND {CV:version}='$version'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1 );"

To change to a TAB delimiter, use the Advanced Settings tab (see screenshot below)

Page 11: hybris integration design v0_6_2.pdf

hybris / Adobe - Solution White Paper

11 | P a g e

To learn more you can visit the link below, or speak with your hybris representative.

https://wiki.hybris.com/display/release4/How+To+Export+the+Content+of+a+Catalog+Version+-+Tutorial

Appendix F – Dashboard This integration will automatically produce Dashboards highlighting several key reports for an e-commerce business. See examples below.

Page 12: hybris integration design v0_6_2.pdf

hybris / Adobe - Solution White Paper

12 | P a g e

Page 13: hybris integration design v0_6_2.pdf

hybris / Adobe - Solution White Paper

13 | P a g e

Appendix G – Tracking External Campaigns You will likely want to track the performance of marketing campaigns that drive traffic to your e-commerce site. To do this you will need to deploy a custom Processing Rule to capture campaign tracking codes in the SiteCatalyst campaign variable. These tracking codes will typically be captured from the query string of the landing page as visitors click through and land on your e-commerce site.

The following shows an example of such a rule where “cid” is the query string parameter for the tracking code.

Page 14: hybris integration design v0_6_2.pdf

hybris / Adobe - Solution White Paper

14 | P a g e

Appendix I – Alternate “Page Name” Approaches By default, the page names captured in Adobe Analytics will be based off of the hb_breadcrumbs data for each page. However this may not be the best approach for your customized hybris deployment. The following are some alternatives. Also see Page Naming Strategies.

a. Use hb_pageTitle to set pageName i. Page names will change drastically when language changes

ii. Page names can be lengthy, particularly when long and elaborate SEO friendly titles are implemented

iii. For search pages the search term may be part of hb_pageTitle, this will generate unique page names for each search term used

b. Use hb_pagePath to set pageName i. Page names can change when language changes

ii. URL paths might be customized for SEO purposes, this could lead to poor page names iii. The orderCode may be represented in the hb_pagePath which will generate a unique

page name for each order

Appendix J – Data Connector Wizard The following is a visual tour of the Data Connector wizard for hybris integration. Note: Only Admin level users can configure Data Connector integrations.

Page 15: hybris integration design v0_6_2.pdf

hybris / Adobe - Solution White Paper

15 | P a g e

Initial Step –

The user locates the hybris logo and drags it over to the Adobe Marketing Cloud representation.

A report suite must be selected and a name must be given for this integration instance.

Step 1 – Integration Settings

The user provides a contact email address as well as an optional Description.

Page 16: hybris integration design v0_6_2.pdf

hybris / Adobe - Solution White Paper

16 | P a g e

Step 2 – Variable Mappings

The user must provide a mapping for each eVar, Event and Prop shown. The needed variables must be activated prior to completing this step or they will not be visible in the drop down menus.

Step 3 – Data Settings

No input needed. The user can optionally rename the Calculated Metrics, but this is not recommended.

Page 17: hybris integration design v0_6_2.pdf

hybris / Adobe - Solution White Paper

17 | P a g e

Step 4 – Report Settings

The user can choose to have a Dashboard automatically created for them. This is recommended as it will fast track the user on consuming the reporting.

Step 5 – Review Summary

No input needed. This step is simply to review the input given on the previous steps.

Page 18: hybris integration design v0_6_2.pdf

hybris / Adobe - Solution White Paper

18 | P a g e

Post Wizard Submission

After the integration has been activated. The user is delivered to the integration Dashboard, which likely won’t contain any data (yet).