For the complete documentation index, see llms.txt. This page is also available as Markdown.

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: [:])
Predefined OnsideEvent cases

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, Bool

  • arrays of these types

Full list of predefined OnsideEventParameter keys

Validation rules

OnsideKit validates events and parameters before sending them.

Example

Last updated

Was this helpful?