Using Data Layer with Greenback
Greenback data available
Here is a full list of the events and data available.
Event name | When it’s fired | Event details |
---|---|---|
greenback.view | upon widget load | |
greenback.opened | upon widget opened | |
greenback.1stMessageSent | upon the first message sent | |
greenback.productRecommended | upon product recommended | |
greenback.productClick | upon product clicked in the recommendation | |
greenback.addToCart | upon clicking the add to cart button | |
greenback.closed | upon widget closed |
Event details
greenback view
event name: greenback.view
This event is fired whenever the greenback widget is loaded. It will fire each time the widget is viewed.
Data variable | example | Description |
---|---|---|
greenback.visitorId |
| the visitor’s device ID |
greenback.sessionId |
| the visitor’s session ID |
greenback.page |
| the page URL of the widget was loaded |
greenback opened
event name: greenback.opened
This event is fired when the Greenback widget trigger is clicked and the chat window opens.
Data variable | example | Description |
---|---|---|
greenback.visitorId |
| the visitor’s device ID |
greenback.sessionId |
| the visitor’s session ID |
greenback.page |
| the page URL of the widget was loaded |
greenback 1st message sent
event name: greenback.1stMessageSent
This event is fired when the first message from user is sent.
Data variable | example | Description |
---|---|---|
greenback.visitorId |
| the visitor’s device ID |
greenback.sessionId |
| the visitor’s session ID |
greenback.page |
| the page URL of the widget was loaded |
greenback.message |
| first message content |
greenback products recommended
event name: greenback.productsRecommended
Data variable | example | Description |
---|---|---|
greenback.visitorId |
| the visitor’s device ID |
greenback.sessionId |
| the visitor’s session ID |
greenback.page |
| the page URL of the widget was loaded |
greenback.message |
| the message that triggered the product recommendation |
greenback.products(array) |
| all the products recommended by greenback |
greenback product click
event name: greenback.productClick
Data variable | example | Description |
---|---|---|
greenback.visitorId |
| the visitor’s device ID |
greenback.sessionId |
| the visitor’s session ID |
greenback.page |
| the page URL of the widget was loaded |
greenback.id |
| the SKU of the product clicked |
greenback.name |
| the name of the product clicked |
greenback.price |
| the price of the product clicked |
greenback.position |
| the position of the product ranked in the recommended products |
greenback add-to-cart
event name: greenback.addToCart
Data variable | example | Description |
---|---|---|
greenback.visitorId |
| the visitor’s device ID |
greenback.sessionId |
| the visitor’s session ID |
greenback.page |
| the page URL of the widget was loaded |
greenback.id |
| the SKU of the product added to the cart |
greenback.name |
| the name of the product added to the cart |
greenback.price |
| the price of the product added to the cart |
greenback closed
event name: greenback.closed
Data variable | example | Description |
---|---|---|
greenback.visitorId |
| the visitor’s device ID |
greenback.sessionId |
| the visitor’s session ID |
greenback.page |
| the page URL of the widget was loaded |