> For the complete documentation index, see [llms.txt](https://docs.adpage.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.adpage.io/documentation/documentation-nl/website-integraties/shopify/datalayer-gebeurtenissen-in-de-shopify-customer-events-pixel.md).

# dataLayer-gebeurtenissen in de Shopify Customer Events-pixel

Shopify's Customer Events draaien in een gesandboxte webpixel, dus welke dataLayer-gebeurtenissen zijn aanwezig in AdPage's Customer Events Pixel?

Shopify's Customer Events draaien in een afgeschermde webpixel, wat betekent dat de events die op de checkout- en bedanktpagina's afgaan niet verschijnen in de normale dataLayer zoals ze dat doen op de rest van je winkel. Je kunt ze niet inspecteren met GTM Preview-modus of door te typen `window.dataLayer` in de console.

In dit artikel staan alle events die AdPage vanuit Customer Events verstuurt, met voor elk een volledig voorbeeld van de payload, zodat je je tags kunt configureren zonder ze live te hoeven debuggen.

### Overzicht van events

| Event                          | Pagina             | Wanneer het afgaat                                                |
| ------------------------------ | ------------------ | ----------------------------------------------------------------- |
| `trytagging_user_data`         | Checkout & Bedankt | Bij elke paginalading                                             |
| `trytagging_begin_checkout`    | Checkout           | Wanneer de checkout opent, direct na `trytagging_user_data`       |
| `trytagging_add_address_info`  | Checkout           | Elke keer dat de klant zijn volledige adres invult                |
| `trytagging_add_shipping_info` | Checkout           | Elke keer dat de verzendmethode verandert                         |
| `trytagging_add_payment_info`  | Checkout           | Elke keer dat de klant betaalgegevens invoert en op betalen klikt |
| `trytagging_purchase`          | Bedankt            | Bij het payment-event van Shopify                                 |

In GTM stel je voor elk event dat je wilt gebruiken een Custom Event-trigger in die exact overeenkomt met de eventnaam. Let op dat `trytagging_add_address_info`, `trytagging_add_shipping_info` en `trytagging_add_payment_info` meer dan eens per checkout kan afgaan, dus voeg triggercondities toe als je duplicaten wilt voorkomen.

### Gedeelde objecten

Drie blokken komen terug in de meeste events. Ze worden hieronder in elke payload volledig weergegeven, maar je hoeft ze maar één keer te begrijpen.

**`marketing`** bevat de sessie- en klik-id's: de GA-cookiewaarden, `client_id`, `session_id`, `session_count`, de advertentieklik-id's (`fbp`, `fbc`, `ttclid`, `ttp`, `gclid`, `gbraid`, `wbraid`), de oorspronkelijke referrer, UTM-parameters, user agent en hostnaam. Identificatiegegevens die niet in de sessie aanwezig zijn, komen door als `null` in plaats van te worden weggelaten, zodat je variabelen de sleutel altijd kunnen vinden.

**`user_data`** bevat klantgegevens. Het bevat twee sets velden voor dezelfde waarden: de huidige `customer_*` velden, en een oudere set (`id`, `email`, `firstName`, en zo verder). Gebruik altijd de `customer_*` velden — de andere zijn verouderd en worden alleen nog behouden voor achterwaartse compatibiliteit.

**Velden op paginaniveau** (`event_time`, `page_referrer`, `page_location`, `page_title`) verschijnen op elk event.

***

### Checkout-pagina

#### `trytagging_user_data`

Wordt bij elke paginalading van de checkout afgegaan.

```json
{
  "event": "trytagging_user_data",
  "device": {
    "__not_supported": true
  },
  "cart": {
    "total": 2629.95
  },
  "page": {
    "title": "Afrekenen - Example Shop",
    "location": "https://example-shop.myshopify.com/checkouts/cn/CHECKOUT_TOKEN"
  },
  "marketing": {
    "_ga": "GA1.1.1234567890.1700000000",
    "_ga_XXXXXXXXXX": "GS1.1.1700000000.3.1.1700000600.0.0.0",
    "user_id": "00000000-0000-4000-8000-000000000000",
    "client_id": "1234567890.1700000000",
    "session_id": "1700000000",
    "session_count": "3",
    "fbp": null,
    "fbc": null,
    "ttclid": null,
    "ttp": null,
    "gclid": null,
    "gbraid": null,
    "wbraid": null,
    "referrer": "https://example-shop.myshopify.com/",
    "utm_source": null,
    "utm_medium": null,
    "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36",
    "hostname": "example-shop.myshopify.com"
  },
  "event_time": "2025-02-15T13:41:54.481Z",
  "page_referrer": "https://example-shop.myshopify.com/products/example-product",
  "page_location": "https://example-shop.myshopify.com/checkouts/cn/CHECKOUT_TOKEN",
  "page_title": "Afrekenen - Example Shop"
}
```

#### `trytagging_begin_checkout`

Wordt afgegaan zodra de checkout opent, direct na de `trytagging_user_data` gebeurtenis.

```json
{
  "event": "trytagging_begin_checkout",
  "ecommerce": {
    "currency": "EUR",
    "value": 2629.95,
    "coupon": "",
    "items": [
      {
        "item_id": "40000000000001",
        "item_sku": "sku-example-1",
        "item_name": "Example Product",
        "item_brand": "Example Shop",
        "item_category": "",
        "item_variant": "Example Product",
        "price": 2629.95,
        "item_product_id": "40000000000001",
        "item_variant_id": "8000000000001",
        "item_image": "https://cdn.shopify.com/s/files/1/0000/0000/0000/products/example-product_64x64.jpg?v=1700000000",
        "google_business_vertical": "retail",
        "quantity": 1
      }
    ]
  },
  "user_data": {
    "customer_id": "",
    "customer_email": "",
    "customer_first_name": "",
    "customer_last_name": "",
    "customer_name": "undefined undefined",
    "customer_phone": "",
    "customer_zip": "",
    "customer_address": "",
    "customer_address2": "",
    "customer_country": "NL",
    "customer_state": "",
    "customer_state_code": "",
    "customer_order_count": "0",
    "customer_total_spent": 2629.95,
    "customer_city": "",
    "customer_new": false,
    "__note": "Gebruik de customer_-velden. Andere velden zijn verouderd",
    "id": "",
    "email": "",
    "firstName": "",
    "lastName": "",
    "phone": "",
    "zip": "",
    "address1": "",
    "address2": "",
    "country": "NL",
    "province": "",
    "provinceCode": "",
    "orderCount": "0",
    "totalSpent": 2629.95,
    "city": "",
    "new_customer": false
  },
  "marketing": {
    "_ga": "GA1.1.1234567890.1700000000",
    "_ga_XXXXXXXXXX": "GS1.1.1700000000.3.1.1700000600.0.0.0",
    "user_id": "00000000-0000-4000-8000-000000000000",
    "client_id": "1234567890.1700000000",
    "session_id": "1700000000",
    "session_count": "3",
    "fbp": null,
    "fbc": null,
    "ttclid": null,
    "ttp": null,
    "gclid": null,
    "gbraid": null,
    "wbraid": null,
    "referrer": "https://example-shop.myshopify.com/",
    "utm_source": null,
    "utm_medium": null,
    "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36",
    "hostname": "example-shop.myshopify.com"
  },
  "event_time": "2025-02-15T13:42:19.517Z",
  "page_referrer": "https://example-shop.myshopify.com/products/example-product",
  "page_location": "https://example-shop.myshopify.com/checkouts/cn/CHECKOUT_TOKEN",
  "page_title": "Afrekenen - Example Shop"
}
```

Merk op dat op dit moment de klantvelden nog leeg zijn — de bezoeker heeft nog niets ingevuld. `customer_name` leest `undefined undefined` omdat het twee lege naamvelden samenvoegt.

#### `trytagging_add_address_info`

Wordt afgegaan elke keer dat de klant zijn volledige adresgegevens invult. Dit event voegt een topniveau `email` veld en een `adres` object toe naast de gebruikelijke blokken.

```json
{
  "event": "trytagging_add_address_info",
  "email": "customer@example.com",
  "address": {
    "address1": "Example Street 1",
    "address2": null,
    "city": "Amsterdam",
    "country": "NL",
    "countryCode": "NL",
    "firstName": "Jane",
    "lastName": "Doe",
    "phone": null,
    "province": null,
    "provinceCode": null,
    "zip": "1234 AB"
  },
  "ecommerce": {
    "currency": "EUR",
    "value": 2629.95,
    "coupon": "",
    "items": [
      {
        "item_id": "40000000000001",
        "item_sku": "sku-example-1",
        "item_name": "Example Product",
        "item_brand": "Example Shop",
        "item_category": "",
        "item_variant": "Example Product",
        "price": 2629.95,
        "item_product_id": "40000000000001",
        "item_variant_id": "8000000000001",
        "item_image": "https://cdn.shopify.com/s/files/1/0000/0000/0000/products/example-product_64x64.jpg?v=1700000000",
        "google_business_vertical": "retail",
        "quantity": 1
      }
    ]
  },
  "user_data": {
    "customer_id": "",
    "customer_email": "customer@example.com",
    "customer_first_name": "Jane",
    "customer_last_name": "Doe",
    "customer_name": "Jane Doe",
    "customer_phone": "",
    "customer_zip": "1234 AB",
    "customer_address": "Example Street 1",
    "customer_address2": "",
    "customer_country": "NL",
    "customer_state": "",
    "customer_state_code": "",
    "customer_order_count": "0",
    "customer_total_spent": 2629.95,
    "customer_city": "Amsterdam",
    "customer_new": false,
    "__note": "Gebruik de customer_-velden. Andere velden zijn verouderd",
    "id": "",
    "email": "customer@example.com",
    "firstName": "Jane",
    "lastName": "Doe",
    "phone": "",
    "zip": "1234 AB",
    "address1": "Example Street 1",
    "address2": "",
    "country": "NL",
    "province": "",
    "provinceCode": "",
    "orderCount": "0",
    "totalSpent": 2629.95,
    "city": "Amsterdam",
    "new_customer": false
  },
  "marketing": {
    "_ga": "GA1.1.1234567890.1700000000",
    "_ga_XXXXXXXXXX": "GS1.1.1700000000.3.1.1700000600.0.0.0",
    "user_id": "00000000-0000-4000-8000-000000000000",
    "client_id": "1234567890.1700000000",
    "session_id": "1700000000",
    "session_count": "3",
    "fbp": null,
    "fbc": null,
    "ttclid": null,
    "ttp": null,
    "gclid": null,
    "gbraid": null,
    "wbraid": null,
    "referrer": "https://example-shop.myshopify.com/",
    "utm_source": null,
    "utm_medium": null,
    "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36",
    "hostname": "example-shop.myshopify.com"
  },
  "event_time": "2025-02-15T13:42:19.517Z",
  "page_referrer": "https://example-shop.myshopify.com/products/example-product",
  "page_location": "https://example-shop.myshopify.com/checkouts/cn/CHECKOUT_TOKEN",
  "page_title": "Afrekenen - Example Shop"
}
```

#### `trytagging_add_shipping_info`

Wordt afgegaan elke keer dat de verzendmethode verandert. De `waarde` bevat nu verzendkosten, en `ecommerce` krijgt een `shipping_tier` veld.

```json
{
  "event": "trytagging_add_shipping_info",
  "email": "customer@example.com",
  "ecommerce": {
    "shipping_tier": "",
    "currency": "EUR",
    "value": 2634.9,
    "coupon": "",
    "items": [
      {
        "item_id": "40000000000001",
        "item_sku": "sku-example-1",
        "item_name": "Example Product",
        "item_brand": "Example Shop",
        "item_category": "",
        "item_variant": "Example Product",
        "price": 2629.95,
        "item_product_id": "40000000000001",
        "item_variant_id": "8000000000001",
        "item_image": "https://cdn.shopify.com/s/files/1/0000/0000/0000/products/example-product_64x64.jpg?v=1700000000",
        "google_business_vertical": "retail",
        "quantity": 1
      }
    ]
  },
  "user_data": {
    "customer_id": "",
    "customer_email": "customer@example.com",
    "customer_first_name": "Jane",
    "customer_last_name": "Doe",
    "customer_name": "Jane Doe",
    "customer_phone": "",
    "customer_zip": "1234 AB",
    "customer_address": "Example Street 1",
    "customer_address2": "",
    "customer_country": "NL",
    "customer_state": "",
    "customer_state_code": "",
    "customer_order_count": "0",
    "customer_total_spent": 2634.9,
    "customer_city": "Amsterdam",
    "customer_new": false,
    "__note": "Gebruik de customer_-velden. Andere velden zijn verouderd",
    "id": "",
    "email": "customer@example.com",
    "firstName": "Jane",
    "lastName": "Doe",
    "phone": "",
    "zip": "1234 AB",
    "address1": "Example Street 1",
    "address2": "",
    "country": "NL",
    "province": "",
    "provinceCode": "",
    "orderCount": "0",
    "totalSpent": 2634.9,
    "city": "Amsterdam",
    "new_customer": false
  },
  "marketing": {
    "_ga": "GA1.1.1234567890.1700000000",
    "_ga_XXXXXXXXXX": "GS1.1.1700000000.3.1.1700000600.0.0.0",
    "user_id": "00000000-0000-4000-8000-000000000000",
    "client_id": "1234567890.1700000000",
    "session_id": "1700000000",
    "session_count": "3",
    "fbp": null,
    "fbc": null,
    "ttclid": null,
    "ttp": null,
    "gclid": null,
    "gbraid": null,
    "wbraid": null,
    "referrer": "https://example-shop.myshopify.com/",
    "utm_source": null,
    "utm_medium": null,
    "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36",
    "hostname": "example-shop.myshopify.com"
  },
  "event_time": "2025-02-15T13:42:20.612Z",
  "page_referrer": "https://example-shop.myshopify.com/products/example-product",
  "page_location": "https://example-shop.myshopify.com/checkouts/cn/CHECKOUT_TOKEN",
  "page_title": "Afrekenen - Example Shop"
}
```

#### `trytagging_add_payment_info`

Wordt afgegaan elke keer dat de klant zijn betaalgegevens invoert en op betalen klikt. Qua structuur identiek aan het verzendevent, behalve `ecommerce` bevat `payment_type` in plaats van `shipping_tier`.

```json
{
  "event": "trytagging_add_payment_info",
  "email": "customer@example.com",
  "ecommerce": {
    "payment_type": "",
    "currency": "EUR",
    "value": 2634.9,
    "coupon": "",
    "items": [
      {
        "item_id": "40000000000001",
        "item_sku": "sku-example-1",
        "item_name": "Example Product",
        "item_brand": "Example Shop",
        "item_category": "",
        "item_variant": "Example Product",
        "price": 2629.95,
        "item_product_id": "40000000000001",
        "item_variant_id": "8000000000001",
        "item_image": "https://cdn.shopify.com/s/files/1/0000/0000/0000/products/example-product_64x64.jpg?v=1700000000",
        "google_business_vertical": "retail",
        "quantity": 1
      }
    ]
  },
  "user_data": {
    "customer_id": "",
    "customer_email": "customer@example.com",
    "customer_first_name": "Jane",
    "customer_last_name": "Doe",
    "customer_name": "Jane Doe",
    "customer_phone": "",
    "customer_zip": "1234 AB",
    "customer_address": "Example Street 1",
    "customer_address2": "",
    "customer_country": "NL",
    "customer_state": "",
    "customer_state_code": "",
    "customer_order_count": "0",
    "customer_total_spent": 2634.9,
    "customer_city": "Amsterdam",
    "customer_new": false,
    "__note": "Gebruik de customer_-velden. Andere velden zijn verouderd",
    "id": "",
    "email": "customer@example.com",
    "firstName": "Jane",
    "lastName": "Doe",
    "phone": "",
    "zip": "1234 AB",
    "address1": "Example Street 1",
    "address2": "",
    "country": "NL",
    "province": "",
    "provinceCode": "",
    "orderCount": "0",
    "totalSpent": 2634.9,
    "city": "Amsterdam",
    "new_customer": false
  },
  "marketing": {
    "_ga": "GA1.1.1234567890.1700000000",
    "_ga_XXXXXXXXXX": "GS1.1.1700000000.3.1.1700000600.0.0.0",
    "user_id": "00000000-0000-4000-8000-000000000000",
    "client_id": "1234567890.1700000000",
    "session_id": "1700000000",
    "session_count": "3",
    "fbp": null,
    "fbc": null,
    "ttclid": null,
    "ttp": null,
    "gclid": null,
    "gbraid": null,
    "wbraid": null,
    "referrer": "https://example-shop.myshopify.com/",
    "utm_source": null,
    "utm_medium": null,
    "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36",
    "hostname": "example-shop.myshopify.com"
  },
  "event_time": "2025-02-15T13:48:11.987Z",
  "page_referrer": "https://example-shop.myshopify.com/products/example-product",
  "page_location": "https://example-shop.myshopify.com/checkouts/cn/CHECKOUT_TOKEN",
  "page_title": "Afrekenen - Example Shop"
}
```

***

### Bedanktpagina

#### `trytagging_purchase`

Wordt afgegaan bij het payment-event van Shopify. Dit is het event dat je voor je conversietags moet gebruiken. `ecommerce` bevat nu `transaction_id`, `belasting` en `verzending`en `user_data.customer_id` is ingevuld omdat de bestelling een klantrecord heeft aangemaakt.

```json
{
  "event": "trytagging_purchase",
  "ecommerce": {
    "transaction_id": "6000000000001",
    "value": 2634.9,
    "tax": 0,
    "shipping": "",
    "currency": "EUR",
    "items": [
      {
        "item_id": "40000000000001",
        "item_sku": "sku-example-1",
        "item_name": "Example Product",
        "item_brand": "Example Shop",
        "item_category": "",
        "item_variant": "Default Title",
        "price": 2629.95,
        "item_product_id": "00000000000000000000000000000000",
        "item_variant_id": "8000000000001",
        "item_image": "https://cdn.shopify.com/s/files/1/0000/0000/0000/products/example-product.jpg?v=1700000000",
        "google_business_vertical": "retail",
        "quantity": 1
      }
    ]
  },
  "user_data": {
    "customer_id": "7000000000001",
    "customer_email": "customer@example.com",
    "customer_first_name": "Jane",
    "customer_last_name": "Doe",
    "customer_name": "Jane Doe",
    "customer_phone": "",
    "customer_zip": "1234 AB",
    "customer_address": "Example Street 1",
    "customer_address2": "",
    "customer_country": "NL",
    "customer_state": "",
    "customer_state_code": "",
    "customer_order_count": "0",
    "customer_total_spent": 2634.9,
    "customer_city": "Amsterdam",
    "customer_new": false,
    "__note": "Gebruik de customer_-velden. Andere velden zijn verouderd",
    "id": "7000000000001",
    "email": "customer@example.com",
    "firstName": "Jane",
    "lastName": "Doe",
    "phone": "",
    "zip": "1234 AB",
    "address1": "Example Street 1",
    "address2": "",
    "country": "NL",
    "province": "",
    "provinceCode": "",
    "orderCount": "0",
    "totalSpent": 2634.9,
    "city": "Amsterdam",
    "new_customer": false
  },
  "marketing": {
    "_ga": "GA1.1.1234567890.1700000000",
    "_ga_XXXXXXXXXX": "GS1.1.1700000000.3.1.1700000900.0.0.0",
    "user_id": "00000000-0000-4000-8000-000000000000",
    "client_id": "1234567890.1700000000",
    "session_id": "1700000000",
    "session_count": "3",
    "fbp": null,
    "fbc": null,
    "ttclid": null,
    "ttp": null,
    "gclid": null,
    "gbraid": null,
    "wbraid": null,
    "referrer": "https://example-shop.myshopify.com/",
    "utm_source": null,
    "utm_medium": null,
    "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36",
    "hostname": "example-shop.myshopify.com"
  },
  "event_time": "2025-02-15T13:48:14.579Z",
  "page_referrer": "https://example-shop.myshopify.com/",
  "page_location": "https://example-shop.myshopify.com/checkouts/cn/ORDER_TOKEN/thank_you",
  "page_title": "Bedankt voor je aankoop! - Example Shop - Checkout"
}
```

### Een paar dingen om te weten

**Waarden zijn placeholders.** Alle URL's, identificatiegegevens, namen, e-mailadressen en adressen in de bovenstaande voorbeelden zijn geanonimiseerd. De veldnamen en structuur zijn precies wat je zult ontvangen.

**`item_product_id` verandert van formaat bij aankoop.** Bij de checkout-events komt het overeen met `item_id`. Op `trytagging_purchase` is het in plaats daarvan een hash. Als je dit veld naar een tagparameter mapt, verwacht dan twee verschillende formaten en kies degene die je platform nodig heeft.

**`item_variant` verandert bij aankoop.** Bij checkout-events herhaalt het de productnaam; bij het aankoop-event komt het uit de Shopify-varianttitel, die `Default Title` is voor producten met één variant.

**Sommige parameters kunnen leeg doorgegeven worden.** `shipping_tier`, `payment_type`, `coupon` en `verzending` zijn lege strings in deze voorbeelden. Als je GA4-rapporten voor deze items lege waarden tonen, is dat de reden. Stel een fallback in je variabelen in als je een waarde nodig hebt.

**`device` wordt niet ingevuld.** De sandbox van Shopify geeft geen apparaatinformatie vrij, vandaar `"__not_supported": true`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.adpage.io/documentation/documentation-nl/website-integraties/shopify/datalayer-gebeurtenissen-in-de-shopify-customer-events-pixel.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
