# Quick Start Guide

Integrating the LiSA Content Hub to your storefront or website is plain simple. All you need to do is provide a content page with a host element, its query selector and integrate the configurable LiSA Content Hub embed code.

### Host element

The host element acts as a container where all the LiSA Content Hub markup will be injected automatically. The following code block uses an HTMLDivElement (

) with a unique identifier lisa-library.

You can replace this with whatever host element you want. Please make sure to provide a query selector with your configuration, in order for LiSA Content Hub to find your host element within the document.

```
<html>
  <head> <!-- --> </head>
  <body>
    <!-- other elements ... -->

    <!-- LiSA Library host element -->
    <div id="lisa-library"></div>

    <!-- even more elements ... -->
  </body>
</html>
```

### LiSA Content Hub embed code

First, we do a quick check, whether the LiSA Content Hub is available already. If not, the LiSA Web SDK is loaded from the LiSA CDN and added to the document.

After that you can push as many configurations into the library as desired.

```javascript
(function() {
  window.LiSA = window.LiSA || {};
  if (!window.LiSA.library) {
    window.LiSA.library = { configs: [] };
    var scriptNode = document.createElement('script');
    scriptNode.setAttribute('defer', 'defer');
    scriptNode.src = 'https://static.lisa-cdn.net/sdks/lisa-embed-library/latest/lisa-embed-library.latest.js';
    document.body.appendChild(scriptNode);
  }

  window.LiSA.library.configs.push({
    client: '[YOUR_CLIENT_IDENTIFIER]', // todo replace with your individual client identifier
    format: {
      asset: 'landscape',
    },
    hostNode: '#lisa-library',
  });
})();
```

Note: this is just a basic example for a single library configuration. Please make sure, to replace the client placeholder with your individual client identifier.

### Product detail page quick view

```javascript
(function() {
  window.LiSA = window.LiSA || {};
  if (!window.LiSA.library) {
    window.LiSA.library = { configs: [] };
    var scriptNode = document.createElement('script');
    scriptNode.setAttribute('defer', 'defer');
    scriptNode.src = 'https://static.lisa-cdn.net/sdks/lisa-embed-library/latest/lisa-embed-library.latest.js';
    document.body.appendChild(scriptNode);
  }

  window.LiSA.library.configs.push({
    client: '[YOUR_CLIENT_IDENTIFIER]', // todo replace with your individual client identifier
    hostNode: '#lisa-library',
    on: {
      ready: (library) => {
        library.player.on(library.player.Event.PRODUCT_VIEW, ({ action }) => {
          library.quickView.show(action);
        });
      },
    },
  });
})();
```

The example registers an event listener to the LiSA player's PRODUCT\_VIEW event. This event handler uses argument deconstruction to extract the URL (or custom command value) from the event's parameters and opens the product URL in the quick view component.

Please refer to API reference for more information on how to customize the behaviour of your library and player.

For more information on the variaty of configuration options LiSA Content Hub provides, proceed to Configuration options .


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hello-lisa.com/developers/widgets/quick-start-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
