Amplitude V2

Airbridge supports integration with Amplitude. With the integration, attribution data are passed from Airbridge to Amplitude, allowing you to leverage the attribution data to uncover in-depth insights into how users interact with your product in Amplitude.

Airbridge ↔ Amplitude Integration

For the Amplitude integration, it is required to set Amplitude SDK's Device ID as Airbridge SDK's Device Alias. After setting Device Alias and enabling Amplitude integration on the Airbridge dashboard, the Event collected from Airbridge SDK and attribution data will be sent to Amplitude via Server to Server.

Minimum SDK Version

  • Airbridge Android SDK: 2.19.5

  • Airbridge iOS SDK: 1.18.0

  • Airbridge Web SDK Loader: 1.3.0

  • Airbridge React Native SDK: 1.5.0

  • Airbridge Cordova SDK: 2.0.2

  • Airbridge Flutter SDK: 3.0.2

  • Airbridge Unity SDK: 1.9.0

Integration - Android

12345678910111213141516
// 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
    Airbridge.setDeviceAlias("amplitude_device_id", Amplitude.getInstance().getDeviceId());
    // Explicitly start tracking
    Airbridge.startTracking();
}

Integration - iOS

1234567891011
// AppDelegate.swift
func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]?
) {
    AirBridge.setAutoStartTrackingEnabled(false)
    AirBridge.getInstance("YOUR_APP_TOKEN", appName:"YOUR_APP_NAME", withLaunchOptions:launchOptions)

    AirBridge.state()?.setDeviceAlias(withKey:"amplitude_device_id", value:Amplitude.instance().deviceId())
    AirBridge.startTracking()
}

Integration - Web

123456
airbridge.init({
    ...
  autoStartTrackingEnabled: false,
})
airbridge.setDeviceAlias('amplitude_device_id', Amplitude.getInstance().getDeviceId())
airbridge.startTracking()

Integration - React Native

1234
await Amplitude.init(...)

Airbridge.state.setDeviceAlias("amplitude_device_id", await Amplitude.getDeviceId())
Airbridge.state.startTracking()

Attention

For the integration, set the autoStartTrackingEnabled option from airbridge.json as false.

Integration - Cordova

12
Airbridge.state.setDeviceAlias("amplitude_device_id", amplitude.getDeviceId())
Airbridge.state.startTracking()

Attention

For the integration, set the autoStartTrackingEnabled option from airbridge.json as false.

Integration - Flutter

12
Airbridge.state.setDeviceAlias("amplitude_device_id", Amplitude.getInstance().getDeviceId())
Airbridge.state.startTracking()

Attention

For the integration, set the autoStartTrackingEnabled option from airbridge.json as false.

Integration - Unity

123
string DeviceID = Amplitude.getInstance().getDeviceId();
AirbridgeUnity.SetDeviceAlias("amplitude_device_id", DeviceID);
AirbridgeUnity.StartTracking()

Attention

For the integration, set the 'autoStartTrackingEnabled' option from Project Setup as 'false'.

Was this page helpful?

Have any questions or suggestions?