# ▶️ Use script blocks

Source: https://support.storeconnect.com/articles/how-to-use-script-blocks · Last modified 21 August 2026

Video: https://vimeo.com/1197572317?fl=sv&fe=ci

## 1. Create a script block

1.  Go to the **Script Blocks** list (**StoreConnect Navigation** → **Custom Content**).
2.  Select **New**.

## 2. Configure the script block

1.  Give the script block a **Name**, for example "Chatbot Embed".
2.  Assign it to your **Store**.
3.  Set the configuration:
    -   **Active** — check this to enable the script block.
    -   **Channels** — select **Web** for your online store, **POS** for the point of
        sale app, or both. This field is required.
    -   **Global** — check this to include the script on every page. Leave it unchecked
        and the script block is not included on your store at all.
    -   **Position** — the order script blocks load in. Lower numbers load first.
4.  Add your script, using one of:
    -   **Content** — paste the script itself, written **without** `<script>` tags.
        StoreConnect adds them for you.
    -   **Script URL** — load the script from an external source instead. If you set
        this, any value in **Content** is ignored.
5.  Select **Save**.

## 3. Test the script

1.  Go to your storefront and refresh the page.
2.  Confirm the script does what you expect. A chatbot, widget, or tracking tool should
    now appear and function as configured.

The script block is rendered in the `<head>` of every page on your store, wrapped in
`<script>` tags, or as `<script src="...">` when you set **Script URL**.

## Notes and best practices

-   Turn a script block on or off at any time with the **Active** checkbox. You do not
    need to delete it.
-   Script blocks suit chatbots, Google Analytics, Facebook Pixel, custom widgets, and
    marketing tags.
-   Liquid code does not work inside script blocks. If your script needs Liquid, use the
    head content block instead. See
    [Adding custom JavaScript, CSS and head content](adding-custom-javascript-css-and-head-content).
-   Test on a staging store first where you can, especially for analytics or tracking
    scripts.

:::note

If you link a script block to a **Cookie** record for privacy compliance, it only loads
for visitors who have consented to that cookie. Script blocks with no linked cookie
always load.

:::

---

## Follow StoreConnect

- [Email Newsletter](https://getstoreconnect.com/c/lp-newsletter)
- [LinkedIn Newsletter](https://www.linkedin.com/build-relation/newsletter-follow?entityUrn=7444956928444862464)
- [YouTube](https://www.youtube.com/channel/UCngKdP2x8l1wcbAKW3tvU8g)
- [LinkedIn](https://www.linkedin.com/company/storeconnect)
- [X / Twitter](https://x.com/storeconnecthq)

## Popular Links

- [Partners](https://getstoreconnect.com/partners)
- [News](https://getstoreconnect.com/articles/news)
- [Events](https://getstoreconnect.com/articles/events)
- [Feature Comparison](https://getstoreconnect.com/how-we-compare)
- [Download a free trial](https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FMkeKUAT)
- [Book a Demo](https://getstoreconnect.com/contact)

## Documentation

- [Help documentation](https://support.storeconnect.com/help-documentation)
- [AI agents](https://support.storeconnect.com/ai)
- [Videos & tutorials](https://support.storeconnect.com/videos-tutorials)
- [Developer reference](https://support.storeconnect.com/developer-reference)
- [Release notes](https://support.storeconnect.com/release-notes)
- [Troubleshooting](https://support.storeconnect.com/troubleshooting)
- [Trust Center](https://trust.getstoreconnect.com/)
- [Status Page](https://status.storeconnect.com/)

## Contact

- info@getstoreconnect.com
- US +1 415 745 3230
- AUS +61 2 8365 2308

100 S Ashley Dr, Suite 600-2461
Tampa FL 33602-600 USA

Level 22, Sydney Place
180 George Street
Sydney, NSW, 2000, AUS

---

StoreConnect Support — https://support.storeconnect.com/articles/how-to-use-script-blocks