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 XM Cloud.
If you don't have a JSS Next.js app hosted on XM Cloud, you cannot use the Cloud SDK.
If your organization has Sitecore CDP or Sitecore Personalize but does not have XM Cloud, implement tracking and personalization on your non-XM Cloud 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.
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 an XM Cloud form.
-
-
Personalization:
-
XM Cloud 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
VIEW
events from certain pages only. -
Capture
IDENTITY
events. 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: