When a user opens a product page in your mobile app, indicating their interest in a specific item.
import AntsomiRnSDK from '@antsomicorp/antsomirnsdk'; const items: Record<string, any>[] = []; // Replace the object productDetail and userData with your object items.add({ type: "product", id: productDetail.sku, name: productDetail.name, sku: productDetail.sku, price: +productDetail?.salePrice, original_price: +productDetail?.price }); const event: CDPEvent = { en: "view_product", items: items, customerProps: { customer_id: MD5Hash().generateMd5(userData.email ?? ''), name: userData.name } }; await AntsomiRnSDK.track(event);
Last updated 7 months ago