# Setup & sync flow for Shopify Markets

Littledata integrates with **Shopify Markets** so you can configure tracking and integrations **per market** across supported destinations like **GA4, Klaviyo** and **Meta**.

{% embed url="<https://www.youtube.com/watch?v=ADEZROCd0ec>" %}

Once enabled, Littledata automatically stays in sync with your Shopify Markets setup — so when markets change in Shopify, your Littledata configuration updates automatically.

## How Shopify Markets syncing works

Littledata continuously syncs your Shopify Markets using:

1. **Shopify Admin API** – to fetch the current list of markets
2. **Shopify webhooks** – to detect changes as they happen

This allows Littledata to track when markets are active, draft or deleted. The list of active markets in your Shopify Admin will always match what you see in Littledata.

## Enabling Shopify Markets in Littledata

When you enable the **Markets module** during setup:

1. Littledata fetches and displays all currently active Shopify Markets
2. Enabling the module Makes all supported destinations market-aware and allows you to configure events and integrations **per market**, rather than globally:

![](/files/E0M7SkWOOwmm55fM0T3p)

At this stage, each market is initialized using **default (factory) settings**, which you can customize later.

## Managing markets after setup

Once the Markets module is enabled:

* Any activated destination will show a **Markets table**
* Each row represents **one active Shopify market**
* From this table, you can view all active markets and adjust tracking or integration settings **per market**:

![](/files/lUZCE8cVyG8rVEspoXY6)

This makes it easy to tailor your setup for different regions, currencies, or storefront strategies without duplicating connections.

## What happens when markets change in Shopify?

Shopify remains the **source of truth** for market state. Littledata does not create or manage markets directly.

Here’s how changes are handled:

1. **Market added in Shopify**\
   → Automatically appears in Littledata
2. **Market disabled in Shopify**\
   → Removed from active configuration
3. **Market deleted in Shopify**\
   → Removed from active configuration

All updates are propagated automatically via **webhooks and API syncing**, usually in near-real time.

## Market parameters in Littledata events

All Littledata events are market-aware by default, regardless of whether the markets module is enabled. This means **every event includes market identification parameters**, allowing downstream tools (such as GA4 and ad platforms) to segment, filter, and report based on market context. This behaviour is always on and does **not** depend on per-market configuration.

Each event includes the following parameters. Both are always sent together. For events attributed to [**Unassigned markets**](/sources/shopify-markets/unnasigned-markets.md), Littledata uses fixed system values (market\_id = 0, market\_handle = unassigned\_market) that do not correspond to any Shopify market.

| Parameter      | Description                                                                                                           |
| -------------- | --------------------------------------------------------------------------------------------------------------------- |
| market\_handle | The handle of the Shopify Market for this event. Fixed as `unassigned\_market` for orders not attributed to a market. |
| market\_id     | The internal Shopify Market ID for this event. Fixed as `0` for orders not attributed to a market.                    |

### When to use market\_handle vs market\_id

Use **market\_handle** when building reports or audiences that need to be human-readable — for example, filtering a GA4 report by "eu-french-speaking" or creating a Klaviyo segment labelled by region. The handle makes it easy to understand at a glance which market data belongs to, and it matches the name you've set in Shopify.

Use **market\_id** when joining market data across systems or building automated logic that needs a stable, unchanging reference. Unlike the handle, the market ID is assigned by Shopify and never changes — even if you rename the market. This makes it the safer choice for data warehouse joins, API integrations, or any workflow where a renamed market would otherwise break your logic.

## How destinations handle market parameters

1. **Analytics & Ads platforms** (GA4, Meta, TikTok, Pinterest, Google Ads, Microsoft Ads):\
   All supported events include market\_handle and market\_id as event parameters.
2. **Klaviyo**:\
   Events include market\_handle and market\_id, along with customer\_locale for backward compatibility. Market parameters are also synced as **customer profile attributes**.

Exact parameter naming and placement can vary by destination, so destination-specific schemas should be used as the source of truth.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.littledata.io/sources/shopify-markets/setup-and-sync.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
