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

# Shopify

> [card] Connection Info
>
> The Shopify Connection is an **Events** and **Profiles** connection.
>
> * **Events:** Sends events, such as page views or orders, to Innkeepr.
> * **Profiles:** Adds traits, such as email addresses or phone numbers, to Profiles.

[Shopify](https://www.shopify.com) is a commerce platform for online stores. Add Shopify as a Connection to Innkeepr to send your store's events and customer data to Innkeepr without adding tracking code yourself.

## Getting Started

1. The Innkeepr team sends you an installation link for the Innkeepr app for your store.
2. Open the link while you are logged in to your Shopify admin.
3. Review the permissions and click **Install**.
4. Innkeepr adds the **Innkeepr Web Pixel** to your store. You find it in **Settings** > **Customer events** > **App pixels**.
5. Your store appears on the **Connections** page in Innkeepr.

If you run several stores, for example one per country, install the app in each of them. Every store becomes its own connection.

## Supported events

The Innkeepr Web Pixel sends these events from your storefront and checkout:

| Shopify event | Innkeepr event | Description |
| :- | :- | :- |
| `search_submitted` | `search_submitted` | Customer searched for products |
| `product_added_to_cart` | `product_added_to_cart` | Customer added a product to the cart |
| `checkout_started` | `checkout_started` | Customer started the checkout |
| `payment_info_submitted` | `payment_info_submitted` | Customer entered payment information |
| `checkout_completed` | `checkout_completed` | Customer completed the order |

The events follow the [E-Commerce Spec](https://docs.innkeepr.ai/connections/spec-ecommerce.md). You do not need to send them with Innkeepr.js as well.

With `checkout_started`, `payment_info_submitted`, and `checkout_completed`, the Web Pixel also sends an [Identify](https://docs.innkeepr.ai/connections/spec-identify.md) call with the customer details from the checkout, as long as an email address, phone number, or customer ID is available.

### Event payloads

Each event is sent with the [common fields](https://docs.innkeepr.ai/connections/spec-overview.md), such as `anonymousId`, `messageId`, and the page context. The examples show the type, the event name, and the properties Innkeepr stores.

> [accordion] search\_submitted
>
> ```json theme={null}
> {
>   "type": "track",
>   "name": "search_submitted",
>   "properties": {
>     "query": "body lotion"
>   }
> }
> ```

> [accordion] product\_added\_to\_cart
>
> ```json theme={null}
> {
>   "type": "track",
>   "name": "product_added_to_cart",
>   "properties": {
>     "product_id": "8012345678901",
>     "sku": "BL-250",
>     "name": "Body Lotion",
>     "variant": "250ml",
>     "price": 12.5,
>     "currency": "EUR",
>     "quantity": 2,
>     "url": "/products/body-lotion",
>     "image_url": "https://cdn.shopify.com/s/files/body-lotion.png"
>   }
> }
> ```

> [accordion] checkout\_started
>
> ```json theme={null}
> {
>   "type": "track",
>   "name": "checkout_started",
>   "properties": {
>     "checkout_id": "c1-8f3a2b6d9e",
>     "order_id": "5432109876",
>     "customer_id": "7012345678901",
>     "currency": "EUR",
>     "total": 29.9,
>     "revenue": 25,
>     "shipping": 4.9,
>     "tax": 4.77,
>     "phone": "+4915112345678",
>     "products": [
>       {
>         "product_id": "8012345678901",
>         "sku": "BL-250",
>         "name": "Body Lotion",
>         "variant": "250ml",
>         "price": 12.5,
>         "currency": "EUR",
>         "quantity": 2,
>         "url": "/products/body-lotion",
>         "image_url": "https://cdn.shopify.com/s/files/body-lotion.png"
>       }
>     ]
>   }
> }
> ```

> [accordion] payment\_info\_submitted
>
> ```json theme={null}
> {
>   "type": "track",
>   "name": "payment_info_submitted",
>   "properties": {
>     "order_id": "5432109876",
>     "customer_id": "7012345678901"
>   }
> }
> ```

> [accordion] checkout\_completed
>
> ```json theme={null}
> {
>   "type": "track",
>   "name": "checkout_completed",
>   "properties": {
>     "checkout_id": "c1-8f3a2b6d9e",
>     "order_id": "5432109876",
>     "customer_id": "7012345678901",
>     "currency": "EUR",
>     "subtotal": 25,
>     "total": 29.9,
>     "revenue": 25,
>     "shipping": 4.9,
>     "tax": 4.77,
>     "discount": 0,
>     "phone": "+4915112345678",
>     "billing_address": {
>       "first_name": "Peter",
>       "last_name": "Gibbons",
>       "address": "Invalidenstraße 1",
>       "city": "Berlin",
>       "zip": "10115",
>       "state": "Berlin",
>       "state_code": "BE",
>       "country": "Germany",
>       "country_code": "DE"
>     },
>     "products": [
>       {
>         "product_id": "8012345678901",
>         "sku": "BL-250",
>         "name": "Body Lotion",
>         "variant": "250ml",
>         "price": 12.5,
>         "currency": "EUR",
>         "quantity": 2,
>         "url": "/products/body-lotion",
>         "image_url": "https://cdn.shopify.com/s/files/body-lotion.png"
>       }
>     ]
>   }
> }
> ```
>
> `revenue` is the subtotal of the order, before shipping and tax.

Innkeepr also reads customers and orders from your store. It adds identifiers such as email address and phone number to the Profiles, which improves matching on Meta, TikTok, Google, and Criteo.

Shopify loads the Web Pixel only when the visitor has given **marketing** consent. Your store's consent banner or consent app therefore decides which visitors Innkeepr sees.

## Permissions

To install the app, you need to be the store owner or a staff member with permission to install apps. The app asks for these permissions:

| Permission | Why Innkeepr needs it |
| :- | :- |
| `read_customer_events` | Receive events from the Web Pixel |
| `read_pixels` | Check the Innkeepr Web Pixel |
| `write_pixels` | Add the Innkeepr Web Pixel to your store |
| `read_customers` | Add customer identifiers to Profiles |
| `read_orders` | Read orders and revenue |
| `read_products` | Read product details |

Apart from adding its Web Pixel, Innkeepr only reads data from your store. It does not change products, orders, or customers.

> [!NOTE]
>
> Learn more
>
> * [Spec: E-Commerce Events](https://docs.innkeepr.ai/connections/spec-ecommerce.md)
> * [Spec: Identify](https://docs.innkeepr.ai/connections/spec-identify.md)
> * [Spec: Track](https://docs.innkeepr.ai/connections/spec-track.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.