Tailwind Logo

Integration with XM Cloud marketing functions

XM Cloud

Published: 2023-12-06

Sitecore XM Cloud includes some of the analytics and personalization features provided by Sitecore CDP. This means that simple analytics and personalization are included as standard. In this article, we will check the configuration of this feature.

Creating a site identifier

First, you must create a site identifier. This can be listed in the Settings section of the XM Cloud screen.

xmcsitesettings01.png

Clicking on the Create New button displays a dialog box. In this case, we created the following.

xmcsitesettings02.png

Once created, the site identifier is added to the list.

Check the environment

If you have already created a site, open Settings from the site menu to retrieve information about the site you wish to configure.

xmcsitesettings01.png

When the screen is opened, information about the site to be configured is displayed.

xmcsitesettings04.png

The Site identifiers screen looks like this

xmcsitesettings05.png

Click on the menu on the right side of the site to display the screen for assigning an identifier. This time, click Assign identifier to site since it has already been created.

xmcsitesettings06.png

A list of selections will be displayed, so please apply the identifier you have just created.

xmcsitesettings07.png

When saved, each is set as follows.

xmcsitesettings08.png

Then from the JA item menu, select Create and assign site identifier to create the following new identifier

xmcsitesettings09.png

This completes the setup of identifiers about the site.

xmcsitesettings10.png

Check Vercel settings

In order to make the created identifiers valid, we will configure them for the Vercel environment. The data for this will be displayed in Developer Settings.

xmcsitesettings11.png

For SITECORE_API_KEY, click to generate a key and use it. These values are reflected in Vercel.

xmcsitesettings12.png

Reflection on the project

For a project running locally, we will set values for the file src\sxastarter\.env.

xmcsitesettings13.png

Note that GRAPH_QL_ENDPOINT should be left blank in the local environment, and SITECORE_API_KEY should be set to the local Sitecore key. After the configuration is complete, start the program with the following command.

PowerShell
jss start:connected

Use the developer tools while connected to the local CMS to verify that the code is displayed.

xmcsitesettings14.png

Summary

I have made some settings regarding marketing functions. After setting this up, I will introduce the available functions in another topic.

Tags