cancel
Showing results for 
Search instead for 
Did you mean: 

Clickstream and Marketing (expressway) integration

Former Member
0 Kudos

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...

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:

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.

Accepted Solutions (1)

Accepted Solutions (1)

former_member224482
Active Contributor
0 Kudos

1. Which piwik endpoint should be used for clickstream integration with expressway ? By documentation that should be ether general or site specific:
First, clickstream has no relationship to expressway and there is no integration between them.

For the properties, either will work. This is the functionality of de.hybris.platform.acceleratorservices.config.SiteConfigService. When using piwik.tracker.url and piwik.tracker.https.url the value will be used for all base store. When the base store uid is appended, then the property value is specific to the base store.
I would also suggest using relative path such as piwik.tracker.url=/yacceleratorstorefront/events.

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
It has always been assumed that the customer would choose either hybris profile or clickstream to capture the clicks. Such co deployment has not been test and is not supported as both scenario are mutually exclusive.

Former Member
0 Kudos

Hi Robin, thanks for the info. To test the clickstream functionality on more proper setup, (since my current was using both (profile, clickstream and yaas)) I installed the fresh b2c accelerator unsing installer recipe and additionally added ymkt extensions and addons (hybrisanalyticsaddon, eventtrackingws). Currently marketing integration works fine as before, but the clickstream doesn't work: I have following errors in log. Also below are extensions added to b2c recipe:

Former Member
0 Kudos
 eventtrackingservices
 eventtrackingpublisher
 eventtrackingmodel
 eventtrackingwsaddon
 privacyoverlayeraddon 
 hybrisanalyticsaddon 
 ext-addon/addonsupport
 
 sapymktsync
 platformbackoffice
 sapymktcommon
 sapprodrecoaddon
 sapprodreco
 sapprodrecobuffer
 sapprodrecowebservices
 recentvieweditemsaddon
 recentvieweditemsservices
 sapymktsegmentation
 sapymktclickstream
former_member224482
Active Contributor
0 Kudos
 csrf.allowed.url.patterns=/[^/]+(/[^?]*)+(sop/response)$,/[^/]+(/[^?]*)+(merchant_callback)$,/[^/]+(/[^?]*)+(hop/response)$,/[^/]+(/[^?]*)+(language)$,/[^/]+(/[^?]*)+(currency)$,/(events)$

 piwik.tracker.url.electronics=/yacceleratorstorefront/events
 piwik.tracker.https.url.electronics=/yacceleratorstorefront/events
 piwik.tracker.url.apparel-uk=/yacceleratorstorefront/events
 piwik.tracker.https.url.apparel-uk=/yacceleratorstorefront/events
 piwik.tracker.url.apparel-de=/yacceleratorstorefront/events
 piwik.tracker.https.url.apparel-de=/yacceleratorstorefront/events
former_member224482
Active Contributor
0 Kudos

Alternatively, you can try the b2c_acc_ymkt recipe delivered with release 6.5.

Former Member
0 Kudos

I added the lines you suggested and also initialized the system, but still I get the error like in the image above. In chrome network tab there are 2 'events' urls now (405, 400 statuses as in the first post)

former_member224482
Active Contributor
0 Kudos

I am under the impression that URLs are being mismatched in the configuration and browsing scenario.

port 9001 is reserved for http. port 9002 is reserved for https.

The properties written in the original question are mismatching localhost and electronics.local. Ensure that only 1 hostname is present in the property and that same hostname is used in the browser for testing.

Former Member
0 Kudos

Ok thanks Robin, I needed to remove the /yacceleratorstorefront part from the piwik url. it works now. Also regarding my second question and why all events were mapped to anonymous user: hybris checks and sends the "customerId" value in the: DefaultRawEventEnricher:64, user.getCustomerID();, which is by default empty, so to resolve it I've created small groovy script to populate it.

Answers (0)