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
- Make sure to get an attribution key to use. Refer to notice from each attribution dashboard to learn how to issue the attribution key.
- Adjust: https://www.adjust.com
- Singular: https://app.singular.net
- AppsFlyer: https://www.appsflyer.com
- Firebase Analytics: https://firebase.google.com/
- Refer to Event Configuration to register tracking event on the attribution dashboard.
- 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
<providers> <!-- Settings for user data tracking --> <Adjust name="Adjust" id="unused" key="abcdefg" secretId="1" info1="5432112345" info2="334123" info3="555333" info4="111333"> <events> <event name="Purchase" value="bbeedd"/> <event name="TutorialComplete" value="ddffee"/> <event name="Update" value="ggdeeff"/> </events> </Adjust> <Singular name="Singular" id="devaazzzmmmmm" key="ccdddqqqweeemmmmdddddd"> <events> <event name="Purchase" value="purchase"/> <event name="TutorialComplete" value="tutorial Complete"/> <event name="Update" value="update"/> </events> </Singular> <AppsFlyer name="AppsFlyer" id="unused" key="OWKEK)wmldj2mlFEM" itunseConnectAppId="909923112"> <events> <event name="TutorialComplete" value="Tutorial Complete"/> <event name="Update" value="Update"/> </events> </AppsFlyer> <firebase> <events> <event name="Purchase" value="purchase"/> <event name="TutorialComplete" value="tutorial_complete"/> <event name="MissionClear" value="clear_mission"/> <event name="Open" value="open"/> <event name="Update" value="update"/> <event name="Login" value="login"/> </events> </firebase> </providers> |
Properties by Service
Name | Description |
---|---|
name | Name of Thire-party Attribution. The same as the tag name.
|
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
Example: |
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.
API Reference: hive.Analytics.setEnableTracker
1 2 3 4 5 |
TrackingType trackingType = TrackingType.ADJUST; // Deactivate Adjust Analytics.setEnableTrackertrackingType, false); |
API Reference: Analytics::setEnableTracker
1 2 3 4 5 |
Analytics::TrackingType trackingType = Analytics::TrackingType::ADJUST; // Deactivate Adjust Analytics::setEnableTrackertrackingType, false); |
API Reference: com.hive.Analytics.setEnableTracker
1 2 3 4 5 |
Analytics.TrackingType trackingType = Analytics.TrackingType.ADJUST; // Deactivate Adjust Analytics.setEnableTrackertrackingType, false); |
API Reference: HIVEAnalytics:setEnableTracker
1 2 3 4 5 |
HIVETrackingType trackingType = kHIVETrackingTypeAdjust // Deactivate Adjust [HIVEAnalytics setEnableTracker:trackingType enable:false]; |
API Reference: hive.Analytics.setEnableTracker
1 2 |
// Deactivate Firebase Analytics.setEnableTracker"FIREBASE", false); |
API Reference: Analytics::setEnableTracker
1 2 |
// Deactivate Firebase Analytics::setEnableTracker"FIREBASE", false); |
API Reference: com.hive.Analytics.setEnableTracker
1 2 |
// Deactivate Firebase Analytics.setEnableTrackerWithName"FIREBASE", false) |
API Reference: com.hive.Analytics.setEnableTracker
1 2 |
// Deactivate Firebase Analytics.INSTANCE.setEnableTrackerWithName"FIREBASE", false); |
API Reference: HIVEAnalytics:setEnableTracker
1 2 |
// Deactivate Firebase AnalyticsInterface.setEnableTrackername: "FIREBASE", enable isEnable: false) |
API Reference: HIVEAnalytics:setEnableTracker
1 2 |
// Deactivate Firebase [HIVEAnalytics setEnableTrackerWithName:@"FIREBASE" enable:NO]; |
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.
API Reference: hive.Analytics.sendEvent
1 2 |
// Sending event for user tracking Analytics.sendEvent("TutorialComplete"); |
API Reference: Analytics::sendEvent
1 2 3 |
string eventname = "TutorialComplete"; // Sending event for user tracking Analytics::sendEvent(eventname); |
API Reference: com.hive.Analytics.sendEvent
1 2 3 4 5 6 |
String eventname = "TutorialComplete"; Analytics.sendEventeventname); // Sending event for user tracking // The following is identical to the above Analytics.sendTutorialComplete(); |
API Reference: HIVEAnalytics:sendEvent
1 2 3 4 5 6 |
NSString eventname = @"TutorialComplete"; [HIVEAnalytics sendEvent:eventname]; // Sending event for user tracking // The following is identical to the above [HIVEAnalytics sendTutorialComplete]; |