Sitecore Cloud SDK for JavaScript

Version:

The Sitecore Cloud SDK provides Sitecore digital experience platform capabilities, such as tracking, analytics, and personalization, for JSS Next.js applications hosted on SitecoreAI.

Note

If you don't have a JSS Next.js app hosted on SitecoreAI, you cannot use the Cloud SDK.

If your organization has Sitecore CDP or Sitecore Personalize but does not have SitecoreAI, implement tracking and personalization on your non-SitecoreAI sites using the Sitecore Engage SDK instead. See also a comparison of the Cloud SDK and the Engage SDK.

The Cloud SDK is compatible with JSS version 21.6 and later. We recommend that you upgrade to the latest version of JSS.

The Cloud SDK is part of the JSS XM Cloud add-on for Next.js. This add-on is preconfigured with certain Cloud SDK functionalities, which automatically run in your JSS Next.js app, no coding required. However, using the Cloud SDK, you can modify these functionalities as well as implement additional ones.

XM Cloud is now SitecoreAI

Some code examples, images, and UI labels may still use XM Cloud while engineering assets are being updated.

Functionalities that run automatically

The following Cloud SDK functionalities automatically run in your JSS Next.js app, no coding required:

  • Tracking and analytics:

    • VIEW event capturing. This tracks a site visitor's action of viewing a webpage in your app.

    • FORM event capturing. This tracks a site visitor's action of viewing or submitting a form.

  • Personalization:

By updating the Cloud SDK code in your app, you can modify the VIEW event configuration, and you can disable VIEW event tracking and personalization.

Additional functionalities you can implement

In addition to the preconfigured functionalities, you can implement the following Cloud SDK functionalities in your JSS Next.js app:

If you have suggestions for improving this article, let us know!