Building funnels with event tracking
Track user actions with Onside.track and build funnels over these events.
Attribution answers “where did the user come from?”.
See Attribution.
Event tracking answers “what did the user do next?”.
Use Onside.track(_:parameters:) to log user actions. You can then build funnels over these events.
Public tracking delivers events only for installations distributed through Onside. The same delivery rule applies to JavaScript trackEvent. Calling the API successfully does not confirm server delivery; offline purchase simulation with a .storekit file does not verify analytics delivery.
API
Onside.track(
_ event: OnsideEvent,
parameters: [OnsideEventParameter: OnsideEventParameterValue]
)Pass parameters: [:] if you do not need any metadata.
Events
OnsideEvent ships with a set of common event constants. You can also send any custom event name.
Use
.levelAchieved,.purchaseCompleted,.registrationCompleted, and other predefined cases when they match your action.Use
.custom("...")or a string literal for everything else.
OnsideEvent is ExpressibleByStringLiteral, so this works:
Onside.track("my_custom_event", parameters: [:])Parameters
OnsideEventParameter is the key type for event metadata.
It behaves like events:
It includes a prepared set of common parameter keys.
It does not limit your API. You can always use a custom key.
It is
ExpressibleByStringLiteral.
OnsideEventParameterValue supports:
String,Double,Int,Boolarrays of these types
Validation rules
OnsideKit validates events and parameters before sending them.
Event names and parameter keys
Must match
^[a-zA-Z][a-zA-Z0-9_]*$— start with a letter; letters, digits, and underscores only.Are truncated to 40 characters.
Must not start with the reserved prefixes
onside_or$$.
A name or key that breaks these rules is dropped (a warning is logged to the console): an invalid event name drops the whole event; an invalid parameter key drops only that parameter.
Parameter values and limits
String values are truncated to 100 characters.
An event may carry at most 25 effective parameters; any beyond that are ignored. Array elements each count toward this limit.
Array values may contain only scalars (
String,Double,Int,Bool) — no nested arrays.
Example
Last updated
Was this helpful?