Airbridge supports integration with Google Analytics 4(GA4). With the integration, attribution data are passed from Airbridge to GA4, allowing you to leverage the attribution data to uncover in-depth insights into how users interact with your product in GA4.
For the GA4 integration, it is required to set GA4 SDK's Device ID as Airbridge SDK's Device Alias. After setting Device Alias and enabling GA4 integration on the Airbridge dashboard, the Event collected from Airbridge SDK and attribution data will be sent to GA4 via Server to Server.
Airbridge Android SDK: 2.19.5
Airbridge iOS SDK: 1.18.0
Airbridge React Native SDK: 1.5.0
Airbridge Flutter SDK: 3.0.2
Airbridge Unity SDK: 1.9.0
// MainApplication.java
@Override
public void onCreate() {
super.onCreate();
// Initialize Airbridge SDK
AirbridgeConfig config = new AirbridgeConfig.Builder("APP_NAME", "APP_TOKEN")
// Make Airbridge SDK explicitly start tracking
.setAutoStartTrackingEnabled(false)
.build();
Airbridge.init(this, config);
// Set device alias into Airbridge SDK
FirebaseAnalytics.getInstance(this).getAppInstanceId()
.addOnCompleteListener(new OnCompleteListener<String>() {
@Override
public void onComplete(@NonNull Task<String> task) {
String appInstanceId = task.getResult();
if (appInstanceId != null) {
Airbridge.setDeviceAlias("ga4_app_instance_id", appInstanceId);
}
// Explicitly start tracking
Airbridge.startTracking();
}
});
}
// MainApplication.kt
override fun onCreate() {
super.onCreate()
// Initialize Airbridge SDK
val config = AirbridgeConfig.Builder("YOUR_APP_NAME", "YOUR_APP_SDK_TOKEN")
// Make Airbridge SDK explicitly start tracking
.setAutoStartTrackingEnabled(false)
.build()
Airbridge.init(this, config)
// Set device alias into Airbridge SDK
Firebase.analytics.appInstanceId.addOnCompleteListener { task ->
val appInstanceId: String? = task.result
if (appInstanceId != null) {
Airbridge.setDeviceAlias("ga4_app_instance_id", appInstanceId)
}
// Explicitly start tracking
Airbridge.startTracking()
}
}
import FirebaseAnalytics
// AppDelegate.swift
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]?
) {
AirBridge.setAutoStartTrackingEnabled(false)
AirBridge.getInstance("YOUR_APP_SDK_TOKEN", appName:"YOUR_APP_NAME", withLaunchOptions:launchOptions)
if let appInstanceID = Analytics.appInstanceID() {
AirBridge.state()?.setDeviceAlias(key:"ga4_app_instance_id", value: appInstanceID)
}
// Explicitly start tracking
AirBridge.startTracking()
}
import analytics from '@react-native-firebase/analytics';
const appInstanceId = await analytics().getAppInstanceId();
Airbridge.state.setDeviceAlias("ga4_app_instance_id", appInstanceId);
Airbirdge.state.startTracking();
Attention
For the integration, set the
autoStartTrackingEnabled
option from airbridge.json asfalse
.
import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_analytics/firebase_analytics.dart';
final appInstanceId = await FirebaseAnalytics.instance.appInstanceId;
if (appInstanceId != null) {
Airbridge.state.setDeviceAlias("ga4_app_instance_id", appInstanceId);
}
Airbridge.state.startTracking();
Attention
For the integration, set the
autoStartTrackingEnabled
option fromairbridge.json
asfalse
.
private async void SetupAirbridgeIntegration()
{
#if UNITY_ANDROID || UNITY_IOS
string appInstanceId = await Firebase.Analytics.FirebaseAnalytics.GetAnalyticsInstanceIdAsync();
AirbridgeUnity.SetDeviceAlias("ga4_app_instance_id", appInstanceId);
// ... (에어브릿지 연동 코드를 여기에 추가해주세요)
#endif
AirbridgeUnity.StartTracking();
}
Attention
For the integration, set the 'autoStartTrackingEnabled' option from Project Setup as 'false'.
このページは役に立ちましたか?
import FirebaseAnalytics
// AppDelegate.swift
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]?
) {
AirBridge.setAutoStartTrackingEnabled(false)
AirBridge.getInstance("YOUR_APP_SDK_TOKEN", appName:"YOUR_APP_NAME", withLaunchOptions:launchOptions)
if let appInstanceID = Analytics.appInstanceID() {
AirBridge.state()?.setDeviceAlias(key:"ga4_app_instance_id", value: appInstanceID)
}
// Explicitly start tracking
AirBridge.startTracking()
}
import analytics from '@react-native-firebase/analytics';
const appInstanceId = await analytics().getAppInstanceId();
Airbridge.state.setDeviceAlias("ga4_app_instance_id", appInstanceId);
Airbirdge.state.startTracking();
import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_analytics/firebase_analytics.dart';
final appInstanceId = await FirebaseAnalytics.instance.appInstanceId;
if (appInstanceId != null) {
Airbridge.state.setDeviceAlias("ga4_app_instance_id", appInstanceId);
}
Airbridge.state.startTracking();
private async void SetupAirbridgeIntegration()
{
#if UNITY_ANDROID || UNITY_IOS
string appInstanceId = await Firebase.Analytics.FirebaseAnalytics.GetAnalyticsInstanceIdAsync();
AirbridgeUnity.SetDeviceAlias("ga4_app_instance_id", appInstanceId);
// ... (에어브릿지 연동 코드를 여기에 추가해주세요)
#endif
AirbridgeUnity.StartTracking();
}