Purchase

When purchase happens, page opens, fire the following event

Copy

MagicPixel.recordEvent('mp_purchase', {
    currency: 'INR', // can be hard coded to INR
    cart_id: '<generated cart id for kartmax>',
    transaction_id: '<ketch order id KETCH00XXXX>',
    value: 1233.33, // total value of the items
    coupon: '<coupon code if any>', // leave as undefined if no coupon is applicable
    shipping: 123.33, // shipping amount as flat
    tax: 123.33, // tax amount as float
    items: [{\
        item_id: '<item id>',\
        item_name: '<product name>',\
        item_sku: '<style id of the item>',\
        price: 1.23, // float price\
        quantity: 1, // integer quantity\
        item_category: '<item category>',\
        index: 1, // since this is view item, hard coded to 1\
        options: {\
             // optional - options can be used to provide any additional product attributes\
        }\
    }, {\
        item_id: '<item id>',\
        item_name: '<product name>',\
        item_sku: '<style id of the item>',\
        price: 1.23, // float price\
        quantity: 1, // integer quantity\
        item_category: '<item category>',\
        index: 2, // since this is view item, hard coded to 1\
        options: {\
             // optional - options can be used to provide any additional product attributes\
        }\
    }]
});

PreviousAdd Shipping Info NextQuick Buy

Last updated 1 year ago