> For the complete documentation index, see [llms.txt](https://docs.customerglu.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.customerglu.com/sdk/shopify.md).

# Shopify

1. Log in to your Shopify Store Admin Panel

![](/files/zADGs33MUSrrkhWgOXu4)

&#x20; 2\. Select Online Store->Themes

![](/files/TBSPGPz69EfyvZcLOnBd)

3\. Select Actions->Edit Code

![](/files/qOVX8gV96MtEsJyC0Snu)

4\. In the `theme.liquid` file, paste the code snippet given below, just before the `</body>` tag

&#x20;  :warning: Replace the value of "window.\_\_GLU\_\_writeKey" with your API KEY

```
    {% comment %}__GLU__CODE__START{% endcomment %}
    {% if customer %}
      <script type="text/javascript">
        window.__GLU__userId = "{{ customer.id }}";
      </script>
    {% endif %}
    <script type="text/javascript">
      window.__GLU__writeKey = "<YOUR API KEY>";
    </script>
    <script type="text/javascript" src="https://assets.customerglu.com/scripts/sdk/v4.6/shopify.js"></script>
    {% comment %}__GLU__CODE__END{% endcomment %}
```

![](/files/goYwAeBOQYgbanZ5NiHu)

5\. Save the file

![](/files/WdjOUA4E5amNheIf64pn)

6\. Viola! You're all set!

Here's a video walkthrough of the process:

{% embed url="<https://youtu.be/4XtleYBRv-4>" %}
