> For the complete documentation index, see [llms.txt](https://help.littledata.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.littledata.io/integrations/shopify-to-segment/installation.md).

# Shopify to Segment installation guide

Follow these steps to use your Shopify store as a Segment source with Littledata. You'll create a Shopify (by Littledata) source in Segment, then paste its write key into the Littledata app.

### Before you start

* Access to the Littledata app for your Shopify store.
* A Segment workspace where you're a **Workspace Owner** or have **Source Admin** access, so you can create sources.

### Connect Segment in the Littledata app

{% stepper %}
{% step %}

#### Add the destination

In the Littledata app, click **Add destination**. A list of destinations opens under **Available in your plan**.
{% endstep %}

{% step %}

#### Connect Segment

Find **Segment** in the list and click **Connect**. You'll see the **Connect your store to Segment** screen. Click **Continue**.
{% endstep %}

{% step %}

#### Choose your tracking preferences

On **Set up your tracking**, keep **Use best practices** selected (it has a **Recommended** badge) and click **Continue**.

If you choose **Customize your tracking** instead, you'll first pick your order and product identifiers and the events to send, clicking **Continue** after each screen.
{% endstep %}
{% endstepper %}

### Create the source in Segment

{% stepper %}
{% step %}

#### Open your Segment workspace

On the **Create a new source** screen, click the **Segment workspace** link and log in. Keep the Littledata app open in its own tab.

The link opens the workspace you used last. If you have more than one, check the workspace name at the top left and switch to the right one before you go on.
{% endstep %}

{% step %}

#### Add the Shopify (by Littledata) source

In Segment, click **Connections** in the left menu, then **Add Source**. Search for **Shopify (by Littledata)** and select it. Don't pick the plain **Shopify** source, which is a different integration.

Click **Add Source**. Give the source a name (for example your store name), then click **Add Source** again to create it. This second **Add Source** click is easy to miss: the source isn't created until you make it.
{% endstep %}

{% step %}

#### Confirm in the Littledata app

Back in the Littledata app, tick **I have completed all the steps** and click **Continue**.
{% endstep %}
{% endstepper %}

### Add your write key

{% stepper %}
{% step %}

#### Copy the write key from Segment

In Segment, go to **Connections** > **Sources** and click your new Shopify (by Littledata) source. The source page opens on the **Overview** tab (next to **Debugger**, **Schema**, **Alerts**, **Functions** and **Settings**).

Under **Configuration** > **Installation**, find **Write Key** and click **Copy** next to it. It's a string of letters and numbers, for example `wzMPgLz12SpgVtei1qrkr123`.

<figure><img src="https://3956158252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2Fgit-blob-090fc1837d8e5ec151e85cbc6e5cfef6530c3d64%2Fhc-segment-write-key.png?alt=media" alt=""><figcaption></figcaption></figure>

You'll also find the same key in the source's **Settings** tab under **API Keys**. Use the source's own tabs, not the workspace settings (gear icon): their **Access Management** > **Tokens** page holds a different kind of key that won't work here.
{% endstep %}

{% step %}

#### Paste the write key

In the Littledata app, on **Add your Segment writekey**, paste it into **Write key** and click **Continue**. Paste the key only, with no spaces before or after it.
{% endstep %}

{% step %}

#### Finish the connection

You'll see **Adding tracking** while Littledata applies its tracking scripts and webhooks to your Shopify store. When it's done, you'll see **You're connected! Here's where to go next.** Click **Skip to dashboard** to go back to the main page, or **Explore the event editor** to see the events you're sending.

{% hint style="info" %}
If you leave before the end, the Segment card shows **Pending setup**. Click **Continue** on the card to pick up where you left off.
{% endhint %}
{% endstep %}
{% endstepper %}

### Check that it works

* In the Littledata app, the Segment card shows a green **Connected** badge.
* To change your write key later, find the Segment card, click the **⋯** menu on its card and choose **Settings**.
* In Segment, go to **Connections** > **Sources**, open your Shopify (by Littledata) source and click the **Debugger** tab. Make sure it's set to **Live**, then browse your store. You'll see events arrive in real time. The Debugger shows a sample of recent events, not every event. See [How to use Segment's debugger to see Littledata events](https://help.littledata.io/integrations/shopify-to-segment/segment-debugger-littledata-events).

You can now send data from Shopify to any of your Segment destinations.

### Related articles

* [Segment](https://help.littledata.io/integrations/shopify-to-segment)
* [How the Segment connection works](https://help.littledata.io/integrations/shopify-to-segment/how-it-works)
* [Segment FAQ](https://help.littledata.io/integrations/shopify-to-segment/segment-faq)
