Skip to content

Instantly share code, notes, and snippets.

@ceaksan
Last active July 15, 2023 11:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ceaksan/29f7c730480e97b0ebc385e2a991ba3f to your computer and use it in GitHub Desktop.
Save ceaksan/29f7c730480e97b0ebc385e2a991ba3f to your computer and use it in GitHub Desktop.
dataLayer.push({
event: "select_content",
eventModel: {
event_action: "Product Click",
event_category: "Enhanced Ecommerce - Stores",
event_label: "Bu bir ürün",
content_type: "product",
items: [
{
id: "1917d53b-2528-476d-8f9c-45424a839971",
name: "Bu bir ürün",
list_name: "Grid Gallery",
category: "All Products",
list_position: 2,
price: 10,
sku: "364115376135191"
}
]
}
});
dataLayer.push({
event: "view_item",
eventModel: {
event_action: "View Content",
event_category: "Enhanced Ecommerce - Stores",
event_label: "Bu bir ürün",
items: [
{
category: "All Products",
id: "1917d53b-2528-476d-8f9c-45424a839971",
name: "Bu bir ürün",
price: 10,
sku: "364115376135191"
}
]
}
});
dataLayer.push({
event: "add_to_cart",
eventModel: {
currency: "TRY",
event_action: "Add to Cart",
event_category: "Enhanced Ecommerce - Stores",
event_label: "Bu bir ürün",
items: [
{
category: "All Products",
id: "1917d53b-2528-476d-8f9c-45424a839971",
quantity: 1,
name: "Bu bir ürün",
sku: "364115376135191",
price: 10
}
]
}
});
dataLayer.push({
event: "remove_from_cart",
eventModel: {
currency: "TRY",
event_action: "Remove from Cart",
event_category: "Enhanced Ecommerce - Stores",
event_label: "Bu bir ürün",
items: [{ name: "Bu bir ürün", category: "All Products", price: 20, quantity: 1 }]
}
});
dataLayer.push({
event: "begin_checkout",
eventModel: {
currency: "TRY",
event_action: "Initiate Checkout",
event_category: "Enhanced Ecommerce - Stores",
items: [
{
id: "1917d53b-2528-476d-8f9c-45424a839971",
name: "Bu bir ürün",
category: "All Products",
price: 10,
quantity: 1
}
]
}
});
dataLayer.push({
event: "checkout_progress",
eventModel: {
checkout_step: 3,
event_action: "Start Payment",
event_category: "Enhanced Ecommerce - Stores",
items: []
}
});
dataLayer.push({
event: "add_payment_info",
eventModel: {
checkout_step: 4,
checkout_option: "offline",
event_action: "Add Payment Info",
event_category: "Enhanced Ecommerce - Stores"
}
});
dataLayer.push({
event: "purchase",
eventModel: {
value: 61.8,
id: 10012,
currency: "TRY",
transaction_id: 10012,
event_action: "Purchase",
event_category: "Enhanced Ecommerce - Stores",
items: [
{
id: "1917d53b-2528-476d-8f9c-45424a839971",
sku: "364115376135191",
name: "Bu bir ürün",
price: 10,
quantity: 1,
category: "All Products"
}
]
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment