Skip to main content
All CollectionsDirectMarketing
Deliverect Direct: Track Visitor Behavior and Activity
Deliverect Direct: Track Visitor Behavior and Activity
Updated over a week ago

Keep track of your visitors' actions on your Online Ordering site using Google Tag Manager.

Add your GTM tag

Step 1. Log in to Deliverect Direct. In the sidebar, Select Marketing ① and then Tracking ②.

Step 2. Enter your GTM tag and select the Save button.

Available events

Events fired to your Google Tag Manager container.

Event name

Description and data

add_payment_info

The user adds payment information.

  • option

  • anonymousId

  • userId (if identified)

Payload example

window.dataLayer.push({
event: "add_payment_info",
ecommerce: {
checkout: {
actionField: {
option: "CASH"
}
}
},
anonymousId: "ANONYMOUS_ID"
});

add_to_cart

The user adds an item to their basket.

  • id

  • name

  • price

  • quantity

  • total

  • anonymousId

  • userId (if identified)

Payload example

window.dataLayer.push({
event: "add_to_cart",
ecommerce: {
add: {
products: [
{
id: "ITEM_ID",
name: "ITEM_NAME",
price: ITEM_PRICE,
quantity: ITEM_QUANTITY,
total: ITEM_TOTAL
}
]
}
},
anonymousId: "ANONYMOUS_ID"
});

identify_user

The user is identified.

  • userId

  • anonymousId

Payload example

window.dataLayer.push({
event: "identify_user",
userId: "USER_ID"
anonymousId: "ANONYMOUS_ID",
});

initiate_checkout

The user starts the checkout process.

  • coupon

  • total

  • products

    • id

    • name

    • price

    • quantity

    • total

  • currency

  • anonymousId

  • userId (if identified)

Payload example

window.dataLayer.push({
event: "initiate_checkout",
ecommerce: {
checkout: {
actionField: {
coupon: "DISCOUNT_CODE",
total: CHECKOUT_TOTAL
},
products: [
{
id: "ITEM_ID",
name: "ITEM_NAME",
price: ITEM_PRICE,
quantity: ITEM_QUANTITY,
total: ITEM_TOTAL
}
]
}
},
currency: "CURRENCY",
anonymousId: "ANONYMOUS_ID"
});

page_view

The user loads any page.

  • url

  • name

  • anonymousId

  • userId (if identified)

Payload example

window.dataLayer.push({
event: "page_view",
page: {
url: "TARGET_ROUTE_PATH",
name: "TARGET_ROUTE_NAME"
},
anonymousId: "ANONYMOUS_ID",
});

place_order

The user places an order.

  • id

  • revenue

  • tax

  • shipping

  • tips

  • discount

  • loyalty

  • serviceCharges

  • coupon

  • fulfillment

  • channel

  • products

    • id

    • name

    • price

    • quantity

    • total

  • currency

  • anonymousId

  • userId (if identified)

Payload example

window.dataLayer.push({
event: "place_order",
ecommerce: {
purchase: {
actionField: {
id: "ORDER_UID",
revenue: ORDER_TOTAL,
tax: ORDER_TAX,
shipping: DELIVERY_FEE,
tips: TIP_AMOUNT,
discount: DISCOUNT_AMOUNT,
loyalty: LOYALTY_AMOUNT,
serviceCharges: SERVICE_CHARGES_TOTAL,
coupon: "DISCOUNT_CODE",
fulfillment: "ORDERING_MODE",
channel: "SALES_CHANNEL"
},
products: [
{
id: "ITEM_ID",
name: "ITEM_NAME",
price: ITEM_PRICE,
quantity: ITEM_QUANTITY,
total: ITEM_TOTAL
}
]
}
},
currency: "CURRENCY",
anonymousId: "ANONYMOUS_ID"
});

order_failure

The order is placed but fails after an attempt at capturing payment.

  • id

  • reason

  • anonymousId

  • userId (if identified)

Payload example

window.dataLayer.push({
event: "order_failure",
ecommerce: {
purchase: {
actionField: {
id: "ORDER_UID",
reason: "FAILURE_REASON"
}
}
},
anonymousId: "ANONYMOUS_ID"
});

order_success

The order is placed and the payment is complete.

  • id

  • anonymousId

  • userId (if identified)

Payload example

window.dataLayer.push({
event: "order_success",
ecommerce: {
purchase: {
actionField: {
id: "ORDER_UID"
}
}
},
anonymousId: "ANONYMOUS_ID"
});

remove_from_cart

This event is fired when a user removes an item from the basket.

  • id

  • name

  • price

  • quantity

  • anonymousId

  • userId (if identified)

Payload example

window.dataLayer.push({
event: "remove_from_cart",
ecommerce: {
remove: {
products: [
{
id: "ITEM_ID",
name: "ITEM_NAME",
price: ITEM_PRICE,
quantity: ITEM_QUANTITY
}
]
}
},
anonymousId: "ANONYMOUS_ID"
});

select_tip_amount

The user selects a tip amount for an order.

  • amount

  • anonymousId

  • userId (if identified)

Payload example

window.dataLayer.push({
event: "select_tip_amount",
ecommerce: {
checkout: {
actionField: {
amount: TIP_AMOUNT
}
}
},
anonymousId: "ANONYMOUS_ID"
});

view_item

The user views an item.

  • id

  • name

  • price

  • anonymousId

  • userId (if identified)

Payload example

window.dataLayer.push({
event: "view_item",
ecommerce: {
detail: {
products: [
{
id: "ITEM_ID",
name: "ITEM_NAME",
price: ITEM_PRICE
}
]
}
},
anonymousId: "ANONYMOUS_ID"
});

view_menu

The user views a menu.

  • id

  • slug

  • anonymousId

  • userId (if identified)

Payload example

window.dataLayer.push({
event: "view_menu",
menu: {
id: "MENU_ID",
slug: "MENU_SLUG"
},
anonymousId: "ANONYMOUS_ID"
});

Did this answer your question?