Skip to content

Tracking your first events

Every event you send through Funnel has two parts: a name (a GA4 event name like page_view or purchase) and a params object (the parameters that event accepts). You pass both to track():

funnel.track(eventName, params);

Because Funnel uses GA4 as its canonical schema, the names and parameters below are the GA4 standard ones. TypeScript autocompletes both: once you type the event name, your editor knows exactly which parameters are valid.

Here are the events you’ll reach for most often, with their real parameters.

Sent when a page (or route) is viewed. All parameters are optional.

funnel.track("page_view", {
page_title: "Home",
page_location: window.location.href,
page_referrer: document.referrer,
});

Sent when a user completes registration. method describes how they signed up.

funnel.track("sign_up", { method: "google" });

Sent when a user signs in to an existing account.

funnel.track("login", { method: "email" });

Sent when a user performs a search. search_term is required.

funnel.track("search", { search_term: "running shoes" });

Sent when a product detail page is viewed. Pass the product(s) as items using the GA4 item shape.

funnel.track("view_item", {
currency: "KRW",
value: 89000,
items: [
{
item_id: "SHOE-001",
item_name: "Classic Running Shoe",
item_brand: "FunnelSports",
item_category: "Sports/Shoes",
price: 89000,
quantity: 1,
},
],
});

Sent when an item is added to the cart. Same item shape as view_item.

funnel.track("add_to_cart", {
currency: "KRW",
value: 89000,
items: [{ item_id: "SHOE-001", item_name: "Classic Running Shoe", price: 89000, quantity: 1 }],
});

Sent when checkout starts. Accepts an optional coupon in addition to the cart fields.

funnel.track("begin_checkout", {
currency: "KRW",
value: 89000,
coupon: "WELCOME10",
items: [{ item_id: "SHOE-001", item_name: "Classic Running Shoe", price: 89000, quantity: 1 }],
});

Sent when a purchase completes. transaction_id is required: GA4 needs it, and most platforms use it for server-side deduplication of purchases.

funnel.track("purchase", {
transaction_id: "T-1",
currency: "KRW",
value: 89000,
shipping: 3000,
tax: 0,
items: [{ item_id: "SHOE-001", item_name: "Classic Running Shoe", price: 89000, quantity: 1 }],
});

Ecommerce events (view_item, add_to_cart, begin_checkout, purchase, and others) carry an items array. Each item follows the GA4 Item schema. Only item_id and item_name are required; the rest are optional:

{
item_id: "SHOE-001", // required (e.g. SKU)
item_name: "Classic Running Shoe", // required
item_brand: "FunnelSports",
item_category: "Sports/Shoes",
item_variant: "Red / 270",
price: 89000,
quantity: 1,
coupon: "WELCOME10",
discount: 5000,
}

Funnel ships the complete GA4 event vocabulary. Beyond the ones above, you also have: view_promotion, select_promotion, share, generate_lead, view_search_results, view_item_list, select_item, add_to_wishlist, remove_from_cart, view_cart, add_shipping_info, add_payment_info, and refund.

Each has its own typed parameters; your editor will show you the exact shape as you type. For the definitive list of every event and parameter, see the Reference.