LearnStandard Events

Standard Events

Use consistent Hardal event names and parameters for commerce, lead, account, and engagement activity.

Pick an event category

Hardal accepts any non-empty event name. Use the standard names on this page when one matches the activity, so collection data and downstream processing use a consistent schema.

Start with the category that matches the activity you want to record. If no standard event fits, send a custom event instead.

On the web, send these events with virgo.track(). From mobile or your backend, POST the same event name and parameters to /collect. Put parameters in payload.data. See Send Events API for the full payload shape.

page_view is collected automatically by the web script. With SPA tracking enabled, route changes also send a page view. Send other interactions explicitly.

E-commerce

view_item

A visitor views a product detail page.

<script>
virgo.track("view_item", {
  currency: "USD",
  value: 89.99,
  items: [{
    item_id: "RUN-AIR-42",
    item_name: "AirStride Running Shoes",
    item_brand: "TrailForce",
    item_category: "Footwear",
    price: 89.99,
    quantity: 1
  }]
});
</script>

view_item_list

A visitor views a product list, such as a category page or a search results page.

virgo.track("view_item_list", {
  item_list_id: "bestsellers",
  item_list_name: "Bestsellers",
  items: [{ item_id: "BOOK-1984", item_name: "Atomic Habits", price: 14.99, quantity: 1, index: 0 }]
});

select_item

A visitor clicks a product from a list.

virgo.track("select_item", {
  item_list_id: "search_results",
  item_list_name: "Search Results",
  items: [{ item_id: "LAP-PRO-16", item_name: "ProBook 16 Laptop", price: 1249.00, quantity: 1, index: 2 }]
});

view_promotion

A visitor sees a promotion, such as a banner or offer.

virgo.track("view_promotion", {
  promotion_id: "PROMO_BF2025",
  promotion_name: "Black Friday 2025",
  creative_name: "blackfriday_hero",
  creative_slot: "homepage_banner"
});

select_promotion

A visitor clicks a promotion. Same parameters as view_promotion.

virgo.track("select_promotion", {
  promotion_id: "PROMO_BF2025",
  promotion_name: "Black Friday 2025",
  creative_name: "blackfriday_hero",
  creative_slot: "homepage_banner"
});

A visitor searches your site.

virgo.track("search", { search_term: "bluetooth speaker" });

add_to_cart

A visitor adds an item to the cart.

<script>
virgo.track("add_to_cart", {
  currency: "USD",
  value: 59.99,
  items: [{ item_id: "EAR-WIRE-BLK", item_name: "SoundPods Wireless Earbuds", price: 59.99, quantity: 1 }]
});
</script>

remove_from_cart

A visitor removes an item from the cart. Same shape as add_to_cart.

virgo.track("remove_from_cart", {
  currency: "USD",
  value: 12.99,
  items: [{ item_id: "CASE-SLM-CLR", item_name: "SlimGuard Clear Phone Case", price: 12.99, quantity: 1 }]
});

add_to_wishlist

A visitor adds an item to a wishlist. Same shape as add_to_cart.

virgo.track("add_to_wishlist", {
  currency: "USD",
  value: 299.00,
  items: [{ item_id: "WATCH-FIT-44", item_name: "PulseFit Smartwatch 44mm", price: 299.00, quantity: 1 }]
});

view_cart

A visitor views the cart. Send the same fields as add_to_cart, with all cart items in items.

virgo.track("view_cart", {
  currency: "USD",
  value: 174.98,
  items: [
    { item_id: "HP-STUDIO-7", item_name: "Studio 7 Headphones", price: 129.99, quantity: 1 },
    { item_id: "KB-MECH-TKL", item_name: "ClickForce TKL Keyboard", price: 44.99, quantity: 1 }
  ]
});

begin_checkout

A visitor starts checkout.

virgo.track("begin_checkout", {
  currency: "EUR",
  value: 549.00,
  coupon: "WELCOME10",
  items: [{ item_id: "CAM-MIRR-X5", item_name: "LensPro X5 Mirrorless Camera", price: 549.00, quantity: 1 }]
});

add_shipping_info

A visitor submits shipping info. Adds shipping_tier to the checkout shape.

virgo.track("add_shipping_info", {
  currency: "GBP",
  value: 189.00,
  shipping_tier: "Next-day",
  items: [{ item_id: "COF-BREW-DLX", item_name: "BrewMaster Deluxe", price: 189.00, quantity: 1 }]
});

add_payment_info

A visitor submits payment info. Adds payment_type to the checkout shape.

virgo.track("add_payment_info", {
  currency: "USD",
  value: 349.99,
  payment_type: "Credit Card",
  items: [{ item_id: "MON-4K-27", item_name: "PixelEdge 27" 4K Monitor", price: 349.99, quantity: 1 }]
});

purchase

A visitor completes a purchase. This is the main commerce event.

<script>
virgo.track("purchase", {
  transaction_id: "ORD-20260615-7891",
  value: 214.98,
  currency: "USD",
  tax: 17.20,
  shipping: 5.99,
  coupon: "SUMMER20",
  items: [
    { item_id: "JKT-WIND-M", item_name: "StormShield Windbreaker", price: 79.99, quantity: 1 },
    { item_id: "SNK-URBAN-10", item_name: "UrbanGlide Sneakers", price: 134.99, quantity: 1 }
  ]
});
</script>

refund

A purchase is refunded. Include items when you need item-level refund records.

virgo.track("refund", {
  transaction_id: "ORD-20260615-7891",
  value: 134.99,
  currency: "USD",
  items: [{ item_id: "SNK-URBAN-10", item_name: "UrbanGlide Sneakers", price: 134.99, quantity: 1 }]
});

Item object

Use this object with every e-commerce event that carries products: view_item, view_item_list, select_item, add_to_cart, remove_from_cart, add_to_wishlist, view_cart, begin_checkout, add_shipping_info, add_payment_info, purchase, and refund.

view_item, add_to_cart, and purchase should send the same item details so item-level records and ordered-event analysis stay consistent.

item_idstring

Unique product identifier. Example: RUN-AIR-42

item_namestring

Product name. Example: AirStride Running Shoes

item_brandstring

Brand name. Example: TrailForce

item_categorystring

Primary category. Example: Footwear

pricenumber

Unit price. Use the discounted price if applicable.

quantityinteger

Quantity. Defaults to 1.

Leads

generate_lead

A visitor submits a lead form or inquiry.

virgo.track("generate_lead", {
  lead_id: "LEAD-12345",
  currency: "USD",
  value: 500,
  lead_source: "Trade show"
});

sign_up

A visitor creates an account.

virgo.track("sign_up", { method: "Google" });

login

A visitor logs in.

virgo.track("login", { method: "Email" });

share

A visitor shares content.

virgo.track("share", { method: "WhatsApp", content_type: "product", item_id: "RUN-AIR-42" });

subscribe

A visitor subscribes to a list or notifications.

virgo.track("subscribe", { list_name: "Weekly Deals", list_id: "NL_DEALS_01" });

trial_start

A visitor starts a free trial.

virgo.track("trial_start", { plan: "business", trial_days: 30, value: 79.00, currency: "USD" });

Lead object

Use these fields for lead, signup, login, share, subscription, and trial events when they apply.

lead_idstring

Unique lead identifier. Required for generate_lead.

currencystring

ISO 4217 code. Use it when you send value.

valuenumber

Monetary value of the lead, trial, or signup.

lead_sourcestring

Where the lead came from. Example: Trade show

methodstring

Signup, login, or share method. Examples: Google, Email, WhatsApp

content_typestring

Type of shared content. Example: product

item_idstring

ID of the shared item or content.

list_namestring

Subscription list name. Example: Weekly Deals

list_idstring

Subscription list ID. Example: NL_DEALS_01

planstring

Trial plan name or tier. Example: business

trial_daysinteger

Trial length in days.

Custom Events

Define a custom event when no standard event fits.