Skip to content

Attribution Events

Track user acquisition sources and campaign performance using attribution events in your React Native app.

Attribution Setup

Configure attribution tracking in your React Native app:

Integration Partners

Configure third-party attribution partners in your React Native project:

AppsFlyer Integration

javascript
import Upshot from "react-native-upshotsdk";
import appsFlyer from "react-native-appsflyer";

// Track AppsFlyer attribution data
appsFlyer.onAttributionCallback((data) => {
  Upshot.createAttributionEvent(JSON.stringify(data), function (eventId) {
    console.log("AppsFlyer attribution tracked");
  });
});

Adjust Integration

javascript
import Upshot from "react-native-upshotsdk";
import { Adjust, AdjustConfig } from "react-native-adjust";

// Track Adjust attribution data
const adjustConfig = new AdjustConfig(
  "{your_app_token}",
  AdjustConfig.EnvironmentProduction
);
adjustConfig.setAttributionCallbackListener((attribution) => {
  Upshot.createAttributionEvent(
    JSON.stringify(attribution),
    function (eventId) {
      console.log("Adjust attribution tracked");
    }
  );
});

Branch Integration

javascript
import Upshot from "react-native-upshotsdk";
import branch from "react-native-branch";

// Track Branch attribution data
branch.subscribe(({ error, params, uri }) => {
  if (params && !error) {
    Upshot.createAttributionEvent(JSON.stringify(params), function (eventId) {
      console.log("Branch attribution tracked");
    });
  }
});

Powered by Upshot.ai