Class ClickStreamService
java.lang.Object
com.hybris.ymkt.clickstream.services.ClickStreamService
Send
AbstractTrackingEvent to CUAN_IMPORT_SRV-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected booleanprotected ODataServiceprotected ProductURLServiceprotected static final Stringprotected static final Shortprotected static final Shortprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]compressGZIP(byte[] payload) protected StringextractInitiativeId(String url1, String url2) protected StringextractSAPTrackingId(String url1, String url2) protected StringextractURLParameter(String parameterName, String url) protected intbooleanlinkAnonymousAndLoggedInUsers(String anonymousUserId, String anonymousUserOrigin, String loggedInUserId, String loggedInUserOrigin) Links the anonymous and logged-in users by making the anonymous user a facet of the logged-in user.
In SAP Marketing, the anonymous & logged-in events are linked to a single contact golden record.protected voidpopulateInteraction(Map<String, Object> interaction, AbstractTrackingEvent event) booleansendEvents(List<? extends AbstractTrackingEvent> events) Transform and send theAbstractTrackingEvents to yMKT.voidsetInteractionTypeMapping(Map<String, String> interactionTypeMapping) Build a map to link commerce event to yMKT event type.
SPRO - SAP Customizing Implementation Guide - SAP Marketing - Contacts and Profiles - Interactions - Define Interaction Types :
PROD_REVIEW_VIEW - Product Review Read SHOP_CART_ABANDONED - Shopping Cart Abandoned SHOP_CART_VIEW - View Shopping CartSHOP_CHECKOUT_ABNDND - Checkout Abandoned.voidsetLinkAnonymousAndLoggedInUsers(boolean linkAnonymousAndLoggedInUsers) voidsetODataService(ODataService oDataService) voidsetProductURLService(ProductURLService productURLService)
-
Field Details
-
IMPORT_HEADERS
- See Also:
-
SAP_MERCH_SHOP
- See Also:
-
SHORT_ONE
-
SHORT_ZERO
-
SOURCE_OBJECT_ID
- See Also:
-
SOURCE_OBJECT_TYPE
- See Also:
-
SOURCE_SYSTEM_ID
- See Also:
-
SOURCE_SYSTEM_TYPE
- See Also:
-
STRING_IS_EMPTY
-
STRING_IS_EMPTY_NOT
-
URL_PK_CAMPAIGN
- See Also:
-
URL_SAP_OUTBOUND_ID
- See Also:
-
linkAnonymousAndLoggedInUsers
protected boolean linkAnonymousAndLoggedInUsers -
interactionTypes
-
oDataService
-
productURLService
-
-
Constructor Details
-
ClickStreamService
public ClickStreamService()
-
-
Method Details
-
compressGZIP
- Throws:
IOException
-
createImportHeader
-
createInteraction
-
createInteractionProduct
-
extractInitiativeId
-
extractSAPTrackingId
-
extractURLParameter
-
getReadTimeout
protected int getReadTimeout() -
populateInteraction
-
sendEvents
Transform and send theAbstractTrackingEvents to yMKT.- Parameters:
events-ListofAbstractTrackingEventto send to yMKT.- Returns:
- true if the transfer was successful. false otherwise.
-
linkAnonymousAndLoggedInUsers
public boolean linkAnonymousAndLoggedInUsers(String anonymousUserId, String anonymousUserOrigin, String loggedInUserId, String loggedInUserOrigin) Links the anonymous and logged-in users by making the anonymous user a facet of the logged-in user.
In SAP Marketing, the anonymous & logged-in events are linked to a single contact golden record.- Parameters:
anonymousUserId- User ID before login or register.anonymousUserOrigin- yMKT Origin ID.loggedInUserId- User ID after login or register.loggedInUserOrigin- yMKT Origin ID.- Returns:
trueif the transfer was successful.falseotherwise.
-
setInteractionTypeMapping
Build a map to link commerce event to yMKT event type.
SPRO - SAP Customizing Implementation Guide - SAP Marketing - Contacts and Profiles - Interactions - Define Interaction Types :
- PROD_REVIEW_VIEW - Product Review Read
- SHOP_CART_ABANDONED - Shopping Cart Abandoned
- SHOP_CART_VIEW - View Shopping Cart
SHOP_CHECKOUT_ABNDND - Checkout Abandoned. No matching commerce event.- SHOP_CHECKOUT_START - Proceeded to Checkout
- SHOP_CHECKOUT_SUCCES - Checkout Successful
- SHOP_ITEM_ADD - Product Added to Shopping Cart
- SHOP_ITEM_REMOVE - Product Removed from Shopping Cart
- SHOP_ITEM_VIEW - Product Viewed
- Parameters:
interactionTypeMapping- Mapping from ECP event type to yMKT interaction type.
-
setODataService
-
setProductURLService
-
setLinkAnonymousAndLoggedInUsers
public void setLinkAnonymousAndLoggedInUsers(boolean linkAnonymousAndLoggedInUsers)
-