Google Tag Manager Data Layer for Shopify
Events
Product Impressions
The “impressions” event is pushed into the data layer when the user sees a collection page or a search results page.
{ "ecommerce": { "currencyCode": "EUR", "impressions": [ { "name": "Blue Silk Tuxedo", "id": "12345", "price": "15.25", "brand": "Shopify", "category": "Apparel", "variant": "Gray", "list": "Search Results", "position": 1, "productId": "5654568337561", "variantId": "36188836987033" } ] }}
Product Clicks
The “productClick” event is pushed into the data layer when the user clicks on a product link in a collection page or a search results page.
{ "event": "productClick", "ecommerce": { "click": { "actionField": { "list": "Search Results" }, "products": [{ "name": "Blue Silk Tuxedo", "id": "12345", "price": "15.25", "brand": "Shopify", "category": "Apparel", "variant": "Gray", "position": 1, "productId": "5654568337561", "variantId": "36188836987033" }] } }}
Product Detail View
The “detail” event is pushed into the data layer when the user lands on a product page.
{ "event": "productDetailView", "ecommerce": { "detail": { "actionField": { "list": "Apparel Gallery" }, "products": [{ "name": "Blue Silk Tuxedo", "id": "12345", "price": "15.25", "brand": "Shopify", "category": "Apparel", "variant": "Gray", "productId": "5654568337561", "variantId": "36188836987033" }] } }}
Add to cart
The “addToCart” event is pushed into the data layer when the user adds a product into the cart.
{ "event": "addToCart", "ecommerce": { "currencyCode": "EUR", "add": { "products": [{ "name": "Blue Silk Tuxedo", "id": "12345", "price": "15.25", "brand": "Shopify", "category": "Apparel", "variant": "Gray", "quantity": 1, "productId": "5654568337561", "variantId": "36188836987033" }] } }}
Remove from cart
The “removeFromCart” event is pushed into the data layer when the user removes a product from the cart.
{ "event": "removeFromCart", "ecommerce": { "remove": { "products": [{ "name": "Blue Silk Tuxedo", "id": "12345", "price": "15.25", "brand": "Shopify", "category": "Apparel", "variant": "Gray", "quantity": 1, "productId": "5654568337561", "variantId": "36188836987033" }] } }}
Checkout
The “checkout” event is pushed into the data layer when the user starts the checkout process.
{ "event": "checkout", "ecommerce": { "checkout": { "actionField": { "step": 1 }, "products": [{ "name": "Blue Silk Tuxedo", "id": "12345", "price": "15.25", "brand": "Shopify", "category": "Apparel", "variant": "Gray", "quantity": 1, "productId": "5654568337561", "variantId": "36188836987033" }] } }}
Purchase
The purchase event is pushed into the data layer on when the user lands on the order “Thank You” page for the first time.
{ "event": "transactionComplete", "ecommerce": { "purchase": { "actionField": { "id": "12345", "affiliation": "Online Store", "revenue": "35.43", "tax":"4.90", "shipping": "5.99", "coupon": "SUMMER_SALE" }, "products": [{ "name": "Blue Silk Tuxedo", "id": "12345", "price": "15.25", "brand": "Shopify", "category": "Apparel", "variant": "Gray", "quantity": 1, "coupon": "", "productId": "5654568337561", "variantId": "36188836987033" }] } }}