Integrating Sitecore OrderCloud Tracking Events with Sitecore Discover

In this blog post, we will cover the details of what tracking events are and how they can be configured in Sitecore OrderCloud. We will also explain how to integrate tracking events into Sitecore Discover.

What are tracking events in eCommerce?

Tracking events refer to the actions or interactions that users take in an eCommerce website or app that are recorded and monitored for analysis. These events provide valuable insights into user behavior, preferences, and engagement levels, which can help eCommerce businesses optimize their website, marketing strategies, and overall user experience.

Common tracking events in eCommerce include:

  • Pageviews
  • Add To Cart
  • Checkout initiated
  • Checkout Abandoned
  • Purchase Completed
  • Product Views
  • Search Queries
  • User Registration/Login/Sign-up
  • Product Reviews/Submissions
  • Email Subscriptions

By analyzing these tracking events, eCommerce businesses can gain insights into user behavior patterns, identify areas for improvement, and tailor their marketing efforts to better meet the needs and preferences of their target audience.

The following are the tracking events available for us in Sitecore OrderCloud

  • UserLoggedIn: Track an event when a user is logged in to your storefront.
  • LineItemAdded: Track an event when a user adds a product to their shopping cart.
  • LineItemUpdated: Track an event when a user updates an item in their shopping cart.
  • OrderSubmitted: Track an event when a user submits an order.

Setting up tracking events in OrderCloud

Before we can set up tracking events, we need to first configure the Delivery Configuration in OrderCloud. Delivery Configuration allows us to set up a delivery target which allows us to determine where the messages are to be delivered.

The Delivery targets supported today are:

  1. To have 100% control over the integration, you can use:
  • Kafka
  • Event Hub
  • Azure Blob
  • Http
  • Message Sender
  1. For out-of-the-box integrations:
  • Search Ingestion
  • Send Event
  • Discover Event
  • Mandrill

Now that we have a basic understanding on what tracking events are, we will use an example of how we set up tracking events in OrderCloud to send events using out-of-the-box integrations to Sitecore Discover - an AI-driven product search and merchandising solution that enables merchandisers and marketers to create personalized shopping experiences.

Step 1: Create a new Delivery Configuration in the Sitecore OrderCloud Marketplace.

Step 2: Create a new tracking event for the events you would like to send to Discover

  • You need to copy down the ID of the delivery configuration created in Step 1.
  • Follow this Sitecore Documentation on how to create a new tracking event
  • I have configured all the 4 supported events today
    • UserLoggedIn
    • LineItemAdded
    • LineItemUpdated
    • OrderSubmitted custom

That’s all it takes, and the setup is completed.

Now, let’s try a couple of use cases to validate our setup.

1. UserLoggedIn: Track events in Discover when a user logs in to your storefront

  • Login to the Discover portal and navigate to the Event monitor under Developer Resources.
  • Add the UUID, in this case, it is the Buyer’s User ID who will be logging in to the storefront.
    • Start Monitoring
    • This allows us to validate our setup and monitor their activity for 15 minutes once we start. custom

2. LineItemAdded: Track event in Discover when a user adds a product to their shopping cart.

  • Login to the Discover portal and navigate to Event Monitor under Developer Resources.
  • Add the UUID, in this case, it is the Buyer’s User ID who will be adding a product to their shopping cart in your storefront.
    • Start Monitoring
  • This allows us to validate our setup and monitor their activity for 15 minutes once we start. custom

Utilizing tracking events through OrderCloud offers a distinct advantage: flexibility. This approach eliminates the need for development time, reduces the clutter of additional tracking scripts in your browser, and circumvents third-party cross-site scripting restrictions. Notably, these tracking events operate seamlessly even outside of a browser environment.

Sitecore Discover offers event tracking that allows us to capture visitor actions on your storefront. This is required for product discovery and machine learning to function.

Hopefully this walk-through was helpful. If you have any questions feel free to contact us.

References: