Skip to main content

Integrate with Discover runtime JS


Introduction to the architecture of Sitecore Discover runtime JS.


The Discover runtime JS integration method is deprecated. We recommend that you use the Discover JS SDK to integrate your website or the Discover API for a website or application integration.

Sitecore Discover runtime JS simplifies the development of webpages that deliver personalized interactions to your visitors. When you use this integration option, the Discover integration team configures widgets for you. The development work that you have to complete is minimal.

Integration using Discover runtime JS as an MVC implementation

The runtime JS implementation can be understood as an MVC pattern where:

  • The Model is the content pulled from or pushed to Discover by the beacon.

  • The View is composed of UI components built at runtime by the beacon.

  • The Controller is implemented by the beacon, which resides on the page.

Diagram of the JS runtime option as an MVC implementation.

The Discover beacon

The Discover beacon is a JavaScript file that is hosted at Discover but exposed on your site as a first-party. The beacon provides functionality to display widgets, transfer data, and track user events. If you are using the runtime JS implementation, it is essential that you include the beacon on every page that displays a Discover experience.

To integrate using Discover runtime JS, you must place the Discover beacon JS in your site's head. Additionally, individual widget scripts must be created and published in the CEC, then placed on the webpage as customized div tags in locations that you choose. When a shopper visits the page, the beacon initializes the widgets in the div tags.