The React Sitecore Personalize npm module is a wrapper for Sitecore CDP/Personalize Direct Client Script allowing you to easily add the script to react-based apps. The goal of this project is to make it even easier for those developers who might be new to React or Next.js and are learning how to integrate Sitecore Personalize by providing a simple wrapper for the direct client script. Allowing you to easily add the script to your projects and send events to Sitecore Personalize to track user behavior with just a few lines of code. The project is available on GitHub so please use it to help you get up-to-speed quickly, and contribute to the project if you have any suggestions for improvement.
The Sitecore CDP Blueprints library created by the Sitecore team contains useful configurations and snippets. You can either use as a reference to help understand key concepts or adapt and use in your own implementations. Which can help you get up and running quicker with Sitecore CDP.
Web Experience Snippets
OnExit – Triggers the experience when user moves their mouse out of the browser window.
OnHover – Triggers the experience when user moves their mouse over the specified HTML element.
OnScroll – Triggers the experience when the user has scrolled a certain percentage of the page.
SpaTargeting – This function can be used in Advanced Page Targeting to allow an experience to trigger on every virtual page load, rather than only on full page loads. It can be used along with other page targeting functions to trigger experiences after a delay or on hover over an element etc.
Decision Model Snippets
Most Viewed Page Decision Model – This decision model will get the most viewed page from your customer’s sessions and return relevant content for you to display.
getNumberOfEvents – This function will return the number of events of the specified type in the provided session.
getTriggerEvent – This function will return the order that triggered the execution of the experience. This is for use in triggered experiences where the trigger is Custom Trigger.
getTriggerOrder – This function will return the order that triggered the execution of the experience. This is for use in triggered experiences where the trigger is Order Created or Order Updated.
getTriggerSession – This function will return the session that triggered the execution of the experience. This is for use in triggered experiences where the trigger is Session Closed or Abandoned Cart.
Audience Filter Snippets
Lead generation is such an important marketing practice for every business or brand and it comes in many different forms. Take the simple subscribe to receive discount offers email, almost every e-commerce site I’ve landed on recently has displayed one of these pop-ups. Sitecore Personalize makes it possible for your marketing team to easily add these lead generation experiences. While Sitecore Send (Moosend) allows marketing to stimulate and nurture visitor engagement through targeted and relevant communications. With the ultimate goal of converting visitors into lifelong consumers.
In a previous post, I showed how to easily integrate Sitecore CDP/Personalize with your existing site using GTM. In this post, I’ll show you how to capture the visitor’s name and email address using a Sitecore Personalize web experience, once a guest submits their information we’ll add them to a mailing list configured in Sitecore Send (Moosend).
To achieve this we will complete the following:
Create a offers mailing list in Sitecore Send (Moosend) for customers so they can subscribe to receive offer emails.
Take a look at the Sitecore Send REST API we will use to add a user to the mailing list.
Create Data Connection in Sitecore Personalize for the API method.
Create a Web Experience prompting user to enter name and email to subscriber to the email campaign that only displays when user has not previously subscribed.
Create a Triggered Experience that will send user data to Sitecore Send using a data Connection to subscribe the user to the mailing list when the user submits the subscription pop up.
Start the Experiences and Test.
At first glance, this might seem like a lot of steps to go through but it’s relatively straightforward to accomplish with Sitecore Personalize and Sitecore Send. Once you understand the various components involved, which I’ll guide you through, your marketing team will be able to re-use for similar scenarios.
When working with various REST APIs it’s nice to be able to manage your sample and test requests in a single location. In a previous post, I introduced the Sitecore CDP REST APIs and shared my Postman collection. In this post, I will show you how to create a collection for Sitecore Send (Moosend). The good news Moosend provides an API Blueprint specification available here. However, you are not able to import this document directly into Postman. In this post, I will show you how you can convert this Blueprint spec so it can be imported into postman and automatically generate a collection of requests for testing and development with Moosend.