Skip to content

Automatic event tracking

The SDK automatically tracks four events — Install, Open, Update, and Purchase — and sends them to each attribution provider. These events correspond to app install, app open, app update, and in-app purchase events. Apps do not need to implement tracking code for these four events.

Adjust automatic event tracking

  1. Obtain the required tokens. For instructions on how to issue them, refer to Add Adjust events.

    To automatically track Purchase and Update events, register the events in the Adjust dashboard and verify the app token and event tokens. The app token is available on the dashboard main page, and event tokens are found at Dashboard > All Settings > Events.

    Token issuance is not required for automatic tracking of Install and Open events.

  2. Add the tokens to hive_config.xml.

    Add the app token, Purchase event token, and Update event token to hive_config.xml. Refer to the example code below.

    No hive_config.xml configuration is required for automatic tracking of Install and Open events.

  3. The Adjust dashboard provides SDK Signature V3 to prevent app spoofing. To use SDK Signature, verify your contract with Adjust.

Note

It is recommended to automatically track all four events.

SDK Signature integration

If you previously used an older version of SDK Signature, refer to SDK Signature migration before integrating the signature library.

If you are using SDK Signature for the first time, the integration steps for Android, iOS, and Unity are described below.

Android

To use SDK Signature in an Android environment, configure the settings as follows.

  1. To use SDK Signature, add the Adjust attribution dependency to the module-level build.gradle file.
dependencies {
    implementation "com.com2us.android.hive:hive-analytics-provider-adjust"
}
  1. Go to the Adjust dashboard and follow Add your digital certificate fingerprints to Adjust's allowlist to configure fingerprints.

For fingerprint extraction methods, refer to Set up your certificates in the Adjust suite. The extraction method varies depending on the certificate type used by each app.

iOS

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

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

Unity

To use SDK Signature in the Unity engine, configure it from the menu.

In the Unity Inspector menu, select Hive - Hive Dependencies(ExternalDependency) and check Adjust as shown below. No additional configuration is required.

Verifying SDK Signature integration status

To verify that the SDK Signature library has been successfully integrated, set zone to sandbox in SDK configuration. Then follow the steps below.

For more information, refer to Add your digital certificate fingerprints to Adjust's allowlist.

  1. Completely uninstall the app from the test device so that the install information is sent.
  2. Go to the Adjust dashboard testing console, enter the test device information, and click Forget Device to clear all data.
  3. Install the app on the test device, then launch the app to send the install information to Adjust.
  4. Enter the advertising ID or IDFA of the test device in the testing console to retrieve the install event information.

The SignatureVerificationResult field (signature verification result) should display the value Valid Signature.

The SignatureVersion field value (signature version) should be 3.

SDK Signature migration

To use the latest SDK Signature, you must remove the configuration for the previous SDK Signature version.

Android, iOS

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

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

    <!-- The Adjust node id field is not configured. -->
    <!-- The Adjust node name field is a fixed value of "Adjust". -->
    <!-- The event node name field can be set freely by the app. -->

    <!-- Remove all of 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"> -->
    <Adjust name="Adjust" key="APP_TOKEN">
        <events>
            <event name="Purchase" value="PURCHASE_EVENT_TOKEN" />
            <event name="Update" value="UPDATE_EVENT_TOKEN" />
        </events>
    </Adjust>

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

Unity

In the Unity development environment, there is no need to remove the configuration for the previous SDK Signature version.

Airbridge automatic event tracking

  1. Obtain the required tokens. Refer to Airbridge for instructions on how to issue them.

    Obtain 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 configuration to hive_config.xml. Refer to the hive_config.xml example code below.

  3. For Windows, console configuration is required instead of hive_config.xml configuration. Refer to Windows configuration below.

  4. If you are applying Windows together with Android and iOS, contact Airbridge for prerequisite configuration.

  5. Airbridge provides SDK Signature to prevent app spoofing. To use this feature, first verify your contract with Airbridge.

    Obtain the keys and add them as the secretId and secret values in hive_config.xml.

    For SDK Signature security information, refer to Airbridge SDK Signature. This feature is supported on Android and iOS only; Windows is not supported.

SDK Signature integration

If you are using SDK Signature for the first time, configure it according to the instructions below.

hive_config.xml example code

<providers>
    <!-- (code omitted) -->
    <!-- Configure Airbridge -->
    <!--The Airbridge node name field is a fixed value of "Airbridge". -->
    <!--The Airbridge node id field is not configured. -->
    <!-- The event node name and value fields can be set freely by the app. -->

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

    <!-- (code omitted) -->
</providers>
<providers>
    <!-- (code omitted) -->
    <!-- Configure Airbridge -->
    <!--The Airbridge node name field is a fixed value of "Airbridge". -->
    <!--The Airbridge node id field is not configured. -->
    <!-- The event node name and value fields can be set freely by the app. -->

    <Airbridge name="Airbridge" key="APP_SDK_TOKEN" appName="APP_NAME" secretId="SECRET_ID" secret="SECRET">
        <events>
            <event name="Install" value="Install"/>
            <event name="Update" value="Update" />
            <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>

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

Android, iOS

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

Windows

  1. In the console, proceed with the Marketing attribution - Airbridge configuration.

    For Windows, there is no need to set the secretId and secret keys related to Airbridge in hive_config.xml.

  2. Configure hive_config.xml by following the instructions below. Refer to the hive_config.xml example code.

    Setting the value defined by Airbridge sends the event as an Airbridge standard event. For specific event types, refer to Airbridge event types.

    • Install event configuration required
    • Open event configuration required
    • Update event configuration required
    • PrePurchase event configuration required; value airbridge.initiateCheckout for standard event sending
    • PurchaseCancel event configuration required; value airbridge.ecommerce.order.canceled for standard event sending
    • Purchase event configuration required; value airbridge.ecommerce.order.completed for standard event sending
  3. Optional: Airbridge event sending delay

    The PC SDK for Windows provides a feature to delay sending specific Airbridge events until after Sign-In. This feature is activated and managed by defining relevant attributes in hive_config.xml.

    Define the relevant attributes using the win: prefix in the <Airbridge> tag of the hive_config.xml file, as shown in the example below.

<providers>
    <!-- (code omitted) -->
    <Airbridge
        win:DeferSendUntilGate="signin"
        win:DeferScope="include"
        win:DeferEventList="Install,Update,Open"
        win:DeferSendTimeout="86400"
        win:DeferQueueMax="1000">
        <events>
            <event name="Install" value="Install"/>
            <event name="Open" value="Open"/>
        </events>
    </Airbridge>
    <!-- (code omitted) -->
</providers>

The hive_config.xml attributes used for Airbridge event sending delay are as follows.

Attribute Description Options Max value Notes
win:DeferSendUntilGate Specifies the gate (timing) for when event sending starts
  • init (default)
  • signin
Sets the point at which queued events start being sent to Airbridge.
  • init: Starts sending immediately after SDK initialization.
  • signin: Starts sending after the Sign-In event occurs.
win:DeferScope Specifies the scope of events for deferred sending
  • all
  • include
  • none (default)
Sets the scope of events to which the deferred sending feature applies.
  • none (default): Deferred sending is not used.
  • all: All occurring events are deferred until the specified gate.
  • include (recommended): Only events specified in win:DeferEventList are deferred.
win:DeferEventList List of events to be deferred Applies only when win:DeferScope is set to include.
  • List the names of events you want to defer, separated by ','(comma). Spaces are allowed.
  • Example: "Install,Update,Open"
win:DeferSendTimeout Maximum delay time (seconds) 86400 (24 hours)
  • If DeferSendUntilGate does not open within the set time (seconds), queued events are sent immediately.
  • If not configured or the value is 0, events are not sent and wait indefinitely until the gate opens.
win:DeferQueueMax Maximum number of deferred events to store 1000
  • The maximum number of events that can be stored in the deferred sending queue.
  • If this limit is exceeded, the oldest events are automatically removed first.
  • If not configured or the value is 0, the maximum limit is ignored.

Unity

Select Hive - Edit Config from the menu, then activate the Android or iOS tab. Next, set the values received for secretId, secret under Airbridge.

Information sent when automatic events occur

When the following specific events occur, events are automatically sent to Airbridge app attribution. The information sent at that time is as follows.

EVENT NAME PARAMETER Notes
Sign-in Sign-in
  • user.externalUserID: playerId
Sign-out Sign-out
Checkout initiation Initiate Checkout
  • totalQuantity
  • currency
  • originalCurrency
  • products
  • products.name: product title
  • originalCurrency: currency sent by the SDK
  • currency: base currency registered when configuring the Airbridge app
Purchase complete Order Complete
  • totalQuantity
  • currency
  • originalCurrency
  • value
  • transactionID
  • inAppPurchased
  • products
  • products.name: product title
  • value: sum products.price
  • originalCurrency: currency sent by the SDK
  • currency: base currency registered when configuring the Airbridge app
Purchase cancel Order Cancel
  • transactionType
  • totalQuantity
  • currency
  • originalCurrency
  • value
  • inAppPurchased
  • products
  • transactionType: "cancel"
  • products.name: product title
  • value: sum products.price
  • originalCurrency: currency sent by the SDK
  • currency: base currency registered when configuring the Airbridge app
Subscription Subscribe
  • totalQuantity
  • currency
  • originalCurrency
  • value
  • isRenewal
  • products
  • products.name: product title
  • value: sum products.price
  • originalCurrency: currency sent by the SDK
  • currency: base currency registered when configuring the Airbridge app
Ad impression Ad Impression
  • ad_placement
  • ad_platform
  • ad_type
  • ad_unit_id
  • currency
  • eventType
  • revenue
  • Automatically tracked when Adiz or Adkit is integrated
    • To be updated
Ad click Ad Click
  • ad_placement
  • ad_platform
  • ad_type
  • ad_unit_id
  • currency
  • eventType
  • revenue
  • Automatically tracked when Adiz or Adkit is integrated
    • To be updated
Rating Rate
  • buttontype
  • category
  • orient
  • category:
    • hive_review_click: review UI
    • hive_native_review_request: market native review popup
  • orient:
    • portrait: "1"
    • landscape: "2"
Share Share

Singular, AppsFlyer, Firebase Analytics automatic event tracking

  1. Obtain keys from each attribution dashboard. For information on how to obtain keys, refer to the dashboard instructions provided by each attribution provider.

    • Singular: Obtain the SDK Key and SDK SecretKey from the dashboard.
    • AppsFlyer: Obtain the Dev key from Dashboard > App Settings.
    • Firebase Analytics: No key issuance is required.
  2. Configure hive_config.xml by following the instructions below. Refer to the example code below.

    • Open: Configuration is required only for the Firebase Analytics attribution.
    • Update: Add configuration for all of Singular, AppsFlyer, and Firebase Analytics.

    • When using the AppsFlyer attribution on the iOS SDK (Native, Unity, Unreal Engine), set the itunseConnectAppId value to configure the Apple AppID.

    <providers>
        <!-- Configure Singular -->
        <!-- The Singular node name field is a fixed value of "Singular". -->
        <!-- The event node name and value fields can be set freely by the app. -->
        <Singular name="Singular" id="SDK_KEY" key="SDK_SECRET_KEY">
            <events>
                <event name="Update" value="update" />
            </events>
        </Singular>
    
        <!-- Configure AppsFlyer -->
        <!-- The AppsFlyer node name field is a fixed value of "AppsFlyer". -->
        <!-- The AppsFlyer node id field is not configured. -->
        <!-- The event node name and value fields can be set freely by the app. -->
        <AppsFlyer name="AppsFlyer" id="unused" key="DEV_KEY" itunseConnectAppId="909923112">
            <events>
                <event name="Update" value="Update" />
            </events>
        </AppsFlyer>
    
        <!-- Configure Firebase Analytics -->
        <!-- The event node name and value fields can be set freely by the app. -->
        <firebase>
            <events>
                <event name="Open" value="open"/>
                <event name="Update" value="update"/>
            </events>
        </firebase>
    </providers>
    
Note

For smooth app operation, it is recommended to automatically track all of the Update, Open, and Purchase events.

Information sent when a purchase event occurs

When a payment is made via IAP, a purchase event is automatically sent to third-party mobile app attributions. At this time, attributions other than Adjust send the event as the standard purchase event defined by each attribution provider. The information sent is as follows.

EVENT NAME PARAMETER Notes
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 by the SDK
  • currency: base currency registered when configuring the 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 af_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