React’s higher order component to stream events to Sitecore CDP

Posted on

Sitecore Customer Data Platform (CDP) tracks customers’ data across all the channels. This data can later be used by Sitecore Personalize to run personalization for a single or a segment of customers. If you are a React developer and planning to integrate your website to Sitecore’s CDP(f.k.a Boxever), this post will touch base on one of the cleanest ways of achieving this. Tracking a customer’s activities on your website for analytics and personalization is a cross-cutting concern in its nature. React documentation recommends using Higher-Order Component(HOC) or Hooks for cross-cutting concerns. If you are not familiar with the higher-order components, please have a look at official documentation. Sitecore CDP provides a few different modes of integration. The focus of this post is primarily integrating a React website to CDP using javascript library. If you are not across this integration option, please get yourself familiarized here. Since the detail of this integration option is not the focus of this post, I am […]