Sitecore XM Cloud provides embedded tracking and personalization capabilities, which are remarkable out-of-the-box features.

In this, I will outline steps to take if XM Cloud tracking is not operating as expected.

To ensure proper personalization on your website, the initial and fundamental step is to confirm that the website is accurately tracking visitors. If visitor logging or tracking fails, personalization will not perform as intended.

Navigate to the Analyze section on the XM Cloud portal. If you come across the “No data available” message and observe empty charts for both Site insights and Page insights, it indicates that tracking is not working as expected.

For further investigation, open your website in a browser, access the Development Tools panel, and switch to the Network tab. Refresh the page and look for a POST request to the Personalize tracking API, which should resemble the following:

If this request is not visible, ensure that the cdpPageview component (\src\components\CdpPageView.tsx) and the file \src\Scripts.tsx are included in your layout (usually found in \src\Layout.tsx), as tracking will not function otherwise.

Additionally, check the browser console for any error messages. Possible reasons for errors include:

– Incorrect Site Identifier (or Point of Sale in CDP/Personalize terminology)

– Incorrect Target URL

– Content Security Policy headers blocking tracking requests

Correcting these errors should restore tracking functionality, and you will begin to see statistics.

Leave a Reply

Your email address will not be published. Required fields are marked *