Skip to content

Pre-defined Events ​

Pre-defined events integrate with Markopolo platform features like product catalog sync, revenue attribution, and abandoned cart campaigns.

Event Names (PascalCase) ​

All event type values must be PascalCase:

EventPlatform Feature
ViewContentAudience segmentation
ViewItemProduct catalog sync
LoginEngagement tracking
SignUpNew user tracking
CompleteRegistrationOnboarding completion
StartTrialTrial conversions
AddPaymentInfoCheckout funnel
AddShippingInfoCheckout funnel
ViewCartCart tracking
AddToCartCart abandonment campaigns
AddToWishlistWishlist tracking
RemoveFromCartCart tracking
BeginCheckoutCheckout funnel
PurchaseRevenue attribution
RefundRefund tracking
SearchSearch analytics
ShareShare tracking
SubscribeSubscription tracking
LeadLead optimization
SubmitApplicationApplication tracking
ContactContact form tracking
DonateDonation tracking
ScheduleAppointment tracking
FcmPush notifications

Product Object ​

Used in events that accept a products array:

KeyTypeRequiredDescription
idstring✅Unique product ID
namestring❌Product name
categorystring❌eg. "Apparel, Men's Clothing"
quantitynumber❌Quantity
pricenumber❌Original price
discountednumber❌Final price after discount
discountnumber❌⚠️ Deprecated — use discounted
descriptionstring❌Product description
couponstring❌Coupon code
image_urlstring❌Product image URL
product_urlstring✅Product page URL
variantsarray❌Array of { attributes, price: { original, discounted?, currency }, isAvailable }

ViewContent ​

js
mtag("event", {
  type: "ViewContent",
  email: "john@example.com",   // Optional
  phone: "+13425784032",       // Optional
});

ViewItem ​

js
mtag("event", {
  type: "ViewItem",
  email: "john@example.com",
  phone: "+13425784032",
  value: 40.0,
  currency: "USD",
  products: [
    {
      id: "SKU-345",
      name: "Formal Shirt",
      category: "Apparel, Men's Clothing",
      quantity: 2,
      price: 10.0,
      discounted: 8.0,
    },
  ],
});

Login ​

js
mtag("event", {
  type: "Login",
  email: "john@example.com",
  phone: "+13425784032",
});

SignUp ​

js
mtag("event", {
  type: "SignUp",
  email: "john@example.com",
  phone: "+13425784032",
});

CompleteRegistration ​

js
mtag("event", {
  type: "CompleteRegistration",
  email: "john@example.com",
  phone: "+13425784032",
});

StartTrial ​

js
mtag("event", {
  type: "StartTrial",
  email: "john@example.com",
  phone: "+13425784032",
  value: 40.0,
  currency: "USD",
  products: [{ id: "SKU-345", name: "Formal Shirt", price: 10.0 }],
});

AddPaymentInfo ​

js
mtag("event", {
  type: "AddPaymentInfo",
  email: "john@example.com",
  phone: "+13425784032",
  payment_type: "Credit Card",   // Optional
  value: 40.0,
  currency: "USD",
  products: [{ id: "SKU-345", name: "Formal Shirt", price: 10.0 }],
});

AddShippingInfo ​

js
mtag("event", {
  type: "AddShippingInfo",
  email: "john@example.com",
  phone: "+13425784032",
  shipping_tier: "GROUND",   // Optional
  value: 40.0,
  currency: "USD",
  products: [{ id: "SKU-345", name: "Formal Shirt", price: 10.0 }],
});

ViewCart ​

js
mtag("event", {
  type: "ViewCart",
  email: "john@example.com",
  phone: "+13425784032",
  value: 40.0,
  currency: "USD",
  products: [{ id: "SKU-345", name: "Formal Shirt", price: 10.0 }],
  cart_state: {
    products: [{ id: "SKU-345", quantity: 2 }],
  },
});

AddToCart ​

js
mtag("event", {
  type: "AddToCart",
  email: "john@example.com",
  phone: "+13425784032",
  value: 40.0,
  currency: "USD",
  products: [{ id: "SKU-345", name: "Formal Shirt", price: 10.0 }],
  cart_state: {
    products: [
      { id: "SKU-345", quantity: 2 },
      { id: "SKU-346", quantity: 1 },
    ],
  },
});

AddToWishlist ​

js
mtag("event", {
  type: "AddToWishlist",
  email: "john@example.com",
  phone: "+13425784032",
  value: 40.0,
  currency: "USD",
  products: [{ id: "SKU-345", name: "Formal Shirt", price: 10.0 }],
});

RemoveFromCart ​

js
mtag("event", {
  type: "RemoveFromCart",
  email: "john@example.com",
  phone: "+13425784032",
  value: 40.0,
  currency: "USD",
  products: [{ id: "SKU-345", name: "Formal Shirt", price: 10.0 }],
  cart_state: {
    products: [{ id: "SKU-346", quantity: 1 }],
  },
});

BeginCheckout ​

js
mtag("event", {
  type: "BeginCheckout",
  email: "john@example.com",
  phone: "+13425784032",
  value: 40.0,
  currency: "USD",
  shipping_cost: 5.0,   // Optional
  tax: 2.5,             // Optional
  products: [{ id: "SKU-345", name: "Formal Shirt", price: 10.0 }],
});

Purchase ​

js
mtag("event", {
  type: "Purchase",
  email: "john@example.com",
  phone: "+13425784032",
  value: 40.0,
  currency: "USD",
  shipping_cost: 5.0,        // Optional
  tax: 2.5,                  // Optional
  transaction_id: "TRS123",  // Optional
  products: [{ id: "SKU-345", name: "Formal Shirt", price: 10.0 }],
});

Refund ​

js
mtag("event", {
  type: "Refund",
  email: "john@example.com",
  phone: "+13425784032",
  value: 40.0,
  currency: "USD",
  transaction_id: "TRS123",  // Optional
  products: [{ id: "SKU-345", name: "Formal Shirt", price: 10.0 }],
});
js
mtag("event", {
  type: "Search",
  email: "john@example.com",
  phone: "+13425784032",
  search_term: "Flowers",
});

Share ​

js
mtag("event", {
  type: "Share",
  email: "john@example.com",
  phone: "+13425784032",
  item_id: "SKU-345",         // Optional
  share_method: "Facebook",   // Optional
});

Subscribe ​

js
mtag("event", {
  type: "Subscribe",
  email: "john@example.com",
  phone: "+13425784032",
  value: 10.0,
  currency: "USD",
  products: [{ id: "Plan-034", name: "Premium", price: 10.0 }],
});

Lead ​

js
mtag("event", {
  type: "Lead",
  email: "john@example.com",
  phone: "+13425784032",
  value: 40.0,     // Optional
  currency: "USD", // Optional
});

SubmitApplication ​

js
mtag("event", {
  type: "SubmitApplication",
  email: "john@example.com",
  phone: "+13425784032",
  application_id: "APP-123",  // Optional
});

Contact ​

js
mtag("event", {
  type: "Contact",
  email: "john@example.com",
  phone: "+13425784032",
});
js
mtag("event", {
  type: "Donate",
  email: "john@example.com",
  phone: "+13425784032",
});

Schedule ​

js
mtag("event", {
  type: "Schedule",
  email: "john@example.com",
  phone: "+13425784032",
});

Fcm ​

js
mtag("event", {
  type: "Fcm",
  fcm_token: "fGc8x9abc...:APA91bF...",  // Required
  email: "john@example.com",             // Optional
  phone: "+13425784032",                 // Optional
});

Cart State Tracking ​

cart_state.products represents the full current cart at the time the event fires. Markopolo uses this for abandoned cart detection.

EventWhen to send cart_state
AddToCartAfter adding — include full updated cart
RemoveFromCartAfter removing — include remaining cart
ViewCartWhen user views cart — include full cart

TIP

  • products = item(s) involved in this specific action
  • cart_state.products = ALL items currently in the cart