After creating a web experience or web experiment I want to use the Preview button to see what my content will look like on the website before going live. Why is Preview not working on my website?

1 Answer 1


The most common reason for issues when using the Preview is if the web_flow_target hasn’t been set where the JavaScript Library is being loaded.

You need to set the web flow target in the settings where your Sitecore CDP JavaScript Library is being loaded.

    // Define the Boxever queue 
    var _boxeverq = _boxeverq || [];

    // Define the Boxever settings 
    var _boxever_settings = {
        client_key: '{{clientKey}}', // Replace with your client key
        target: '{{apiTargetEndpoint}}', // Replace with your API target endpoint specific to your data center region
        cookie_domain: '{{cookieDomain}}' // Replace with the top level cookie domain of the website that is being integrated e.g ".example.com" and not "www.example.com"
        web_flow_target:  "https://d35vb5cccm4xzp.cloudfront.net",
        pointOfSale: "{{pointOfSale}}"  // Replace with the point of sale you have configured in your tenant
    // Import the Boxever library asynchronously 
    (function() {
         var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true;  
         s.src = 'https://d1mj578wat5n4o.cloudfront.net/boxever-{{clientVersion}}.min.js';
         var x = document.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x);

For loading the JS Library see: First of all the Sitecore CDP JavaScript Library most be loaded on the website, see https://doc.sitecore.com/cdp/en/developers/sitecore-customer-data-platform--data-model-2-1/javascript-tagging-examples-for-web-pages.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.