Sitecore Cloud SDK for JavaScript
The Sitecore Cloud SDK provides Sitecore digital experience platformSitecore digital experience platform capabilities, such as tracking, analytics, and personalization, for JSS Next.js applications hosted on SitecoreAI.
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.
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:
-
VIEWevent capturing. This tracks a site visitor's action of viewing a webpage in your app. -
FORMevent capturing. This tracks a site visitor's action of viewing or submitting a form.
-
-
Personalization:
-
SitecoreAI personalizations.
-
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:
-
Tracking and analytics:
-
Capture
VIEWevents from certain pages only. -
Capture
IDENTITYevents. This event is used to resolve the identity of an anonymous site visitor to your app and turn them into a known customer. -
Capture custom events. Custom events allow you to track any visitor behavior of your choice, for example, when the site visitor clicks a component.
-
-
Personalization: