Skip to main content

DataLayer Schema

This is an up-to-date schema of the Shoptet DataLayer. You can access directly the dataLayer[0].shoptet object or use function getShoptetDataLayer() in the console.

Loading ....

Source

{
"type": "object",
"properties": {
"order": {
"$ref": "#/definitions/Order"
},
"customer": {
"$ref": "#/definitions/Customer"
},
"category": {
"$ref": "#/definitions/Category"
},
"cart": {
"type": "array",
"items": {
"$ref": "#/definitions/CartItem"
}
},
"cartInfo": {
"$ref": "#/definitions/CartInfo"
},
"pageType": {
"$ref": "#/definitions/PageTypes"
},
"currency": {
"type": "string"
},
"currencyInfo": {
"type": "object",
"properties": {
"decimalSeparator": {
"type": "string"
},
"exchangeRate": {
"type": "number"
},
"priceDecimalPlaces": {
"type": "number"
},
"symbol": {
"type": "string"
},
"symbolLeft": {
"type": "number"
},
"thousandSeparator": {
"type": "string"
}
},
"required": [
"decimalSeparator",
"exchangeRate",
"priceDecimalPlaces",
"symbol",
"symbolLeft",
"thousandSeparator"
]
},
"language": {
"type": "string"
},
"projectId": {
"type": "number"
},
"traffic_type": {
"anyOf": [
{
"const": "internal",
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"currency",
"currencyInfo",
"language",
"pageType",
"projectId"
],
"definitions": {
"Order": {
"type": "object",
"properties": {
"orderNo": {
"type": "string"
},
"storeName": {
"type": "string"
},
"total": {
"type": "number"
},
"totalWithoutVat": {
"type": "number"
},
"shipping": {
"type": "number"
},
"shippingWithoutVat": {
"type": "number"
},
"shippingTax": {
"description": "The tax of the shipping",
"type": "number"
},
"netto": {
"type": "number"
},
"tax": {
"type": "number"
},
"city": {
"type": "string"
},
"district": {
"type": "string"
},
"country": {
"type": "string"
},
"countryCode": {
"type": "string"
},
"estimatedDeliveryDate": {
"type": "string",
"format": "date-time"
},
"content": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": [
"null",
"number"
]
},
"sku": {
"type": "string"
},
"name": {
"type": "string"
},
"variant": {
"type": "string"
},
"price": {
"type": "number"
},
"priceRatio": {
"type": "number"
},
"totalPrice": {
"type": "object",
"properties": {
"withoutVat": {
"type": "number"
},
"withVat": {
"type": "number"
}
},
"required": [
"withVat",
"withoutVat"
]
},
"quantity": {
"type": "number"
},
"category": {
"type": "string"
}
},
"required": [
"category",
"id",
"name",
"price",
"priceRatio",
"quantity",
"sku",
"totalPrice",
"variant"
]
}
},
"currencyCode": {
"type": "string"
},
"discountCoupons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"code",
"id",
"name"
]
}
}
},
"required": [
"city",
"content",
"country",
"countryCode",
"currencyCode",
"discountCoupons",
"district",
"estimatedDeliveryDate",
"netto",
"orderNo",
"shipping",
"shippingTax",
"shippingWithoutVat",
"storeName",
"tax",
"total",
"totalWithoutVat"
]
},
"Customer": {
"type": "object",
"properties": {
"guid": {
"type": "string"
},
"email": {
"type": "string"
},
"fullName": {
"type": [
"null",
"string"
]
},
"priceRatio": {
"description": "Price ratio of the discount",
"minimum": 0,
"maximum": 1,
"type": "float"
},
"priceListId": {
"type": "number"
},
"groupId": {
"type": [
"null",
"number"
]
},
"registered": {
"type": "boolean"
},
"mainAccount": {
"type": "boolean"
}
},
"required": [
"groupId",
"mainAccount",
"priceListId",
"priceRatio",
"registered"
]
},
"Category": {
"type": "object",
"properties": {
"guid": {
"type": [
"null",
"string"
]
},
"path": {
"type": "string"
},
"parentCategoryGuid": {
"type": [
"null",
"string"
]
}
},
"required": [
"guid",
"parentCategoryGuid",
"path"
]
},
"CartItem": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"guid": {
"description": "The unique identifier of the product",
"type": "string"
},
"priceId": {
"type": "number"
},
"quantity": {
"type": "number"
},
"priceWithVat": {
"type": "number"
},
"priceWithoutDiscount": {
"type": "number"
},
"discounts": {},
"itemId": {
"type": "string"
},
"name": {
"type": "string"
},
"weight": {
"description": "The weight of the product",
"minimum": 0,
"type": "integer"
}
},
"required": [
"code",
"discounts",
"guid",
"itemId",
"name",
"priceId",
"priceWithVat",
"priceWithoutDiscount",
"quantity",
"weight"
]
},
"CartInfo": {
"type": "object",
"properties": {
"freeShipping": {
"type": "boolean"
},
"leftToFreeGift": {
"type": "object",
"properties": {
"formattedPrice": {
"type": "string"
},
"priceLeft": {
"type": "number"
}
},
"required": [
"formattedPrice",
"priceLeft"
]
},
"freeGift": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"selected": {
"type": "boolean"
}
},
"required": [
"code",
"selected"
]
}
},
{
"const": false,
"type": "boolean"
}
]
},
"leftToFreeShipping": {
"type": "object",
"properties": {
"formattedPrice": {
"type": "string"
}
},
"required": [
"formattedPrice"
]
},
"discountCoupon": {
"anyOf": [
{
"type": "array",
"minItems": 0,
"maxItems": 0
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"id": {
"type": "number"
}
},
"required": [
"code",
"id"
]
}
}
]
},
"getNoBillingShippingPrice": {
"type": "object",
"properties": {
"withVat": {
"type": "number"
},
"withoutVat": {
"type": "number"
},
"vat": {
"type": "number"
}
},
"required": [
"vat",
"withVat",
"withoutVat"
]
},
"cartItems": {
"type": "array",
"items": {
"$ref": "#/definitions/CartItem"
}
},
"taxMode": {
"type": "string"
},
"trackingContainer": {
"type": "string"
}
},
"required": [
"cartItems",
"discountCoupon",
"freeGift",
"freeShipping",
"getNoBillingShippingPrice",
"leftToFreeGift",
"leftToFreeShipping",
"taxMode"
]
},
"PageTypes": {
"enum": [
"article",
"billingAndShipping",
"cart",
"category",
"customerDetails",
"homepage",
"parametricCategory",
"productDetail",
"section",
"thankYou",
"unknown"
],
"type": "string"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}