Skip to Content
1
Former Member
Nov 22, 2017 at 12:41 PM

Clickstream and Marketing (expressway) integration

727 Views

Hi, I am trying to integrate clickstream data with marketing cloud by using expressway (now in Hybris 6.5 sapymktsync extension) and after going through documentation resources:

https://help.hybris.com/6.5.0/hcd/8be7c5c48669101485bce9e74bda1fd5.html https://help.hybris.com/6.5.0/hcd/8ade014186691014b8e7b8cf1d2d9998.html https://help.hybris.com/6.5.0/hcd/8bbbeafe866910149937b380b38372a7.html https://blogs.sap.com/2017/10/20/downporting-sap-hybris-marketing-integration-to-earlier-versions-of-sap-hybris-commerce/

I did setup as suggested, installed extensions, addons etc. and managed to send data to cloud but not in a way as docs suggested, therefore I would like to clearup few things if hopefully someone can provide answers :):

1. Which piwik endpoint should be used for clickstream integration with expressway ? By documentation that should be ether general or site specific:

  • piwik.tracker.url=https\://localhost\:9002/yacceleratorstorefront/events

  • piwik.tracker.https.url.electronics=https\://electronics.local\:9002/yacceleratorstorefront/events

but in my case nether of these work and I get: [PageNotFound] Request method 'POST' not supported in log., in chrome network tab there are 2 "event" calls:

alt text

alt text

What works in my case is using the following piwik url endpoint:

which was used previously for yaas and hybris profile data integration.

2. With clickstream data working I have other issue on sent events and users data mapping, as I found through debbuging ClickStreamListener, userId is not set in hybrisanalyticsaddon and each event gets registered to anonymous user even when Im logged in with some standard customer

 protected AbstractTrackingEvent enrich(final AbstractTrackingEvent event)
     {
         event.setYmktContactId(event.getPiwikId());        
         event.setYmktContactIdOrigin(this.userContextService.getAnonymousUserOrigin());
         final String customerId = event.getUserId();
         if (customerId != null && !customerId.isEmpty())
         {
             try
             {
                 final CustomerModel customer = new CustomerModel();
                 customer.setCustomerID(customerId);
                 final List<CustomerModel> customers = this.flexibleSearchService.getModelsByExample(customer);

In the sample above customerId is always null and if condition is never fullfiled, when I set it manually there then it works.

Attachments

9939-img-2.png (7.3 kB)
9940-img-1.png (32.4 kB)