Adjust

The Magify Flutter SDK does not depend on the Adjust SDK. If your app already integrates adjust_sdk for attribution, forward its identifier and acquisition-cost data to Magify with two calls.

setAdjustId

Future<void> setAdjustId(String? adjustId)

Hands the SDK your Adjust device/attribution identifier for data stitching. Pass null to clear a previously set value. There is also a Future<String?> get adjustId getter that returns the last value the Dart side reported.

setAdjustCostData

Future<void> setAdjustCostData({double? amount, String? currency, String? type})

Reports the Adjust acquisition cost of the install: the cost amount, its currency, and the cost type (for example, "cpi"). All three parameters are optional and independent — pass only what Adjust gave you.

Wiring it up

import 'package:adjust_sdk/adjust.dart';
import 'package:adjust_sdk/adjust_attribution.dart';
import 'package:magify_flutter_sdk/magify_sdk.dart';

void onAttributionChanged(AdjustAttribution attribution) {
  MagifyClient.instance.setAdjustId(attribution.adid);

  MagifyClient.instance.setAdjustCostData(
    amount: attribution.costAmount,
    currency: attribution.costCurrency,
    type: attribution.costType,
  );
}

// When configuring the Adjust SDK:
adjustConfig.attributionCallback = onAttributionChanged;

Call both setters after MagifyClient.instance.init has completed — typically from Adjust's attribution-changed callback, once Adjust has resolved the install.

Notes

  • Neither setter has a getter for the cost data specifically (only adjustId is readable back); treat both as one-way reporting calls.
  • They do not block Magify's own startup: the first context request goes out without cost data if Adjust hasn't resolved it yet, and the config is reloaded once the data arrives.
  • A dropped or invalid input leaves the previously reported value in place.

Next step

See AppsFlyer if you also integrate AppsFlyer, or Your own integration for the general pattern this call follows.

Related articles

ImageCreative

Introduction

MagifyConfig

MagifyManager․Features

ICampaign

SubscriptionService