Hive is available with Third-party Mobile App Attribution (MAA) which tracks user activities in your app. Third-party MAAs that Hive SDK provides are Adjust, Singular, Firebase Analytics, and AppsFlyer.

Prerequisites

  1. Make sure to get an attribution key to use. Refer to notice from each attribution dashboard to learn how to issue the attribution key.
  2. Refer to Event Configuration to register tracking event on the attribution dashboard.
  3. Add the key value and event value issued from attribution dashboard to Hive SDK Configuration File (hive_config.xml). Read more details of Configure Attribution.

Configuring Event

Be aware of the following features when registering event on attribution dashboard.

EVENT REGISTRATION EVENT NAME Adjust Singular AppsFlyer FirebaseAnalytics
REQUIRED Purchase Setting Event Key Automatically registered when the event is in use. Automatically registered when the event is in use. Automatically registered when the event is in use.
OPTIONAL UpdateTutorialComplete Setting Event KeyRegister when the event is in use.
NO REGISTRATION InstallOpen Automatically sent without registration. Automatically sent without registration. Automatically sent without registration. Automatically sent without registration.
  • All values except TutorialComplete (Purchase, Install, Open and Update) are automatically called when generating event from Hive SDK, therefore, game studio has nothing to call any function.
  • Refer to Sending Event for Tracking Users in case of using TutorialComplete.
  • The event name and its value are sent to transmit the event newly generated. Refer to Configuring Attribution section to configure event name and its value.
  • Refer to Configuring Attribution section as well to learn how to configure Hive with the event information registered on the dashboard.

The following is an example of the attribution dashboard which was set up with the events to be tracked.

Configuring Attribution

If you like to utilize attribution, set the attribution on SDK configuration file, hive_config.xml first. Configuration items are composed with properties by service and <event> properties which you like to use.

Properties by Service
Name Description
name Name of Thire-party Attribution. The same as the tag name.

  • "Adjust"
  • "Singular"
  • "AppsFlyer"
  • "Firebase"
id The AppID of games issued from the Third-party Attribution dashboardEg: "5725"
key The key of games issued from the Third-party Attribution dashboardEg: "ab7b08bdc812dc0c731a846b952a10d3"
secretId A special element used for Adjust. For more details, check out Adjust contract details.
info1 A special element used for Adjust. For more details, check out Adjust contract details.
info2 A special element used for Adjust. For more details, check out Adjust contract details.
info3 A special element used for Adjust. For more details, check out Adjust contract details.
info4 A special element used for Adjust. For more details, check out Adjust contract details.
itunseConnectAppId Used in AppsFlyer (iOS)
<event> Element Properties
Name Description
name The event name to be tracked enrolled in the Third-party Attribution dashboardEg: "TutorialComplete"
value The value of tracking event sending from Hive Client to the relevant attribution

  • Adjust: The event token
  • Singular: The event name
  • AppsFlyer: The event name
  • Firebase: The event name No space (blank) is allowed

Example: "TutorialComplete"

Activating Third-party Attribution

You can activate/deactivate Third-party Attribution with Hive API. To activate (or deactivate) the attribution, call setEnableTracker() function from Analytics API. Make sure to define the attribution one by one like the following format at the first parameter of this function.

  • Adjust: ADJUST
  • Singular: SINGULAR
  • AppsFlyer: APPSFLYER
  • Firebase: FIREBASE

The following example codes illustrates how to deactivate Adjust.

Unity®

API Reference: hive.Analytics.setEnableTracker

C++

API Reference: Analytics::setEnableTracker

Android

API Reference: com.hive.Analytics.setEnableTracker

iOS

API Reference: HIVEAnalytics:setEnableTracker

The following example codes illustrates how to deactivate Firebase.

Unity®

API Reference: hive.Analytics.setEnableTracker

C++

API Reference: Analytics::setEnableTracker

Kotlin

API Reference: com.hive.Analytics.setEnableTracker

Java

API Reference: com.hive.Analytics.setEnableTracker

Swift

API Reference: HIVEAnalytics:setEnableTracker

Obj-C

API Reference: HIVEAnalytics:setEnableTracker

Sending Event for Tracking Users

It is recommended to send tracking event to the attribution only when user activities meet the specific conditions, such as tutorial completion. Call sendEvent() method in the Analytics class to send the tracking event. As the first parameter of sendEvent(), input the value of name property from <event> element, which is defined in hive_config.xml file.

Followings are sample codes sending TutorialComplete event to a marketing attribution to inform that a user has completed a tutorial.

Unity®

API Reference: hive.Analytics.sendEvent

C++

API Reference: Analytics::sendEvent

Android

API Reference: com.hive.Analytics.sendEvent

iOS

API Reference: HIVEAnalytics:sendEvent