All Collections
Manual Installation
UpStackified JS Event SDK documentation
UpStackified JS Event SDK documentation

UpStackified JS SDK Tracking Event Documentation

Updated over a week ago

All events are tracked by calling UpStackified Pixel's _upstack('track') function, with the event name, and (optionally) a JSON object as its parameters.

For example, here's a function call to track when a visitor has completed a purchase event, with currency and value included as a parameter:

_upstack('track', 'purchase', {currency: 'USD', value: 30.00});

Add to Cart Example:

_upstack('track', 'add_to_cart', {
value: 115.00,
currency: 'USD',
items: [{
id: '301',
price: 39.99,
quantity: 1,
content_type: 'product',
id: '401',
price: 39.99,
quantity: 2,
content_type: 'product',

List of Standard Events:

export declare enum TRACKING_EVENT_NAME {
ADD_PAYMENT_INFO = "add_payment_info",
ADD_SHIPPING_INFO = "add_shipping_info",
ADD_TO_CART = "add_to_cart",
ADD_TO_WISHLIST = "add_to_wishlist",
COMPLETE_REGISTRATION = "complete_registration",
CONTACT = "contact",
INITIATE_CHECKOUT = "initiate_checkout",
LEAD = "lead",
LOGIN = "login",
PAGE_VIEW = "page_view",
PAGE_TIME = "page_time",
PURCHASE = "purchase",
REFUND = "refund",
SEARCH = "search",
START_TRIAL = "start_trial",
SUBMIT_APPLICATION = "submit_application",
SUBSCRIBE = "subscribe",
SIGN_UP = "sign_up",
VIEW_CART = "view_cart",
VIEW_CONTENT = "view_content",
SELECT_SHIPPING_METHOD = "select_shipping_method",
VIRTUALIZED_VIEWED_PAYMENT_FORM = "virtualized_viewd_payment_form"

Optional Event Data Parameters:

export interface TrackingEventData {
[key: string]: any;
firstName?: string;
lastName?: string;
email?: string;
phone?: string;
addresses?: AddressInfo[];
cartId?: string;
transactionId?: string;
orderId?: string;
orderName?: string;
affiliation?: string;
currency?: string;
price?: number;
subtotalPrice?: number;
value?: number;
tax?: number;
shipping?: number;
discount?: number;
coupon?: string;
paymentType?: string;
shippingTier?: string;
creativeName?: string;
creativeSlot?: string;
locationId?: string;
promotionId?: string;
promotionName?: string;
items?: GenericContent[];

export interface GenericContent {
[key: string]: any;
content_type?: string;
id?: string;
name?: string;
sku?: string;
brand?: string;
variant?: string;
coupon?: string;
currency?: string;
discount?: number;
index?: number;
value?: number;
price?: number;
quantity?: number;
url?: string;
locationId?: string;
imageUrl?: string;
category?: string;
category2?: string;
category3?: string;
category4?: string;
category5?: string;
Did this answer your question?