Importing attributions on React Native

AppsFlyer

Set up the sending of attribution data in the AppMetrica SDK.

appsFlyer.initSdk(
    {
      devKey: '<YOUR_DEV_KEY>',
      onInstallConversionDataListener: true,
    }
);

appsFlyer.onInstallConversionData((appsFlyerAttribution) => {
  if (appsFlyerAttribution.type === 'onInstallConversionDataLoaded') {
    ExternalAttributions.appsflyer(appsFlyerAttribution);
  }
});

Adjust

Set up the sending of attribution data in the AppMetrica SDK.

const adjustConfig = new AdjustConfig("<YOUR_APP_TOKEN>", 'production');
adjustConfig.setAttributionCallback((adjustAttribution) => {   
  ExternalAttributions.adjust(adjustAttribution);
});
Adjust.initSdk(adjustConfig);

Kochava

Set up the sending of attribution data in the AppMetrica SDK.

KochavaTracker.instance.retrieveInstallAttribution().then((kochavaAttribution) => {
    ExternalAttributions.kochava(kochavaAttribution);
});

Tenjin

Set up the sending of attribution data in the AppMetrica SDK.

Tenjin.getAttributionInfo(
    (tenjinAttribution) => {
        ExternalAttributions.tenjin(tenjinAttribution);
    },
    () => {
        console.error('Attribution info failed');
    }
);

Airbridge

Set up the sending of attribution data in the AppMetrica SDK.

Airbridge.state.setAttributionListener((airbridgeAttribution) => {
    ExternalAttributions.airbridge(airbridgeAttribution);
});

Singular

Set up the sending of attribution data in the AppMetrica SDK.

const singularConfig = new SingularConfig(
  '<YOUR_API_KEY>',
  '<YOUR_SECRET_KEY>',
);
singularConfig.withDeviceAttributionCallbackHandler(singularAttribution => {
    ExternalAttributions.singular(singularAttribution);
});

If you didn't find the answer you were looking for, you can use the feedback form to submit your question. Please describe the problem in as much detail as possible. Attach a screenshot if possible.

Contact support