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

# Shopify Installation

> Add Pockla personalization to your Shopify store

Adding the Pockla snippet to your Shopify store's `<head>` section is straightforward. Follow the steps below.

## Step 1: Open the Code Editor

<Steps>
  <Step title="Go to Online Store > Themes">
    From your Shopify admin, navigate to **Online Store** → **Themes**
  </Step>

  <Step title="Edit Code">
    Find your current theme and click **Actions** → **Edit Code**
  </Step>
</Steps>

## Step 2: Add the Snippet

Copy the Pockla snippet:

```html theme={null}
<script>var p=new URLSearchParams(location.search).get('pklid');if(p)document.write('<script src="https://embed.pockla.io/'+p+'.js"><\/script>');</script>
```

<Steps>
  <Step title="Find theme.liquid">
    In the left sidebar, find **theme.liquid** under the **Layout** folder
  </Step>

  <Step title="Search for <head>">
    Press **CMD+F** (Mac) or **CTRL+F** (Windows) and search for `<head>`
  </Step>

  <Step title="Paste the snippet">
    Paste the Pockla snippet at the very top of `<head>`, on the first line after the opening tag

    ```html theme={null}
    <head>
      <script>var p=new URLSearchParams(location.search).get('pklid');if(p)document.write('<script src="https://embed.pockla.io/'+p+'.js"><\/script>');</script>
      
      <!-- Rest of your head content -->
    ```
  </Step>

  <Step title="Save">
    Click **Save** in the top right

    <Warning>
      Be careful not to delete any existing code—even a single bracket can break your theme.
    </Warning>
  </Step>
</Steps>

## Frequently Asked Questions

<AccordionGroup>
  <Accordion title="Will this affect my store's performance?">
    No. The snippet is tiny and only loads an external script when a visitor arrives via a Pockla link. Regular visitors see zero additional overhead.
  </Accordion>

  <Accordion title="Is my data safe?">
    Yes. Pockla is designed with security and privacy in mind. The snippet only loads personalization features you've configured.
  </Accordion>

  <Accordion title="Can I use Google Tag Manager instead?">
    We don't recommend GTM for Pockla. GTM loads scripts with a delay, causing flicker. Install directly in theme.liquid for the best experience.
  </Accordion>

  <Accordion title="Can I remove the snippet later?">
    Yes. Go back to theme.liquid, delete the Pockla snippet, and click Save.
  </Accordion>
</AccordionGroup>

## Need Help?

<Card title="Contact Support" icon="headset" href="mailto:support@pockla.io">
  Get help with Shopify installation
</Card>
