> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lucidworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Start collecting user insights in 3 steps.

export const LwTemplate = ({title = "Key questions to get you started", icon = "sparkles", cta = "Powered by Agent Studio", linkHref = "https://lucidworks.com/demo/?utm_source=docs&utm_medium=referral&utm_campaign=docs_cta_ai"}) => {
  const [isLoaded, setIsLoaded] = useState(false);
  useEffect(() => {
    const timer = setTimeout(() => {
      setIsLoaded(true);
    }, 500);
    return () => clearTimeout(timer);
  }, []);
  return <div className="lw-template-container">
      <Card title={title} icon={icon}>
        {isLoaded && <span dangerouslySetInnerHTML={{
    __html: `<lw-template id="a029c1a9-28be-427e-b0e1-5d918920246a"></lw-template
            >`
  }} />}
        <Link href={linkHref} className="agent-studio-link text-left text-gray-600 gap-2 dark:text-gray-400 text-sm font-medium flex flex-row items-center hover:text-primary dark:hover:text-primary-light group-hover:text-primary group-hover:dark:text-primary-light">Powered by Lucidworks Agent Studio</Link>
      </Card>
    </div>;
};

[localhost link]: http://localhost:3000/docs/lw-platform/lw-analytics/quickstart

[mintlify link]: https://doc.lucidworks.com/docs/lw-platform/lw-analytics/quickstart

<Steps>
  <Step title="Install the Signals Beacon" icon="code">
    Grab the Signals Beacon embed script from your Lucidworks Analytics Signals Store on the **Integrations** page. Paste it in the `<head>` of your website.

    <LwTemplate />

    ```html theme={"dark"}
    <script type="module"
      id="lw-ui-lib"
      api-url="https://947b284a-5a9f-4e3c-a430-8ece27756ab1.applications.lucidworks.com"
      embed-token="EMBED_TOKEN"
      src="https://storage.googleapis.com/sb-ui/springboard.esm.js"
      beacon="{}"
    ></script>
    ```
  </Step>

  <Step title="Customize the configuration" icon="paintbrush">
    Every site works a little differently. The Signals Beacon is flexible, so you can set it up in the way that fits your site best.

    To get started, configure the Signals Beacon to collect these user insights:

    <AccordionGroup>
      <Accordion title="Queries">
        When users search for products, they land on a search results page. They might use facets to narrow down what they see.

        Capture the user's search query and selected facets. Map the query and facet parameters from the URL to the `query` field in the Signals Beacon configuration.

        <CodeGroup>
          ```html URL theme={"dark"}
          https://example.com/search?q=USER_QUERY&fq=color:("red","pink")
          ```

          ```json Query Config highlight={22-30} theme={"dark"}
          {
            "attributes": {
              "idQueryParam": "pid",
              "numberTypeFields": [
                "price",
                "quantity",
                "revenue"
              ],
              "productPath": ".resultsItem"
            },
            "cartAdd": {
              "trigger": ".lw-cart-add-trigger"
            },
            "click": {},
            "fields": {
              "productId": ":scope .resultId @text",
              "title": ":scope .itemTitle @text"
            },
            "purchase": {
              "trigger": ".lw-purchase-trigger"
            },
            "query": {
              "facets": {
                "keyValueDelimiter": ":",
                "queryParams": "fq",
                "valueExtractorRegex": "/\\\"(.*)\\\"/",
                "valuesDelimiter": ","
              },
              "queryParam": "q"
            }
          }
          ```
        </CodeGroup>
      </Accordion>

      <Accordion title="Clicks">
        When users find a product they like, they click on it.

        Capture that interaction. Map the product ID from the HTML to the `click` and `fields` fields in the Signals Beacon configuration.

        <Note>The `click` field inherits values from the `fields` field. It’s recommended to use the `fields` field directly.</Note>

        <CodeGroup>
          ```html HTML highlight={3-4} theme={"dark"}
          <div class="resultsItem">
            <a href="/product.html?pid=12345" class="resultLink">
              <div class="resultId">12345</div>
              <div class="itemTitle">Wireless Noise-Canceling Headphones</div>
            </a>
          </div>
          ```

          ```json Click Config highlight={14-18} theme={"dark"}
          {
            "attributes": {
              "idQueryParam": "pid",
              "numberTypeFields": [
                "price",
                "quantity",
                "revenue"
              ],
              "productPath": ".resultsItem"
            },
            "cartAdd": {
              "trigger": ".lw-cart-add-trigger"
            },
            "click": {},
            "fields": {
              "productId": ":scope .resultId @text",
              "title": ":scope .itemTitle @text"
            },
            "purchase": {
              "trigger": ".lw-purchase-trigger"
            },
            "query": {
              "facets": {
                "keyValueDelimiter": ":",
                "queryParams": "fq",
                "valueExtractorRegex": "/\\\"(.*)\\\"/",
                "valuesDelimiter": ","
              },
              "queryParam": "q"
            }
          }
          ```
        </CodeGroup>
      </Accordion>

      <Accordion title="Cart adds">
        When users add a product to their shopping cart, that action shows strong interest and intent to buy.

        Capture this interaction by mapping the click from your HTML to the `cartAdd` field in the Signals Beacon configuration. Tracking this helps you understand what products matter most and where users may drop off before purchasing.

        <CodeGroup>
          ```html HTML highlight={7} theme={"dark"}
          <div class="product-detail">
            <div class="product-info">
              <div class="resultId">12345</div>
              <div class="itemTitle">Wireless Noise-Canceling Headphones</div>
              <div class="price">199.99</div>
            </div>
            <button class="lw-cart-add-trigger" data-product-id="12345">Add to Cart</button>
          </div>
          ```

          ```json Cart Add Config highlight={11-13} theme={"dark"}
          {
            "attributes": {
              "idQueryParam": "pid",
              "numberTypeFields": [
                "price",
                "quantity",
                "revenue"
              ],
              "productPath": ".resultsItem"
            },
            "cartAdd": {
              "trigger": ".lw-cart-add-trigger"
            },
            "click": {},
            "fields": {
              "productId": ":scope .resultId @text",
              "title": ":scope .itemTitle @text"
            },
            "purchase": {
              "trigger": ".lw-purchase-trigger"
            },
            "query": {
              "facets": {
                "keyValueDelimiter": ":",
                "queryParams": "fq",
                "valueExtractorRegex": "/\\\"(.*)\\\"/",
                "valuesDelimiter": ","
              },
              "queryParam": "q"
            }
          }
          ```
        </CodeGroup>
      </Accordion>

      <Accordion title="Purchases">
        One of the most important actions that drives your business is a user purchase. When users complete the checkout process, it confirms their decision to buy.

        Make sure to capture this event. Map the relevant HTML to the purchase field in the Signals Beacon configuration.

        <CodeGroup>
          ```html HTML highlight={9} theme={"dark"}
          <div class="order-confirmation">
            <div class="purchased-item">
              <div class="resultId">12345</div>
              <div class="itemTitle">Wireless Noise-Canceling Headphones</div>
              <div class="quantity">1</div>
              <div class="price">199.99</div>
              <div class="revenue">199.99</div>
            </div>
            <button class="lw-purchase-trigger">Complete Purchase</button>
          </div>
          ```

          ```json Purchase Config highlight={19-21} theme={"dark"}
          {
            "attributes": {
              "idQueryParam": "pid",
              "numberTypeFields": [
                "price",
                "quantity",
                "revenue"
              ],
              "productPath": ".resultsItem"
            },
            "cartAdd": {
              "trigger": ".lw-cart-add-trigger"
            },
            "click": {},
            "fields": {
              "productId": ":scope .resultId @text",
              "title": ":scope .itemTitle @text"
            },
            "purchase": {
              "trigger": ".lw-purchase-trigger"
            },
            "query": {
              "facets": {
                "keyValueDelimiter": ":",
                "queryParams": "fq",
                "valueExtractorRegex": "/\\\"(.*)\\\"/",
                "valuesDelimiter": ","
              },
              "queryParam": "q"
            }
          }
          ```
        </CodeGroup>
      </Accordion>
    </AccordionGroup>
  </Step>

  <Step title="Turn it on" icon="lightbulb-on">
    When you're ready to start collecting user insights in Lucidworks Analytics using the Signals Beacon, activate it in the **Integrations** screen. Add your site to the list of **Allowed origins**.

    <Frame caption="Sites added to the allowed origins with the Signals Beacon installed start collecting user insights instantly.">
      <img src="https://mintcdn.com/lucidworks/iWKi6k5BBzt8DXQ0/assets/images/lw-platform/analytics/signals-beacon-allowed-origins.png?fit=max&auto=format&n=iWKi6k5BBzt8DXQ0&q=85&s=11c9934f2f6c6f3ee8f6099c84826c0f" width="1650" height="550" data-path="assets/images/lw-platform/analytics/signals-beacon-allowed-origins.png" />
    </Frame>

    Once added, the Signals Beacon starts sending user insights to Lucidworks Analytics. Your **Signals analytics** dashboard will begin to show key metrics.
  </Step>
</Steps>
