---
title: How to preview LayerZ in any site
description: Preview LayerZ on your website locally without integration using simple steps and code snippets.
image: https://blog.layerz.com/hubfs/How%20to%20preview%20LayerZ%20in%20any%20site.jpg
---

<https://blog.layerz.com/how-to-preview-layerz-in-any-site#top>

[Skip to Content](https://blog.layerz.com/how-to-preview-layerz-in-any-site#body)

[![](https://blog.layerz.com/hs-fs/hubfs/LayerZ%20Blog-1.png?width=251&height=80&name=LayerZ%20Blog-1.png)](https://blog.layerz.com/)

Toggle Menu

- [Visit LayerZ.com](https://www.layerz.com)
- [Insights](https://blog.layerz.com)
- [Let's talk](https://blog.layerz.com/contact)

[back to blog](https://blog.layerz.com)

[Product & Developers](https://blog.layerz.com/topic/product-developers)

# How to preview LayerZ in any site

 Read Time **1 mins** | Nov 7, 2025 2:52:55 PM | Written by: Daniel Beltran

<https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fblog.layerz.com%2Fhow-to-preview-layerz-in-any-site> <https://twitter.com/intent/tweet/?text=How+to+preview+LayerZ+in+any+site&url=https%3A%2F%2Fblog.layerz.com%2Fhow-to-preview-layerz-in-any-site> <https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fblog.layerz.com%2Fhow-to-preview-layerz-in-any-site> [mailto:?subject=How%20to%20preview%20LayerZ%20in%20any%20site&body=https%3A%2F%2Fblog.layerz.com%2Fhow-to-preview-layerz-in-any-site](mailto:?subject=How%20to%20preview%20LayerZ%20in%20any%20site&body=https%3A%2F%2Fblog.layerz.com%2Fhow-to-preview-layerz-in-any-site)

![Illustration of running LayerZ in any website using the browser console, displaying a site preview alongside injected JavaScript code.](https://blog.layerz.com/hubfs/How%20to%20preview%20LayerZ%20in%20any%20site.jpg)

LayerZ, like any other tool you use in your website, requires to be integrated. However, we can do a workaround to preview how LayerZ would look like in a website without integrating it there. This won’t affect the actual website, just your local experience of it. So, don’t worry about ruining the website for other users 😇

You can run LayerZ in any site following these steps:

- Open the Web Inspector, which is a built-in browser tool that allows you to inspect and modify web pages. You can access this by right-clicking anywhere on the page and selecting 'Inspect' from the context menu, or by using keyboard shortcuts like F12 on Windows/Linux or Command+Option+I on Mac.
- Navigate to the Console tab in the web inspector.
- Copy and paste the following code into the console and press Enter.

```

function injectScript(scriptUrl, callback) {
    const scriptElement = document.createElement('script');
    scriptElement.src = scriptUrl;
    scriptElement.onload = function () {
        console.log('Script loaded:', scriptUrl);
        if (typeof callback === 'function') {
            callback();
        }
    };
    scriptElement.onerror = function () {
        console.error('Error loading script:', scriptUrl);
    };
    document.head.appendChild(scriptElement);
}

injectScript("https://lz-web-sdk-prod.s3.eu-west-1.amazonaws.com/latest/lz-web-sdk.js", () => {
    var workspaceId = "669920bbf59a3cf20d3e76f9";
    LayerZ.init({ workspaceId, variables: {} });
});
```

⚠️ **Warning!** This method won't always work. Some websites have security measures that prevent this approach.

ℹ️ **Note** To demonstrate different use cases, you can modify the workspaceId variable. Contact your LayerZ representative for available options.

 

 

 

## Framework Will Help You Grow Your Business With Little Effort.

[Get Started](https://www.example.com)

##### Daniel Beltran

Share the Love

<https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fblog.layerz.com%2Fhow-to-preview-layerz-in-any-site> <https://twitter.com/intent/tweet/?text=How+to+preview+LayerZ+in+any+site&url=https%3A%2F%2Fblog.layerz.com%2Fhow-to-preview-layerz-in-any-site> <https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fblog.layerz.com%2Fhow-to-preview-layerz-in-any-site> [mailto:?subject=How%20to%20preview%20LayerZ%20in%20any%20site&body=https%3A%2F%2Fblog.layerz.com%2Fhow-to-preview-layerz-in-any-site](mailto:?subject=How%20to%20preview%20LayerZ%20in%20any%20site&body=https%3A%2F%2Fblog.layerz.com%2Fhow-to-preview-layerz-in-any-site)

You May Like These

## Related Articles

![](https://blog.layerz.com/hs-fs/hubfs/Chatwoot-layerz-integration-api.png?width=700&name=Chatwoot-layerz-integration-api.png)

 Product & Developers

### [How to integrate LayerZ with the AI Agent Chatwoot](https://blog.layerz.com/your-blohow-to-integrate-layerz-with-the-ai-agent-chatwoot)

 Integrate Chatwoot with LayerZ to streamline customer interactions through automated journeys and we... 

Keep Reading

![](https://blog.layerz.com/hs-fs/hubfs/LayerZ-AI-Agentic-Presentation-2025-4.jpg?width=700&name=LayerZ-AI-Agentic-Presentation-2025-4.jpg)

 Product & Developers

### [How LayerZ works](https://blog.layerz.com/how-layerz-works)

 Elevate your digital retail strategy with LayerZ, replicating the personalized, interactive in-store... 

Keep Reading

![](https://blog.layerz.com/hs-fs/hubfs/Beyond%20the%20DOM-%20Rethinking%20Website%20Content%20Replacement.png?width=700&name=Beyond%20the%20DOM-%20Rethinking%20Website%20Content%20Replacement.png)

 Product & Developers

### [Beyond the DOM: A Faster, Non-Invasive Way to Update Website Content](https://blog.layerz.com/beyond-the-dom-a-faster-non-invasive-way-to-update-website-content)

 Discover how Layer Z revolutionizes website content management with non-invasive overlays, offering ... 

Keep Reading

[![Layer Z - Logo - Landscape - Black-Regular](https://blog.layerz.com/hs-fs/hubfs/Layer%20Z%20-%20Logo%20-%20Landscape%20-%20Black-Regular.png?width=250&height=100&name=Layer%20Z%20-%20Logo%20-%20Landscape%20-%20Black-Regular.png "Layer Z - Logo - Landscape - Black-Regular")](https://blog.layerz.com/)

,

Herragen AG. All rights reserved.

Layer Z is a trademark of Herragen A.G., registered in Switzerland and other countries.

© 2026 LayerZ. On another level. 

 

 

###### Legal

- [Terms of service](https://layerz.com/terms-of-service)
- [Privacy policy](https://layerz.com/privacy-policy)

**Contact**

<https://x.com/layerz_com> <https://www.youtube.com/@LayerZAI> <https://www.linkedin.com/company/layerz-digitalexperience>

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Daniel Beltran",
    "url" : "https://blog.layerz.com/author/daniel-beltran"
  },
  "dateModified" : "2026-04-02T20:46:32.579Z",
  "datePublished" : "2025-11-07T13:52:55.000Z",
  "headline" : "How to preview LayerZ in any site",
  "image" : [ "https://blog.layerz.com/hubfs/How%20to%20preview%20LayerZ%20in%20any%20site.jpg" ],
  "mainEntityOfPage" : {
    "@id" : "https://blog.layerz.com/how-to-preview-layerz-in-any-site",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://blog.layerz.com/hubfs/LayerZ%20Blog-1.png"
    },
    "name" : "LayerZ"
  }
}
```