# Front End Integration

The Spectrum front end is designed to be integrated into the front end of your ecommerce website. All necessary front end files will be delivered via the Spectrum CDN and are rendered dynamically within an HTML element.

### 1. Load the Spectrum JavaScript file in the HEAD tag

The Spectrum team will provide the full URL to fill in the `[ClientHandle]`. The  `[SpectrumCdnEnvironment]` base URLs are listed in the [Environments](/integration/api/environments.md) page.

```markup
<script src="[SpectrumCdnEnvironment]/[ClientHandle]/frontend/js/customizer.min.js"/>
```

### 2. Create an HTML div tag with an ID of spectrum-customizer

This is where the customizer experience will load on the page. Any surrounding container elements on the PDP should be 100% width to allow for responsive content.

```markup
<div id="spectrum-customizer"></div>
```


---

# 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.spectrumcustomizer.com/integration/ecommerce/front-end-integration.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.
