Event Tracking

Implementing event tracking

Enable 3rd party event tracking

To enable 3rd party event tracking, you need to set in the noctuagg.json file. There are 3 services that you can enable:

{
  "adjust": {
    "appToken": "1234567890",
    "environment": "sandbox",
    "eventMap": {
      "purchase": "qye2vk",
      "my_event": "xoizir"
    },
    "enableCustomEvents": false
  },
  "firebase": {
    "apiKey": "AIzaSyDw-_55555555555555555555555555555555",
    "projectId": "noctua-project-id",
    "enableCustomEvents": true
  },
  "facebook": {
    "appId": "1234567890",
    "enableCustomEvents": false
  }
}

Note

You don't need to provide all the services yourself. The configuration from Noctua Team is the default one.

Event map

The event map is a dictionary that maps the event name to the event name in the 3rd party service. This is useful if you want to use the same event name in the SDK as the one in the 3rd party service that use backend-generated events like Adjust.

{
  ...
  "eventMap": {
    "purchase": "qye2vk"
  }
  ...
}

Enable custom events

If you want to use custom events, you need to set the enableCustomEvents to true.

{
  ...
  "enableCustomEvents": true
  ...
}

Note

If you enable custom events, you need to make sure that you have the correct event name in the 3rd party service. Use the eventMap to map the event name to the event name in the 3rd party service.

Implementing event tracking

To implement event tracking, you need to use the Noctua.Event class. We have 2 types of events that you can use:

Custom Event

Implement custom event tracking to gather valuable user data.

Ad Revenue Event

Track ad revenue to gather valuable user data related to ad revenue.

Note

You don’t need to implement any tracking related to purchases. It’s already being handled within our In-App Purchase feature.

Previous
Implementing in-app ads