Canonical events are the standard event vocabulary that Gurulu uses across every platform. Whether an event fires from the JavaScript web tracker, the iOS SDK, or the Android SDK, it carries the same name, the same required properties, and the same semantic meaning.
This cross-platform consistency is what lets Gurulu merge data from different sources into a single timeline, build funnels that span devices, and power AI-driven insights without manual mapping.
Gurulu ships with 18 standard events organized into five categories: Core, Acquisition, Revenue, Engagement, and Retention.
Standard Events
Core
$pageviewA page or screen is viewed.
Optional| referrer | string |
| duration_ms | number |
$session_startA new session begins.
Optional| landing_page | string |
| utm_source | string |
$session_endA session ends or times out.
Required| session_id | string |
| duration_ms | number |
$identifyAssociates the current visitor with a known identity.
Optional| email | string |
| name | string |
| plan | string |
Acquisition
$signupA new account or profile is created.
Optional| referral_code | string |
| plan | string |
$loginUser authenticates into the product.
$inviteUser invites another person to the product.
Revenue
$purchaseA completed transaction or order.
Required| amount | number |
| currency | string |
Optional| order_id | string |
| items | array |
| coupon | string |
$subscribeUser starts a recurring subscription.
Required| plan | string |
| amount | number |
| currency | string |
Optional| interval | string |
| trial | boolean |
$upgradeUser upgrades to a higher plan.
Required| from_plan | string |
| to_plan | string |
Optional| amount | number |
| currency | string |
$refundA refund is issued for a prior transaction.
Required| amount | number |
| currency | string |
Optional| order_id | string |
| reason | string |
Engagement
$searchUser performs a search query.
Optional| result_count | number |
| filters | object |
$clickUser clicks a tracked element.
$form_submitA form is submitted.
Optional| form_name | string |
| field_count | number |
$downloadUser downloads a file or resource.
Optional| file_type | string |
| file_size | number |
$shareUser shares content via a social or copy action.
Optional| content_id | string |
| url | string |
Retention
$feedbackUser submits a rating, review, or NPS score.
$churnUser cancels their subscription or deletes their account.
Optional| plan | string |
| tenure_days | number |
SDK Usage Examples
Below are tracking examples for three key events across all supported platforms.
$purchase
Web SDK
gurulu.track('$purchase', {
amount: 49.99,
currency: 'USD',
order_id: 'ORD-1234',
items: [{ sku: 'WIDGET-01', qty: 2 }],
});
iOS SDK
Gurulu.track("$purchase", properties: [
"amount": 49.99,
"currency": "USD",
"order_id": "ORD-1234",
"items": [["sku": "WIDGET-01", "qty": 2]]
])
Android SDK
Gurulu.track("$purchase", mapOf(
"amount" to 49.99,
"currency" to "USD",
"order_id" to "ORD-1234",
"items" to listOf(mapOf("sku" to "WIDGET-01", "qty" to 2))
))
$signup
Web SDK
gurulu.track('$signup', {
method: 'email',
referral_code: 'FRIEND20',
});
iOS SDK
Gurulu.track("$signup", properties: [
"method": "apple_id",
"plan": "free"
])
Android SDK
Gurulu.track("$signup", mapOf(
"method" to "google",
"plan" to "free"
))
$search
Web SDK
gurulu.track('$search', {
query: 'wireless headphones',
result_count: 42,
filters: { category: 'electronics', price_max: 100 },
});
iOS SDK
Gurulu.track("$search", properties: [
"query": "wireless headphones",
"result_count": 42
])
Android SDK
Gurulu.track("$search", mapOf(
"query" to "wireless headphones",
"result_count" to 42
))
Event Naming Conventions
$ prefix -- Reserved for system-defined canonical events. Do not use the $ prefix for your own custom events.
snake_case -- Custom events must use lowercase snake_case: video_played, cart_updated.
Automatic normalization -- Gurulu recognizes common naming patterns and maps them to canonical events automatically:
| Your event name | Mapped to |
|---|
| order_completed | $purchase |
| registration_complete | $signup |
| user_login | $login |
| plan_upgraded | $upgrade |
| subscription_started | $subscribe |
| query_searched | $search |
| file_downloaded | $download |
| content_shared | $share |
| nps_submitted | $feedback |
| account_cancelled | $churn |
Normalization is applied at ingestion time. You can override or disable any mapping rule.
Custom Event Mapping
If your codebase uses event names that do not match the default normalization rules, you can configure custom mappings in the dashboard.
Setting up mappings
- Go to Settings → Event Mappings in the dashboard.
- Click Add Mapping.
- Enter the source event name (e.g.
checkout_done) and select the canonical target (e.g. $purchase). - Optionally map source properties to canonical properties.
- Save. The mapping applies to all future events and can be back-filled on historical data.
Mapping via API
curl -X POST https://gurulu.io/api/event-mappings \
-H "Authorization: Bearer gsk_live_..." \
-H "Content-Type: application/json" \
-d '{
"siteId": "YOUR_SITE_ID",
"source": "checkout_done",
"target": "$purchase",
"propertyMap": {
"total": "amount",
"curr": "currency"
}
}'
Default mapping rules
When a new site is created, Gurulu enables a set of default mapping rules that cover the most common naming patterns from popular analytics tools (Google Analytics, Mixpanel, Amplitude, Segment). These defaults can be edited or disabled at any time from Settings → Event Mappings.
For information on tracking events and building funnels, see Events & Funnels. For SDK installation, see Mobile SDKs.