cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger Emarsys Webextend go command once in SAP Spartacus

sumitkhaldar
Discoverer
0 Kudos

Hi Experts,

We are trying to implement Emarsys Webextend with SAP Spartacus. We have followed the Tag Management System documentation for SAP Composable Storefront and have created our own Collector Service, where we have defined the events and corresponding command push.

https://help.sap.com/docs/SAP_COMMERCE_COMPOSABLE_STOREFRONT/eaef8c61b6d9477daf75bff9ac1b7eb4/29d58d...

However, as per the Emarsys documentation, we need to push 'go' command only once at the end of all the event calls.

https://dev.emarsys.com/docs/web-extend-reference/399799915c540-go-web-extend-command#:~:text=go%20s....

When we checked, the collector service gets called for individual events, and in a page where there is more than one event, the go command is getting pushed multiple times, based on the number of event calls. As a result, we can see errors on the Emarsys live event console, and in the browser console as well.

We would like to know if there is a way to achieve this, considering SAP Composable Storefront is a SPA.

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

WillYoung
Advisor
Advisor
0 Kudos

Hi sumitkhaldar, I checked with our developers and this is what they said:

"We assume that the Web Extend client script senses that it is a single page application (there was no page reload) and no more time spent between go commands than 500ms. That can trigger the 'multiple go command' error.

It can be tested with setting test mode in the client ScarabQueue.push(['testMode']);

In test mode the client will not test multiple go command. Be aware, this only for test proposes."

I hope that casts some light on this topic, otherwise I'm afraid you will have to open a support ticket to look into this in more detail.