Skip to content

Automatic event tracking

Hive SDK can automatically track the following 4 events and send them to each attribution: Install, Open, Update, Purchase (in-app purchase) The game studio doesn’t need to implement codes to track these 4 events.

Automatic Event Tracking with Adjust

  1. Get the required tokens from each attribution. Refer to the Adjust dashboard guide to learn how to get the tokens.

    • To track Purchase and Update event automatically, register these events on Adjust dashboard, and get the app token and the event tokens. The app token can be obtained on the dashboard main page, and the event tokens on Dashboard > All Settings > Events.
    • For the automatic tracking of Install and Open events, no token is required.
  2. Add tokens on hive_config.xml.

    • Add the app token, the event token of Purchase, and the event token of Update on hive_config.xml. For more details, see the example codes below.
    • For the automatic tracking of Install and Open events, configuring hive_config.xml is not required.
  3. The Adjust dashboard provides SDK Signature V3 for preventing app spoofing. To use the SDK Signature, you need to review the contractual terms with Adjust.
Note

It is recommended to automatically track all 4 events for your game operation.

SDK Signature integration

If you have used an older version of the SDK Signature, please check the SDK Signature Migration before integrating the signature library. If you are using SDK Signature for the first time, follow the instructions below.

Android

To use SDK Signature in the Android environment, follow these instructions.

  1. Copy the adjust-android-signature-xxxxxx.aar library included in the SDK/External folder and add it to your project’s libs folder.
  2. Go to the Adjust dashboard and follow the instructions on the Add your digital certificate fingerprints to Adjust’s allowlist page to set up your fingerprints. You can verify the fingerprints by referring to the Certificate Setup Page in Adjust Suite to follow the certificate method used in your app.

iOS

To use SDK Signature in the iOS environment, add the ProviderAdjust subspec to your Podfile.

(omitted)
pod 'HiveAnalyticsProviderAdjust', $HIVE_SDK_VERSION
pod 'HiveAnalyticsProviderAdjust/SignatureV3', $HIVE_SDK_VERSION
(omitted)

Unity

Select Hive - Hive Dependencies(ExternalDependency) from the menu and activate Adjust Signature V3.

Checking SDK Signature integration status

To confirm that the SDK Signature signing library is well integrated, first ensure that the zone in Hive SDK Settings is set to sandbox. Then, follow the steps below.

Note

For more details, refer to the Adjust Documentation.

  1. Completely uninstall the app from the test device to ensure installation information is sent.
  2. Go to the Adjust Dashboard Testing Console, enter the test device information, and click Delete Device to remove all devices.
  3. Install the app on the test device and run it to ensure installation information is sent to Adjust.
  4. Enter the test device's advertising ID or IDFA in the testing console to retrieve installation event information.
    • The SignatureVerificationResult field should display the value Valid Signature.
    • Check that the SignatureVersion field value is 3.

SDK Signature migration

To use the latest SDK Signature, you need to remove the previous SDK Signature version settings.

Android, iOS

Remove all keys and values set for secretId, info1, info2, info3, and info4 in the Adjust-related settings in hive_config.xml.

<providers>
    <!-- (code omitted) -->

    <!-- Do not set the Adjust node id field. -->
    <!-- The Adjust node name field is fixed as "Adjust". -->
    <!-- The event node name field is set arbitrarily by the game company. -->

    <!-- Remove secretId="1" info1="5432112345" info2="334123" info3="555333" info4="111333" below -->
    <Adjust name="Adjust" id="unused" key="APP_TOKEN" secretId="1" info1="5432112345" info2="334123" info3="555333" info4="111333">
        <events>
            <event name="Purchase" value="PURCHASE_EVENT_TOKEN" />
            <event name="Update" value="UPDATE_EVENT_TOKEN" />
        </events>
    </Adjust>

    <!-- (code omitted) -->
</providers>

Unity

Select Hive - Edit Config from the menu and activate the Android or iOS tab. Then, delete all values set in Adjust > App Secret Value for secretid, info1 ~ info4.

Automatically track events with Airbridge

  1. Get the required token. For more information on how to issue tokens, refer to the Airbridge dashboard guide.
    • Get the App SDK Token and App Name from Dashboard > Settings > Token Management.
  2. For Android and iOS, add the token, app name, and Update event settings to hive_config.xml. See the hive_config.xml example code below.
  3. For Windows, you need the Hive Console settings instead of the hive_config.xml settings. See the Windows settings below.
  4. If you are applying Windows, Android, and iOS together, contact Airbridge for pre-configuration.
  5. Airbridge provides SDK Signature to prevent app spoofing. You must first check the terms of your agreement with Airbridge to use this feature. Obtain the key and add it as the secretId, secret value in hive_config.xml. For more information about SDK signature security information, refer to the Airbridge Guide. It is only supported on Android and iOS, and not on Windows.

SDK Signature Integration

If you are using SDK Signature for the first time, follow the instructions below.

hive_config.xml example code

<providers>
    <Airbridge name="Airbridge" key="APP_SDK_TOKEN" appName="APP_NAME" secretId="SECRET_ID" secret="SECRET">
        <events>
            <event name="Update" value="Update" />
                        <event name="Install" value="Install"/>
            <event name="Open" value="Open"/>
            <event name="PrePurchase" value="airbridge.initiateCheckout"/>
            <event name="PurchaseCancel" value="airbridge.ecommerce.order.canceled"/>
            <event name="Purchase" value="airbridge.ecommerce.order.completed"/>
        </events>
    </Airbridge>
</providers>

Android, iOS

Set the secretId, secret key values ​​related to Airbridge in hive_config.xml.

Windows

  1. Proceed with Marketing Attribution - Airbridge Settings in the Hive console.

    • It is not necessary to set the secretId, secret key values ​​related to Airbridge in hive_config.xml.
  2. Set it in hive_config.xml according to the instructions below. Refer to the hive_config.xml example code.
    When set to a value defined in Airbridge, it can be sent as an Airbridge standard event.
    Airbridge Event Types

    • Install: Requires setup.
    • Open: Requires setup.
    • Update: Requires setup.
    • PrePurchase: Requires setup. You can send a standard event with airbridge.initiateCheckout as the value.
    • PurchaseCancel: Requires setup. You can send a standard event with airbridge.ecommerce.order.canceled as the value.
    • Purchase: Requires setup. You can send a standard event with airbridge.ecommerce.order.completed as the value

Unity

Select Hive - Edit Config from the menu and activate the Android or iOS tab. Next, set the values ​​passed in secretId, secret in Airbridge.

Information sent when an automatic event occurs

When a specific event is performed, the event is automatically sent to Airbridge app attribution. The information sent at this time is as follows.

out
EVENT NAME PARAMETER Remarks
Login Sign-in
  • user.externalUserID: playerId
Logout Sign-out
Start payment Initiate Checkout
  • totalQuantity
  • currency
  • originalCurrency
  • products
  • products.name: product title
  • originalCurrency: currency sent from SDK
  • currency: base currency registered when setting up Airbridge app
Purchase complete Order Complete
  • totalQuantity
  • currency
  • originalCurrency
  • value
  • transactionID
  • inAppPurchased
  • products
  • products.name: product title
  • value: sum products.price
  • originalCurrency: currency sent from SDK
  • currency: base currency registered when setting up Airbridge
Purchase Cancellation Order Cancel
  • transactionType
  • totalQuantity
  • currency
  • originalCurrency
  • value
  • inAppPurchased
  • products
  • transactionType: "cancel"
  • products.name: product title
  • value: sum products.price
  • originalCurrency: currency sent from SDK
  • currency: base currency registered when setting up Airbridge app
Subscription Subscribe
  • totalQuantity
  • currency
  • originalCurrency
  • value
  • isRenewal
  • products
  • products.name: product title
  • value: sum products.price
  • originalCurrency: currency sent from SDK
  • currency: base currency registered when setting up Airbridge app
Ad Impression Ad Impression
  • ad_placement
  • ad_platform
  • ad_type
  • ad_unit_id
  • currency
  • eventType
  • revenue
  • Automatic tracking when Adiz, Adkit
    • Update planned
Ad Click Ad Click
  • ad_placement
  • ad_platform
  • ad_type
  • ad_unit_id
  • currency
  • eventType
  • revenue
  • Automatic tracking when Adiz, Adkit
    • Update planned
Evaluation Rate
  • buttontype
  • category
  • orient
  • category:
    • hive_review_click: Hive review UI
    • hive_native_review_request: Market Native Review Popup
  • orient:
    • portrait: "1"
    • landscape: "2"
Share Share

Automatic Event Tracking with Singular, Appsflyer, Firebase Analytics

  1. Get the required keys from each attribution dashboard. Refer to the guide from each attribution dashboard to learn how to get the keys.
  2. Configure hive_config.xml following the guide below. For more details, see the example codes below.

    • Install: No configuration is required.
    • Open: You only need to configure for Firebase Analytics.
    • Update: You need to configure for all attributions: Singular, Appsflyer, Firebase Analytics
    • Purchase: You need to configure for Singular and Firebase Analytics.
    • If you use AppsFlyer attribution with Hive SDK iOS (Native, Unity, Unreal), you need to set itunseConnectAppId for Apple AppID.
    <providers>
            <!-- Configure for Singular -->
            <!-- The name field of the Singular node is fixed to "Singular." -->
            <!-- The name and the value field of the event node are defined by each game studio. -->
            <Singular name="Singular" id="SDK_KEY" key="SDK_SECRET_KEY">
                    <events>
                            <event name="Purchase" value="purchase"/>
                            <event name="Update" value="update"/>
                    </events>
            </Singular>
    
            <!-- Configure for AppsFlyer -->
            <!-- The name field of the AppsFlyer node is fixed to "AppsFlyer." -->
            <!-- Do not set the id field of the AppsFlyer node. -->
            <!-- The name and the value field of the event node are defined by each game studio. -->
            <AppsFlyer name="AppsFlyer" id="unused" key="DEV_KEY" itunseConnectAppId="909923112">
                    <events>
                            <event name="Update" value="Update"/>
                    </events>
            </AppsFlyer>
    
            <!-- Configure for Firebase Analytics -->
            <!-- The name and the value field of the event node are defined by each game studio. -->
            <firebase>
                    <events>
                            <event name="Purchase" value="purchase"/>
                            <event name="Open" value="open"/>
                            <event name="Update" value="update"/>
                    </events>
            </firebase>
    </providers>
    
Note

It is recommended to automatically track all 4 events for your game operation.

The information sent on a purchase event

If you implement your game’s billing with the Hive IAP, the Hive SDK automatically sends the purchase event to the third party mobile app attributions. The information sent on each event is as follows.

EVENT NAME PARAMETER Remarks
Adjust Purchase
  • price
  • currency
  • orderId
  • pid
  • title
  • serverId
  • quantity
  • revenue
  • pid: product id
  • revenue: price * quantity
Airbridge Order Complete
  • totalQuantity
  • currency
  • originalCurrency
  • value
  • transactionID
  • inAppPurchased
  • products
  • products.name: product title
  • value: sum products.price
  • originalCurrency: currency sent from SDK
  • currency: base currency registered when setting up Airbridge app
Singular __iap__
  • r
  • pk
  • pcc
  • pn
  • pc
  • pq
  • pp
  • market
  • server
  • psku
  • pvid
  • haid
  • r: revenue (price * quantity)
  • pk: order id
  • pcc: currency
  • pn: title
  • pc: Inapp_Item
  • pq: quantity
  • pp: price
  • market: google
  • server:serverId
  • psku: product id
  • pvid: Hive PlayerID
  • haid: Hive Analytics ID
AppsFlyer Purchase
  • af_price
  • af_currency
  • af_quantity
  • af_content
  • af_receipt_id
  • custsom_product_id
  • af_content_type
  • af_revenue
  • custsom_product_id: product id
  • af_content: product description
  • af_content_type: title
  • af_revenue: price * quantity
Firebase Analytics Purchase
  • price
  • currency
  • orderId
  • pid
  • title
  • serverId
  • quantity
  • revenue
  • pid: product id
  • revenue: price * quantity