load
This event is triggered when the widget loads for the first time.
Buyback.event('load', (data) => {
console.log("Widget Loaded");
});
Available Data:
{
"title": "Reusely Widget",
"location": "https://delightful-tapioca-f59bff.netlify.app/",
"path": "/"
}
view_tem
Triggered when a user chooses a product until selecting the condition.
Buyback.event('view_item', (data) => {
console.log("Item Viewed");
});
Available Data:
{
"carts": [
{
"slug": "1753322140557_269361_7573",
"product_id": 269361,
"condition_id": 7573,
"name": "Samsung Galaxy A35 5G",
"description": "Unlocked 128GB 6GB RAM condi",
"qty": 1,
"price": "76.00",
"thumbnail": "https://storage.skulytics.io/reusely/models/galaxy-a-series-a35-5g.webp",
"notes": "",
"mailin": true,
"instore": true
}
],
"total": "76",
"currency": "USD"
}
add_to Cart
Triggered when a product is added to the cart
Buyback.event('add_to_cart', (data) => {
console.log("Item added");
});
Available Data:
{
"total": "76",
"currency": "USD"
}
remove_from_cart
Triggered when an item is removed from the cart
Buyback.event('remove_from_cart', (data) => {
console.log("Item removed");
});
Available Data:
{
"carts": [
{
"slug": "1753322140557_269361_7573",
"product_id": 269361,
"condition_id": 7573,
"name": "Samsung Galaxy A35 5G",
"description": "Unlocked 128GB 6GB RAM condi",
"qty": 1,
"price": "76.00",
"thumbnail": "https://storage.skulytics.io/reusely/models/galaxy-a-series-a35-5g.webp",
"notes": "",
"mailin": true,
"instore": true
}
],
"total": "76",
"currency": "USD"
}
view_cart
Triggered when a user has finished selecting the item, conditions, and trade-in options.
Buyback.event('view_cart', (data) => {
console.log("Cart Viewed");
});
Available Data:
{
"carts": [
{
"slug": "1753322140557_269361_7573",
"product_id": 269361,
"condition_id": 7573,
"name": "Samsung Galaxy A35 5G",
"description": "Unlocked 128GB 6GB RAM condi",
"qty": 1,
"price": "76.00",
"thumbnail": "https://storage.skulytics.io/reusely/models/galaxy-a-series-a35-5g.webp",
"notes": "",
"mailin": true,
"instore": true
}
],
"total": "76",
"currency": "USD"
}
generate_lead
If the Collect Lead (Lead Booster) setting is enabled, the event will be triggered when a user enters an email after the condition selection. If the Collect Lead (Lead Booster) setting is disabled, the event will be triggered when a user fills in an email on the checkout form (last step of the widget)
Buyback.event('generate_lead' = (data) => {
console.log("Leads Saved");
});
Available Data:
{
"total": "1000",
"currency": "USD"
}
begin_checkout
Triggered when a user begins the checkout process by entering the required information.
Buyback.event('begin_checkout', (data) => {
console.log("Item Checkout");
});
Available Data:
{
"carts": [
{
"slug": "1753322140557_269361_7573",
"product_id": 269361,
"condition_id": 7573,
"name": "Samsung Galaxy A35 5G",
"description": "Unlocked 128GB 6GB RAM condi",
"qty": 1,
"price": "76.00",
"thumbnail": "https://storage.skulytics.io/reusely/models/galaxy-a-series-a35-5g.webp",
"notes": "",
"mailin": true,
"instore": true
}
],
"total": "76",
"currency": "USD"
}
add_payout_info
Triggered when a user chooses payout method.
Buyback.event('add_payout_info' = (data) => {
console.log("Payout Info Added");
});
Available Data:
{
"carts": [
{
"slug": "1753342553709_269361_7573",
"product_id": 269361,
"condition_id": 7573,
"name": "Samsung Galaxy A35 5G",
"description": "Unlocked 128GB 6GB RAM condi",
"qty": 1,
"price": "76.00",
"thumbnail": "https://storage.skulytics.io/reusely/models/galaxy-a-series-a35-5g.webp",
"notes": "",
"mailin": true,
"instore": true
}
],
"total": "76",
"payment": "Choose Later",
"currency": "USD"
}
add_shipping_info
Triggered when a user enters a shipping address or delivery details whether the shipping label is being generated or not.
Buyback.event('add_shipping_info') = (data) => {
console.log("Widget Loaded");
});
Available Data:
{
"carts": [
{
"slug": "1753342553709_269361_7573",
"product_id": 269361,
"condition_id": 7573,
"name": "Samsung Galaxy A35 5G",
"description": "Unlocked 128GB 6GB RAM condi",
"qty": 1,
"price": "76.00",
"thumbnail": "https://storage.skulytics.io/reusely/models/galaxy-a-series-a35-5g.webp",
"notes": "",
"mailin": true,
"instore": true
}
],
"total": "76",
"shipping": "USPS-Priority",
"currency": "USD"
}
checkout
Triggered when user finishes the order (successfully completes the trade-in process).
Buyback.event('checkout' = (data) => {
console.log("Offer Saved");
});
Available Data:
{
"box_id": "ADIT51CJS",
"carts": [
{
"slug": "1753342553709_269361_7573",
"product_id": 269361,
"condition_id": 7573,
"name": "Samsung Galaxy A35 5G",
"description": "Unlocked 128GB 6GB RAM condi",
"qty": 1,
"price": "76.00",
"thumbnail": "https://storage.skulytics.io/reusely/models/galaxy-a-series-a35-5g.webp",
"notes": "",
"mailin": true,
"instore": true
}
],
"total": "76.00",
"currency": "USD",
"name": "Gerald Testing",
"email": "[email protected]",
"address": "10600 Highland Springs Ave, Beaumont, CA 92223"
}