Install SDK
The Airbridge Android SDK can be installed using the method below. After installation, you can verify whether the SDK has been properly installed through an Android SDK test.Gradle (build.gradle)
Gradle (build.gradle)
- Declare the Airbridge maven repository within the
repositoriesblock of your project’sbuild.gradlefile.
- Add the Airbridge Android SDK package to your app’s
build.gradlefile. Then, click the link below to find the latest version and replace$HERE_LATEST_VERSIONwith the latest version.
- SDK version list: Link
Gradle (settings.gradle)
Gradle (settings.gradle)
- Declare the Airbridge maven repository within the
repositoriesblock of your project’ssettings.gradlefile.
- Add the Airbridge Android SDK package to your app’s
build.gradlefile.
Manual install
Manual install
.aar, you have to include the dependency library in your project. Refer to the following.build.gradle file contains repositories block, or refer to Gradle (settings.gradle) if your project’s settings.gradle file contains repositories block.Install Restricted SDK
Gradle (build.gradle)
Gradle (build.gradle)
- Declare the Airbridge maven repository within the
repositoriesblock of your project’sbuild.gradlefile.
- Add the Airbridge Android SDK package in your app’s
build.gradlefile.
Gradle (settings.gradle)
Gradle (settings.gradle)
- Declare the Airbridge maven repository within the
repositoriesblock of your project’ssettings.gradlefile.
- Add the Airbridge Android SDK package in your app’s
build.gradlefile.
Manual install
Manual install
.aar, you have to include the dependency libraries in your project. Refer to the following.build.gradle file contains repositories block, or refer to Gradle (settings.gradle) if your project’s settings.gradle file contains repositories block.Initialize SDK
Initializing the Airbridge Android SDK in the Android Application class is recommended.- Create an Application class.
- Set the generated Application in
AndroidManifest.xml.
- Get
Airbridgefrom the Application class.
- Add the following code snippet to the Application class file registered in
AndroidManifest.xml.
- Must be called in the
Applicationclass’sonCreate. - Must be called on the
Main thread.
- Set the following permissions.
Required permissions
Required permissions
AndroidManifest.xml.Advertising ID permissions
Advertising ID permissions
AndroidManifest.xml file to acquire the device’s ADID.From V2.13.0, the Airbridge Android SDK automatically adds the AD_ID permission that can acquire the ADID.If you have not set LAT(LimitAdTracking) and GAID appears as 00000000-0000-0000-0000-000000000000, you will need to add AD_ID permission with the following code snippet. The issue occurs because the AD_ID permission has been excluded, for example, by other third-party libraries.- If the
<manifest>tag in the AndroidManifest.xml file does not containxmlns:tools="http://schemas.android.com/tools", make sure to add this attribute.
Opt-in setup
autoStartTrackingEnabled to false, call the startTracking function at the point where you can collect events. When the startTracking function is called, the SDK will start collecting events.
- Initialize SDK in the Application class. Prevent automatic event tracking after initialization through the
autoStartTrackingEnabled.
- Collect user responses to the collection and use of personal information. If the user agrees to the collection and use of personal information, start tracking events.
Opt-out setup
setAutoStartTrackingEnabled function to true, call the stopTracking function at the point where event data cannot be collected. From the moment the stopTracking function is called, the SDK will stop collecting events.
SDK Signature
setSDKSignature function above the SDK initialization code.
- YOUR_APP_NAME: The name of your app on Airbridge. Navigate to [Settings]>[Tokens] in the Airbridge dashboard to find it.
- YOUR_APP_SDK_TOKEN: Android SDK Token. Navigate to [Settings]>[Tokens] in the Airbridge dashboard to find it.
- YOUR_SDK_SIGNATURE_SECRET_ID: Secret ID. Navigate to [Management]>[Fraud Validation Rules]>[SDK Signature] in the Airbridge dashboard to find it.
- YOUR_SDK_SIGNATURE_SECRET: Signature Secret. Navigate to [Management]>[Fraud Validation Rules]>[SDK Signature] in the Airbridge dashboard to find it.
Deep Linking
Deep linking allows you to redirect users from ads to specific locations within your app. The data collected from the tracking link enables you to monitor the performance of the deep link in Airbridge.How Airbridge Deep Links work
When a user clicks on the Airbridge tracking link, the scheme deep link embedded in the tracking link is converted into an Airbridge Deep Link, which can be either an HTTP deep link or a scheme deep link. This Airbridge Deep Link redirects the user to the desired app location. Then, the Airbridge SDK converts the Airbridge Deep Link back to the original scheme deep link embedded in the tracking link and passes it to the app.- Example scheme deep link embedded in the tracking link: YOUR_SCHEME://product/12345
-
Examples of Airbridge Deep Links
- HTTP deep link format 1: https://YOUR_APP_NAME.airbridge.io/~~~
- HTTP deep link format 2: https://YOUR_APP_NAME.abr.ge/~~~
- Scheme deep link format: YOUR_SCHEME://product/12345?airbridge_referrer=~~~

Set up deep linking
For the deep linking setup, the following information is required.- Deep link information submitted in the Airbridge dashboard
- In-app location address for user redirection
How to enter the deep link information into Airbridge dashboard
How to enter the deep link information into Airbridge dashboard
- Android URI scheme: The Airbridge Deep Link is converted to a schema deep link using the Android URI scheme. This information is necessary for the App Link and URI scheme.
- Package name: This is the Android app identifier necessary for the App Link and URI scheme.
- Android sha256_cert_fingerprints: This is used for setting the App Link domain. This information is necessary for the App Link.
- To redirect users as intended, submit the Android URI scheme and the sha256_cert_fingerprints differently for the production app and the development app.
- You can register multiple sha256_cert_fingerprints on the dashboard by entering them separated by commas(,).
- Play App signing
- using original key
- Naviagate to [Tracking Link]>[Deep Links] in the Airbridge dashboard.
-
Enter the Android URI scheme into the Android URI Scheme field. Include
://. For example, if the URI scheme isdemo, you must enterdemo://. - Enter the package name in the Package name field.
- Go to the Google Play Console and select your app.
- Navigate to [App integrity].
-
Copy the SHA-256 certificate fingerprint from the App signing key certificate section.
AttentionMake sure to copy from the correct section. This page contains two certificate entries:
- App signing key certificate ← Use this value
- Upload key certificate ← Do NOT use this value
- Enter the SHA256 value into the sha256_cert_fingerprints field.
- App launch with Airbridge Deep Links
- User redirection with Airbridge Deep Links
Enable app launch with Airbridge Deep Links
Enable app launch with Airbridge Deep Links
- Add an Activity that handles the deep link. Add an Activity class file to the src.
AndroidManifest.xml file.- For the scheme deep link setup, add an intent filter to the Activity that handles the deep link in the
AndroidManifest.xml.
://.<intent-filter> tags. If you add all <data> tags to a single <intent-filter> tag, deep links may not open your app properly.- For the App Links setup, add an intent filter under the Activity that handles the deep link in the
AndroidManifest.xml.YOUR_APP_NAMEis the App Name.
<intent-filter> tags. If you add all <data> tags to a single <intent-filter> tag, deep links may not open your app properly.Redirect users with Airbridge Deep Links
Redirect users with Airbridge Deep Links
Airbridge.handleDeeplink function to convert the Airbridge Deep Link into a scheme deep link.Use the converted scheme deep link to redirect users to the intended destination.Airbridge.handleDeeplink function passes true with the scheme deep link to onSuccess when an Airbridge Deep Link is input. For deep links other than Airbridge Deep Links, false is passed without a callback.The Airbridge.handleDeeplink function does not support user redirection. The redirection must be implemented using the URI passed to onSuccess of the Airbridge.handleDeeplink function.Set up deferred deep linking
When a user clicks on a tracking link with deferred deep linking capabilities and your app is not installed on the device, the Airbridge SDK collects the deep link as follows.How the Airbridge SDK collects deferred deep links
How the Airbridge SDK collects deferred deep links
- The
Airbridge.startTrackingfunction is called with the opt-in settings in place. Or, opt-in has not been set.
Airbridge.handleDeferredDeeplink function retrieves the stored Airbridge deep link and converts it into a scheme deep link to pass it to the app. Users are redirected to the intended destination using the converted scheme deep link.
Airbridge.handleDeferredDeeplink function returns true if it has been called for the first time after the install and waits for the Airbridge Deep Link to be retrieved, converts it to a scheme deep link, and passes it to onSuccess. You can use this scheme deep link to send users to the intended destination.
If there is no stored Airbridge Deep Link, null is passed to onSuccess. If the SDK is not initialized or if the Airbridge.handleDeferredDeeplink function has not been called for the first time, false will be returned.
The scheme deep link is usually a URL in the form of YOUR_SCHEME://... If you use services like Meta Deferred App Links, a different form of URL may be passed.
Set up custom domain
- Enter the custom domain address into the Airbridge dashboard by referring to this article
- When initializing the Airbridge SDK, use the
setTrackingLinkCustomDomainsfunction to add the custom domain address. TheYOUR_APP_CUSTOM_DOMAINshould be the Fully Qualified Domain Name (FQDN).
In-app Events
The Airbridge SDK collects user actions from the app as per settings and sends them as in-app events.Send in-app events
trackEvent method to send events. Call Airbridge to use the trackEvent method.
AirbridgeCategory, AirbridgeAttribute to use the category names and attributes predefined by Airbridge.
trackEvent function components and their types.
Event Category
Event Category
Attributes
Attributes
- Action, Label: Collect information that can be used as GroupBys in the Airbridge reports
- Value: Collect information that can be used for sales analysis. Airbridge can perform calculations using the collected data.
- Semantic Attribute: Collect predefined attributes by Airbridge.
- Custom Attributes: Collect attributes defined by Airbridge users.
Airbridge.trackEvent function and enter Custom Attributes through the customAttributes parameter.In the Airbridge.trackEvent function, you can enter Action, Label, Value, and Semantic Attributes using the semanticAttributes parameter and Custom Attributes using the customAttributes parameter.The semantic attributes predefined by Airbridge can be found in the user guide below.Refer to the example below.- JSON types: String, Number, Boolean, Object<String, JSON>, Array<JSON>
- Types that cannot be used in semantic attributes and custom attributes: Struct, Class, etc.
Event Category of Standard Events provided by the SDK (AirbridgeCategory)
Event Category of Standard Events provided by the SDK (AirbridgeCategory)
Semantic Attributes provided by the SDK (AirbridgeAttribute)
Semantic Attributes provided by the SDK (AirbridgeAttribute)
Additional in-app event settings
Configure in-app event sessions
Configure in-app event sessions
setSessionTimeout function.Configure in-app event transmission interval
Configure in-app event transmission interval
setEventTransmitInterval function, you can modify it to a maximum of 86,400 seconds (1 day).Refer to the example below.Configure in-app event storage
Configure in-app event storage
setEventBufferCountLimit function, and to limit the storage size of the SDK, use the setEventBufferSizeLimit function.Refer to the examples below.Clear unsent in-app events
Clear unsent in-app events
setClearEventBufferOnInitializeEnabled function to true, the event deletion option is activated.Configure device IDs
Configure device IDs
Example codes
Airbridge collects in-app events that are classified as Standard Events and Custom Events. Standard Events are events predefined by Airbridge. Refer to the example codes below.Sign-up, Sign-in, Sign-out, Home Screen, Product Catalog
Sign-up, Sign-in, Sign-out, Home Screen, Product Catalog
SignUp
SignIn
SingOut
Home Screen View
Product List View
Search Results, Product View, Add Payment Info, Add to Wishlist, Add to Cart
Search Results, Product View, Add Payment Info, Add to Wishlist, Add to Cart
Search result viewed
Product viewed
Add payment info
Add to wishlist
Add to cart
Initiate Checkout, Order Complete, Order Cancel, Start Trial, Subscribe, Unsubscribe
Initiate Checkout, Order Complete, Order Cancel, Start Trial, Subscribe, Unsubscribe
Initiate checkout
Order completed
Order canceled
Start trial
Subscribe
Unubscribe
Ad Impression, Ad Click, Complete Tutorial, Achieve Level, Unlock Achievement
Ad Impression, Ad Click, Complete Tutorial, Achieve Level, Unlock Achievement
Add impression
Ad click
Complete tutorial
Achieve level
Unlock achievement
User Data
Airbridge sends user data along with events. User data allows for a more accurate ad performance measurement.Set up User ID
User IDs refer to the user identifier used in a service. User IDs should be unique IDs that can identify unique users across websites and apps.Send additional user information
Airbridge.setHashUserInformationEnabled function is set to false, user emails and phone numbers are transmitted without being hashed. The default setting is true.
Clear user data
You can reset user information with theAirbridge.clearUser function.
Include User Information in Install/Open Events
The SDK automatically sends install and open events immediately after initialization. Therefore, if you call user information functions right after initialization, the user information may not be included in the install/open events depending on the event transmission timing. To ensure user information is included in install/open events, control the timing of event transmission through Opt-In setup. Implement in the following order:Additional SDK Settings
Refer to the information below for additional setup.Using Multiple Instance Apps
Airbridge object. However, in certain situations, you may need an independent SDK instance.
The SDK supports multi-tenant environments where multiple Airbridge projects can be operated simultaneously within a single app.
You can create a new instance using AirbridgeInterface.
Instance Creation and Initialization
Airbridge object and other instances, allowing you to use all SDK features, including initialization, independently.
Event Tracking Example
Set Up Deferred Deeplinks for Multiple Instance Apps
Airbridge.handleDeferredDeeplink(apps:onSuccess:onFailure) function.
When using the existing Airbridge.handleDeferredDeeplink(onSuccess:onFailure) function in a multi-app environment, each Airbridge instance may independently receive the deferred deeplink from the tracking link that was clicked, resulting in duplicate deliveries. This causes the onSuccess callback to be invoked multiple times, which can lead to unintended navigation behavior.
The Airbridge.handleDeferredDeeplink(apps:onSuccess:onFailure) function delivers via callback only the deferred deeplink from the most recently clicked tracking link, determined across all Airbridge instances passed through apps. The deferred deeplink is delivered only once per app install.
Airbridge.handleDeferredDeeplink(apps:onSuccess:onFailure) instead of Airbridge.handleDeferredDeeplink(onSuccess:onFailure).Restricting Identifier Tracking
You can prevent the SDK from collecting certain identifier data.Restricting Identifiers During SDK Initialization
Restricting Identifiers During SDK Initialization
setTrackingBlocklist method to specify which identifiers should be blocked. Events sent after this configuration will not include those identifiers.Restricting Identifiers During SDK runtime
Restricting Identifiers During SDK runtime
allowTrackingItem and blockTrackingItem functions to set the data to be restricted. The specified identifier items will be excluded or included. This does not affect events that have already been stored.Identifier Restriction List
Identifier Restriction List
Create tracking links within the app
createTrackingLink function to create tracking links. Refer to the code examples and the parameter details below.
option parameter in the createTrackingLink function to configure tracking link options.
Create trackingLink option
Create trackingLink option
onSuccess callback in the createTrackingLink function to pass the AirbridgeTrackingLink.
Create tracking links that launch the app or redirect users to the app store
Create tracking links that launch the app or redirect users to the app store
Create tracking links that launch the app or redirect users to a webpage
Create tracking links that launch the app or redirect users to a webpage
Create tracking links that redirect users to the app store only
Create tracking links that redirect users to the app store only
Create tracking links that redirect users to a webpage only
Create tracking links that redirect users to a webpage only
Use tracking links within the app
Depending on the method of opening the link, it may be challenging to properly use the tracking link within the app. By using theAirbridge.click function or the Airbridge.impression function, you can properly use the tracking link within the app without sending users to an external browser.
When the user clicks a tracking link within the app
When the user clicks a tracking link within the app
Airbridge.click function is called.Depending on the tracking link settings, the scheme deep link will be passed to the app, or the user will be redirected to the configured app store or website.When the user engages with a tracking link within the app
When the user engages with a tracking link within the app
Airbridge.impression function is called, and the impression event data is collected.Get attribution results
AirbridgeOptionBuilder.setOnAttributionReceived to get the attribution data of install events.
When the attribution results exist
When the attribution results exist
When no attribution result exists (Organic)
When no attribution result exists (Organic)
Track only Airbridge Deep Links
The Airbridge SDK collects deep link events when the app is opened through a deep link, even if the deep link is not an Airbridge Deep Link. Set thesetTrackAirbridgeDeeplinkOnlyEnabled function to true to collect deep link events only if the app is opened through an Airbridge Deep Link and prevent unnecessary event collection.
Compliance with Google DMA
To comply with the Digital Markets Act (DMA), the user consent data must be sent to Airbridge. For more information about the DMA and whether it applies to your service, refer to the Airbridge user guide.Collecting user consent data through consent management platforms
Collecting user consent data through consent management platforms
- When initializing the SDK within the Application class, set the
setCollectTCFDataEnabledfunction totrueand thesetAutoStartTrackingEnabledfunction tofalse.
- After the user consent data is stored in the consent management platform, call the
startTrackingfunction.
Collecting user consent data using the Airbridge.setDeviceAlias function
Collecting user consent data using the Airbridge.setDeviceAlias function
- Check the location of the users who launched the app. If their location is within the EEA, check whether the user consent data has been previously collected. If not, user consent data collection is not required.
- If no user consent data has been collected previously, you may collect the data using a prompt or other means. The user consent data fields that need to be collected are
adPersonalization,adUserData.
eea) to the Airbridge SDK using the Airbridge.setDeviceAlias function.- After the user consent data and the user location data are sent to the Airbridge SDK, call the
startTrackingfunction.
Set up Meta deferred app links
fetchDeferredAppLink function should not be used.- Add the following repository to the
project/build.gradlefile.
- Add the following code to the
dependenciesblock in theapp/build.gradlefile.
- Add the following string below to the
app/res/values/string.xmlfile.
- Add the following
<meta-data>to the<application>element in theAndroidManifest.xmlfile.
- Set the
setTrackMetaDeferredAppLinkEnabledfunction totrueto enable Meta deferred app links during the SDK initialization.
Initialize the Airbridge SDK with all functions disabled
setSDKEnabled function to false, the SDK can be initialized with all functions disabled.
Set up Meta Install Referrer collection
To collect the Meta Install Referrer, the Meta app ID should be passed to thesetMetaInstallReferrer function during the SDK initialization.
Set up uninstall tracking
Airbridge sends a silent push every day between 3:00 PM and 4:00 PM (UTC) to users who performed an app event at least once in the last 6 months to check if the app has been deleted. You can check the uninstall event in the Airbridge reports and raw data export files. Refer to the article below for the detailed setup instructions.Integrate with third-party solutions
An additional SDK setup is required to integrate with some third-party solutions. It is recommended that you complete this setup before collecting data with the Airbridge SDK. Refer to the articles listed below for integrating with third-party solutions.Third-party platforms integrated with Airbridge
Third-party platforms integrated with Airbridge
SDK logs
The logs provided by the Airbridge SDK are categorized intoDebug, Info, Warning, Error, and Fault levels. The Debug level is the least critical log, while the Fault level is the most critical log.
By default, the Airbridge SDK provides logs at Warning, Error, and Fault levels. By configuring the setLogLevel function with a specific log level, the logs from that specified level up to the Fault level will be available.