XM Cloud offers analytics and personalization capabilities, albeit in a limited feature version. In this article, we will show you the steps to enable this.
![](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2FTsW6n2Mzxk2OM9JFA8edc%2F4658e1c536b0feefcda31cab81fa7b57%2Flukas-blazek-mcSDtbWXUZU-unsplash.jpg&w=3840&q=75)
Prerequisite
When you subscribe to Sitecore XM Cloud, you actually get a simplified version of Sitecore CDP + Personalize. To activate this feature, the following conditions must be met
- Sitecore Cloud SDK is included as a package
- Get the required values from the XM Cloud environment
- Environment variables are enabled as Web site environment variables.
Note that if you are using an older version of the project (JSS 21.5 or earlier), you may be using the Sitecore Engage SDK. The differences between the packages are described in the following page.
Create and setting site identifiers
A mechanism called site identifier is provided to determine which site the data will be retrieved for. This value is retrieved and set individually for each XM Cloud site.
First, log in to XM Cloud and click on the menu at the bottom right of the list of sites, which will take you to the following screen.
![xmcloudcloudsdk01.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F1xg9S6KstPUQAYDhOWIInj%2Ff12b5b60e11e99e8f3fe1f553262bc49%2Fxmcloudcloudsdk01.png&w=3840&q=75)
Click on Setting, then click on the Site Identifiers item to display the Unconfigured screen as shown below.
![xmcloudcloudsdk02.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F7DFAKi7rpVVyW5RMFrl0J2%2F1bf43bddd480284e36f895b00a04e73d%2Fxmcloudcloudsdk02.png&w=3840&q=75)
When creating for the first time, there are no identifiers prepared for assignment. Click on the Create button in the upper right corner to move to the Create screen.
![xmcloudcloudsdk03.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F2C8GsauZz2ozo60CnzPrVo%2Fe6e949ab8f733ac1ad88904b8670b0b6%2Fxmcloudcloudsdk03.png&w=3840&q=75)
After you have created and completed the assignment, you will see the following screen.
![xmcloudcloudsdk04.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2FQWZokEctOdRO6yPuwVkhm%2F6f47228bfdda2ceb6c51c9c4fce390aa%2Fxmcloudcloudsdk04.png&w=3840&q=75)
Changing Web Site Environment Variables
After the site identifier has been created and configured, it is necessary to reflect the created site identifier on the website. The values to be set can be found in the Developer settings tab.
![xmcloudcloudsdk05.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F4HZ2EBvSlfnHYIcG4HxDdl%2F07cbcf8fa635284302f33767a07d26c7%2Fxmcloudcloudsdk05.png&w=3840&q=75)
The three values to be reflected on the site are as follows
- NEXT_PUBLIC_CDP_TARGET_URL
- NEXT_PUBLIC_CDP_CLIENT_KEY
- NEXT_PUBLIC_CDP_POINTOFSALE
These three values are set on the Vercel side this time.
![xmcloudcloudsdk06.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F7bDAgqauLEEkiLe9pVo74z%2F162d1e44b7bd8ea8a0328f884362295d%2Fxmcloudcloudsdk06.png&w=3840&q=75)
This completes the configuration. To reflect this in the environment, run rebuild on the Vercel web site to activate the settings for the site.
Operation check
After checking the actual published status and making sure that the data is entered into Analytics, click on the Analytics button from the Administration page a short time later.
![xmcloudcloudsdk07.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F1GJnos3Lds3SNdnzVP93cf%2F32fcb49b98301a66f2b0b9c1413e086b%2Fxmcloudcloudsdk07.png&w=3840&q=75)
We were able to confirm that the analytics are enabled.
Summary
As for the analytics provided by XM Cloud, there is a limit of 30 days. This limitation can be found on the Analyze page. In this article, we have introduced the Analytics configuration among the features provided by XM Cloud.