Products and surfaces
Bily
Bily
Bily Apps
Bily Apps
Bily JavaScript SDK
Bily JavaScript SDK
@bilyai/js browser package. It installs the exact Bily tracking URL, queues early calls, sends known and custom events, and exports browser-safe TypeScript methods and types.Bily API
Bily API
Bily MCP
Bily MCP
search and execute, expose current Bily operations.Events and payloads
Event
Event
PageView, Product Viewed, Order Completed, and workspace_created.Known event
Known event
KnownBilyEvent. TypeScript autocompletes known names, while the SDK also accepts custom non-empty strings.Custom event
Custom event
Payload
Payload
track(). It can include typed client, product, order, page, and search fields, plus reviewed custom properties.event_id
event_id
ts
ts
ts as a string.PageView
PageView
Single-page application (SPA)
Single-page application (SPA)
PageView for each later route change.Product
Product
BilyProduct with required id, name, price, and currency, plus optional quantity, SKU, category, brand, and image fields.Order
Order
BilyOrder for one order. It can include products, currency, total, tax, discount, discount code, and shipping fees.Identity and acquisition
Bily browser tracking ID
Bily browser tracking ID
getBilyTrackingId(). It can persist in browser storage, but it is not an authenticated account ID or authorization value.client.userId
client.userId
sourceUrl
sourceUrl
referrer
referrer
Attribution
Attribution
Analytics and connected data
Conversions
Conversions
sum(conversions).People
People
sum(people) as the visitor denominator only when your selected rows contain the complete traffic population for that grouping.Sessions
Sessions
sum(sessions) as the session denominator only when your selected rows contain the complete traffic population for that grouping.Pageviews
Pageviews
Conversion rate (CVR)
Conversion rate (CVR)
sum(conversions) / sum(people); session CVR is sum(conversions) / sum(sessions). Never use orders, revenue, customers, purchase-only sessions, or conversion-filtered rows as the denominator.Return on ad spend (ROAS)
Return on ad spend (ROAS)
Cost per acquisition (CPA)
Cost per acquisition (CPA)
Customer acquisition cost (CAC)
Customer acquisition cost (CAC)
Customer lifetime value (LTV)
Customer lifetime value (LTV)
customer_ltv dataset. Average LTV is the average customer total_revenue. Net LTV subtracts customer refunds where available. This is lifetime customer data, not period new-versus-returning revenue.Platform money
Platform money
p_spend stay in the ad account’s native p_currency. Group raw money aggregates by p_currency. For store-currency spend and efficiency across accounts, use normalized channel or asset reports.Product orders
Product orders
product_metrics dataset. Aggregate them with sum(orders). Row count does not equal product-order count.Units
Units
product_metrics dataset. Aggregate it with sum(units). Units exceed product orders when an order contains more than one unit of a product.Connection
Connection
Pixel
Pixel
Ad account
Ad account
Asset
Asset
Data readiness
Data readiness
Quality warning
Quality warning
review_required results and blocking warnings before they influence channel, budget, creative, or attribution decisions.Access and scope
Organization
Organization
Store
Store
Scope
Scope
Customer context
Customer context
GET /context and bily.context() return this shape in one request, filtered to the connection’s allowed scope.API key
API key
Bily Connect
Bily Connect
Fallback key
Fallback key
Request ID
Request ID
x-request-id response header. Save it when you diagnose an API failure.MCP operations
Operation catalog
Operation catalog
search, including helper signatures, schemas, and planning guidance.search
search
query, optional storeUrl, and an optional limit from 1 to 20.execute
execute
bily.* helpers. It returns a JSON-serializable result and captured logs.Risk tier
Risk tier
read, draft_write, spend_affecting, or destructive.Approval policy
Approval policy