Skip to main content

Analytics

Prerequisites

Understand more regarding analyzing user behavior at Product Guide > Analytics

Additional Configuration

This App requires some additional configuration, if you would like to automaticaly track certain types of events:

Frontend (Mobile)

Additional Configuration for Android

If you wish to track the current location of the user / visitor, then ensure the following permissions are added to the AndroidManifest.xml file:

app/src/main/AndroidManifest.xml
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

If the above permissions are not granted, location data is not sent to DashX and DashX will use the IP address to decide the city and country of the user.

If you wish to track network information such as Bluetooth, Cellular & Wi-Fi status, then ensure the following permissions are added to the AndroidManifest.xml file:

app/src/main/AndroidManifest.xml
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

trackAppLifecycle - When enabled, the SDK will automatically track these events:

  • Application Installed
  • Application Updated
  • Application Opened
  • Application Backgrounded with session_length in seconds.
  • Application Crashed with exception

trackScreenViews - When enabled, the SDK will automatically send this event whenever a screen/activity is viewed:

  • Screen Viewed with name set to the screen name.

Track Events

On the Backend, you would need to call track() using the User ID, Event Name, and Event Data.

On the Frontend, you would need to call track() using the Event Name, and Event Data.

tip

You don't have to specify a User ID in the Frontend SDKs, because it is derived from the current identity.

Learn more about setting identity from the User Management guide.

Backend

dashx.track('<USER ID>', 'Plan Renewed', {
plan: 'Bronze',
months: 12
});

Frontend (Browser)

import dx from 'lib/dashx'

dx.track('Button Clicked', {
label: 'Sign me up',
placement: 'top'
});

Frontend (Mobile)

DashX.track("Button Clicked", withData: [
"label": "Click here",
"placement": "top"
])

User Privacy

DashX favors privacy by default, so many of the tracking features are disabled out-of-the-box. We force developers using our SDK to enable each tracking feature, so that they are aware of the exact pieces of data being tracked.

Third-Party Processing & Regulations - If you reside in the EU region, or if your app belongs to an industry that is heavily regulated, you have two options:

  • Using a Self-Hosted version of DashX, which allows you to keep all your data within your own Data Center(s).
  • Using specific Data Center(s) of DashX, which are available in different Regions.

Reach out to your Account Manager, or sales@dashx.com to know more.