Add the following repository under the allproject/repositores
block in your project/build.gradle
file.
allprojects {
...
repositories {
...
maven { url "https://sdk-download.airbridge.io/maven" }
...
}
...
}
If you're using Android Studio Arctic Fox (2020.3.1) or to create your project, or if your repository settings are done within the settings.gradle
file, add the following to your project/settings.gradle
file under the dependencyResolutionManagement/repositories
block.
dependencyResolutionManagement {
...
repositories {
...
maven { url "https://sdk-download.airbridge.io/maven" }
...
}
...
}
Add the following to the dependencies
block in your app/build.gradle
file
dependencies {
...
implementation "io.airbridge:sdk-android:2.+"
...
}
The Airbridge SDK uses JetBrains' Kotlin and Coroutines libraries for better stability and productivity. Please add following dependency libraries in your project when setting up using an ARR
file.
Airbridge Android SDK requires Kotlin stdlib and Kotlinx coroutines library version 1.4 or higher.
Please add the following permissions in your AndroidManifest.xml
file
<manifest ...>
...
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
...
</manifest>
Please add the following code under the onCreate
method of the Application
class file registered in the AndroidManifest.xml
file.
@Override
public void onCreate() {
super.onCreate();
AirbridgeConfig config = new AirbridgeConfig.Builder("YOUR_APP_NAME", "YOUR_APP_SDK_TOKEN")
.build();
Airbridge.init(this, config);
}
Attention
For proper operation, please make sure that the
init
method is called at the time ofonCreate
of theApplication
class.
You can find YOUR_APP_NAME
and YOUR_APP_SDK_TOKEN
in the "Airbridge Dashboard → Settings → Tokens" tab.
Once the basic installation and configuration of the Airbridge SDK is complete, you can test whether it has been correctly setup through the following methods.
Install and open the app on the device that you want to test
Go to "Airbridge dashboard → Raw Data → App Real-time Logs"
Enter Google Advertising ID of the device in the search box
Please re-check the guide above if you do not see any install event with your Google Advertising ID
You can find the Google Advertising ID of a device at
Settings
→Ads
→Your advertising ID
.
Use the following method if you want to use LogCat to see a more detailed log of the app.
Attention
Since this method may expose user information, please make sure the method is executed only for the
Build.DEBUG
case.
The following information must be registered at the "Airbridge dashboard → Tracking Link → Deep Link"
URI Scheme
sha256_cert_fingerprints
Enter the URI scheme that will be used, including ://
, in the "Android URI Scheme" area as shown in the picture above. (e.g. example://
, yoururischeme://
)
Attention
Airbridge supports lowercase, numbers, and some special characters (
-
,+
,.
) for URI Schemes.
Follow the below steps to obtain the sha256_cert_fingerprint
.
Prepare the keystore
file that you used to register your app with Google Play Store.
Execute the following command in Linux.
3. Copy the SHA256
value under the Certificate Fingerprints section and paste it under Android sha256_cert_fingerprints
as shown in the picture above.
Follow these steps to setup the intent-filter
Open AndroidManifest.xml
Add the following intent-filter
to the activity
that will process the deep link.
YOUR_APP_NAME.deeplink.page
: Airbridge App Links Version 2
YOUR_APP_NAME.airbridge.io
: Airbridge App Links Version 1
YOUR_APP_URI_SCHEME
: URI Scheme of the deep link (e.g. abc://
)
The deeplink.page
or abr.ge
domains are available when creating a tracking link at the Airbridge dashboard. Customized URLs such as go.my_company.com/abcd
can also be used as tracking links to improve the branding and CTR (Click Through Rate).
Please follow this guide to setup custom domains.
Create a /res/values/airbridge.xml
file and edit it as below
3. Add the following intent-filter
to the activity
that will process the deep link.
Attention
YOUR_CUSTOM_DOMAIN
should match the information in the Airbridge dashboard
The edit below is needed to process the deep link as defined by the intent-filter
above.
In the general case of a deferred deep link in Airbridge SDK, the intent-filter
automatically calls the corresponding activity
and can be processed in the same way as a deep link callback.
When the corresponding
activity
is called through an Airbridge deferred deep link, thedeferred=true
query parameter is also passed on.
You can use the following method if you do not want the deferred deep link to automatically call an activity
, or want to process a specific job with the information obtained through the deferred deep link.
Click on your URI scheme to test if your deep link has been properly set up in the Airbridge SDK.
YOUR_APP_URI_SCHEME://
The results will show on the "Airbridge dashboard → Raw Data → App Real-time Log" tab if everything is working.
To measure the fragmented contributions of users between web and app, Airbridge collects the following user identifier information.
User Email: Email address
User Phone: Phone number
User ID: Unique User ID (The ID value that specifies the user must be the same in both web and mobile)
User Alias: Identifiers that can represent users (e.g. loyalty program ID, affiliate integrated ID, etc)
The user's email and phone numbers are hashed (SHA256) by default and then sent to servers.
You can set the user identifier as below for the SDK.
Name | Description | Limitations |
---|---|---|
| User email | Hashed by default |
| User phone number | Hashed by default |
| User ID | - |
| User alias | - Maximum 10 aliases |
Once the user identifier has been setup, all events will be forwarded with the corresponding identity information.
Additional user attributes can be used for more accurate Multi-Touch Attribution (MTA) analyses, additional internal data analysis, and linking third-party solutions.
Name | Description | Limitations |
---|---|---|
| User attribute | - Maximum 100 attributes |
Check your user information settings at "Airbridge Dashboard → Raw Data → App Real-time Log".
Setup a device alias through the Airbridge SDK. The alias will be sustained even after the app closes, unless otherwise deleted.
Method | Description |
---|---|
| Add the key value pair to the device identifier. |
| Delete the corresponding device alias. |
| Delete all device aliases. |
All events called by the Airbridge SDK can be sent with the following fields.
Name | Type | Description |
---|---|---|
| String | Name of the event Required |
| String | Event attribute 1 |
| String | Event attribute 2 |
| Number | Event attribute value |
| Map<String, Object> | Custom attributes |
| Semantic attributes class | Semantic attributes |
Below is an example of how you can send a standard event using the Airbridge SDK.
If your application has specific needs that are not covered by a standard event category, you can log custom events as below.
Please refer to guide for more details on semantic attributes supported by the Airbridge SDK.
Alternatively, you can pre-define classes and inherit them depending on the event your app needs.
View Home Screen
View Search Results
View Product List
View Product Details
Add to Cart
Order Complete
Event information sent from the Airbridge SDK should be seen in the "Airbridge dashboard → Raw Data → App Real-time Log" tab.
Protection against SDK spoofing is available once you set up the app's SDK signature. Settings can be changed by calling setSDKSignatureSecret
before the SDK initialization code.
Please ask your CSM for the "SDK Signature Secret ID" and "SDK Signature Secret" values.
If you want to send user identity information without hashing it for internal data analysis, you can disable hashing by turning off the following option.
Attention
Other security measures must be taken internally when sensitive personal information such as "User Email" and "User Phone" is being handled.
Airbridge SDK does not resend an app open event if the user relaunches the app within the set session time. It will only send an app open event when the user opens the app after the set session time.
Use this function if privacy laws apply, and data should only be collected and transferred with consent. (e.g GDPR, CCPA)
It may be difficult to see the re-engagement performance through Airbridge if there are too many deep link actions within the advertiser's app. The following option can be used to receive deep link events for Airbridge deep links only.
This option will measure deep links only if the following requirements are met.
The app is opened through a airbridge.io
link
The app is opened through a deeplink.page
link
The app is opened through a Custom Domain Setup that is registered on the Airbridge dashboard
The app is opened through a link that contains airbridge_referrer
information in the query
The settings below will allow Airbridge SDK to utilize Facebook's deferred app link information.
Reference - https://developers.facebook.com/docs/app-events/getting-started-app-events-android Reference - https://developers.facebook.com/docs/app-ads/deep-linking
Add the following repository to the project/build.gradle
file.
Add the following under the dependencies
block of the app/build.gradle
file.
Add the following string in the app/res/values/string.xml
file.
Add the following meta-data
under the application
element in the AndroidManifest.xml
file.
Set the below option to true
.
App uninstallation tracking through Firebase Messaging is supported by Airbridge Android SDK
v2.6.0
and above.
Please refer to this page for more information on app uninstallation tracking.
Airbridge SDK can collect user location information through the following method.
Attention
Location information must be collected for legal purposes through legal methods.
Attention
Airbridge SDK collects
LastKnownLocation
information. If the GPS information is not obtained, the value may not exist even if the corresponding permissions and settings are complete.
If advertisers need to analyze their application inflow performance for each market separately(e.g. Google Play Store, One Store, Huawei Store), you can set identifiers for each application and it will be reflected on the Airbridge dashboard.
Insert the app market's name(e.g. playStore
, oneStore
, huaweiStore
) at andriod:value
.
Insert the app market's name(e.g. playStore
, oneStore
, huaweiStore
) at setAppMarketIdentifier
.
The data can be utilized at the Airbridge dashboard through "Reports → Actuals → GroupBy → Event Property → App Market Identifier" and "Raw Data → App Raw Data → Export Raw Data → Select Property → App Market Identifier".
Installations per App Market
Error logs of the SDK are sent to the Airbridge server to improve the quality of the Airbridge SDK. These error logs only include the SDK's internal operations. You can disable this by turning off the following option.
When an event transmission failure occurs, the Airbridge SDK will store the event and retry at a later time. The following settings will allow you to limit the storage used for such events.
Event buffer size is slightly smaller than the actual size of the data due to metadata management.
Get attribution result data using the Airbridge SDK.
Below is a list of data fields that will be retrieved through the callback.
Field | Description |
---|---|
attributedChannel | Channel (String) |
attributedCampaign | Campaign (String) |
attributedAdGroup | Ad Group (String) |
attributedAdCreative | Ad Creative (String) |
attributedContent | Content (String) |
attributedTerm | Keyword (String) |
attributedSubPublisher | Sub Publisher (String) |
attributedSubSubPublisher1 | Sub-sub Publisher 1 (String) |
attributedSubSubPublisher2 | Sub-sub Publisher 2 (String) |
attributedSubSubPublisher3 | Sub-sub Publisher 3 (String) |
If the event is unattributed, below is an example of the response you'll get.
Guidelines for using attribution result data
Attribution data exists
Attribution data is forwarded within 40 seconds of SDK initialization.
If the app was closed and attribution data wasn't received, attribution data is forwarded within 40 seconds when the app is opened again.
On very rare occasions, attribution data could take up to 5 minutes to be received.
Attribution data does not exist
Attribution data will be received 3 hours after SDK initialization.
It is not recommended to utilize these attribution values for real-time processing
It is possible to setup event transmission intervals using the below code.
Attention
An
IllegalArgumentExcpeion
runtime error will occur ifsetEventTransmitInterval
is set to a negative number.
The following code allows you to collect lifecycle events (ORGANIC_REOPEN
, FOREGROUND
) within the session timeframe.
Empty the device's internal DB of unprocessed events that were not sent to Airbridge.
Redirect users to other pages without going through a browser by using the below feature.
Attention
Custom domain tracking links with custom short IDs can't be used.
http://deeplink.ab180.co/custom: Invalid
https://abr.ge/a3b1c2: Valid
All Airbridge functions can be turned off.
Attention
If
setResetEventBufferEnabled
is set to true andsetSdkEnabled
is set to false, thensetSdkEnabled
is prioritized andsetResetEventBufferEnabled
isn't processed.
While basic events (e.g. "install", "open", "deep link open") can be automatically tracked by only installing the Android SDK in your hybrid app, in-app events (e.g. sign-up, purchase, etc.) cannot be tracked as they are actually in-browser events that occur within a website of the WebView environment. Airbridge provides a simpler way to track in-app events by enabling the Android SDK to automatically pull all events from the web SDK that is installed on the website of the WebView environment. This replaces the hassle of having to create bridge functions between native and WebView environments.
Attention
Please note that in order to utilize this feature, both SDKs must be installed; Android SDK on the mobile native environment and web SDK on the website of the WebView environment.
Reference - Building Web Apps in WebView
Reference - Understanding Android WebView Javascript Interface
Please call the Airbridge::setJavascriptInterface
method in the target WebView as below.
You can find YOUR_WEB_TOKEN
in the "Airbridge dashboard → Settings → Tokens" tab
Setup the SDK on the actual web page by following the Web SDK guide
java.lang.NoClassDefFoundError: kotlin/coroutines/AbstractCoroutineContextKey
Error
Reference - https://github.com/Kotlin/kotlinx.coroutines/issues/1879
According to @qwwdfsad, the use of "kotlin-stdlib 1.3.70" and above is enforced when using "kotlinx-coroutines-core 1.3.5" and above.
Make sure that you're using "kotlin-stdlib 1.3.70" and above if you're using "kotlinx-coroutines-core 1.3.5" and above through the gradlew dependencies
command.
Reference - https://developer.android.com/guide/topics/data/autobackup
Airbridge SDK defines airbridge_auto_backup_rules.xml
in AndroidManifest.xml
to prevent automatic replication of internal data. If you need Auto Backup
for your Android app, you have to merge with airbridge_auto_backup_rules.xml
file yourself
When errors like Manifest merger failed : Attribute application@fullBackupContent value=(true)
occur, please add the following rules in your backup_rules.xml
file and add tools:replace="android:fullBackupContent"
inside application
element
Airbridge SDK defines airbridge_auto_backup_rules.xml
in AndroidManifest.xml
to prevent automatic replication of internal data. You may have to configure your auto backup rules if your app uses auto backup, which in turn might cause conflicts such as Manifest merger failed : Attribute application@fullBackupContent value=(true)
.
If such errors occur, you will need to set tools:replace="android:fullBackupContent"
under the application
element and merge the following rules to your backup_rules.xml
file.
Below are the auto backup rules defined in the Airbridge SDK.
Was this page helpful?