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.

  5. The SignatureVerificationResult field should display the value Valid Signature.

  6. 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. Add the token, app name, and Update event settings to hive_config.xml. See the example code below.
  3. Airbridge provides SDK Signature to prevent app spoofing. To use the related feature, you must check the agreement with Airbridge. To use the related feature, obtain a key and add it to secretId and secret in hive_config.xml. For more information about SDK signature security information, refer to the Airbridge Guide.

SDK Signature Integration

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

Android, iOS

Set the values ​​in the secretId and secret keys in the Airbridge-related settings in hive_config.xml.

<providers>
    <Airbridge name="Airbridge" key="APP_SDK_TOKEN" appName="APP_NAME" secretId="SECRET_ID" secret="SECRET">
        <events>
            <event name="Update" value="Update" />
        </events>
    </Airbridge>
</providers>

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.
  3. 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