Skip to main content
Swaarm SDK: Event Tracking
Updated over a year ago

The Swaarm SDK can be used to track events in the app by associating it with the events set in the Swaarm dashboard for each app. To do this, a Mapping ID needs to be generated in the Swaarm dashboard for each app event.

For example, if you want to track a registration event from the app, you will need to follow the steps below:

  1. Set up the event under app in the Swaarm dashboard

  2. Set the Mapping ID

  3. You would then call the event method of the sdk from your application, whenever the user completes registration in the app as shown below:

    For Android:

    SwaarmAnalytics.event("event_type_id", 123D, "custom value", 321D)

    For iOS:

    SwaarmAnalytics.event(typeId: "event_type_id", aggregatedValue: 123D, customValue: "custom value", revenue: 12.1)

Breakpoint Tracking

Alternatively, the Swaarm SDK also supports setting certain events directly from from the Swaarm dashboard by doing the following:

  1. Go to Settings -> SDK -> Breakpoint tracking

  2. Enter the IDFV (iOS) or appset ID/vendor ID (android)

  3. Once confirmed, you can use the phone with the above details to complete a session in the app including the actions and app pages for the events to be set

  4. Once the session is completed, all the app pages from the sessions will be available in the Swaarm dashboard

  5. Select the page where you need to configure the event, add the event details and hit Save

  6. You can repeat step 5 for as many app pages as you like to set the any number of respective events

  7. Once all events are saved, you can confirm and exit the breakpoint tracking setup

Did this answer your question?