Superwall

IntegrationAttribute

Attributes for third-party integrations with Superwall.

Purpose

Enumeration of integration attributes that allow you to sync user identifiers from your analytics and attribution providers with Superwall. This enables better user tracking and attribution across platforms.

Signature

enum IntegrationAttribute {
  adjustId,
  amplitudeDeviceId,
  amplitudeUserId,
  appsflyerId,
  brazeAliasName,
  brazeAliasLabel,
  onesignalId,
  fbAnonId,
  firebaseAppInstanceId,
  iterableUserId,
  iterableCampaignId,
  iterableTemplateId,
  mixpanelDistinctId,
  mparticleId,
  clevertapId,
  airshipChannelId,
  kochavaDeviceId,
  tenjinId,
  posthogUserId,
  customerioId;
}

Values

ValueDescription
adjustIdThe unique Adjust identifier for the user.
amplitudeDeviceIdThe Amplitude device identifier.
amplitudeUserIdThe Amplitude user identifier.
appsflyerIdThe unique Appsflyer identifier for the user.
brazeAliasNameThe Braze alias_name in User Alias Object.
brazeAliasLabelThe Braze alias_label in User Alias Object.
onesignalIdThe OneSignal Player identifier for the user.
fbAnonIdThe Facebook Anonymous identifier for the user.
firebaseAppInstanceIdThe Firebase instance identifier.
iterableUserIdThe Iterable identifier for the user.
iterableCampaignIdThe Iterable campaign identifier.
iterableTemplateIdThe Iterable template identifier.
mixpanelDistinctIdThe Mixpanel user identifier.
mparticleIdThe unique mParticle user identifier (mpid).
clevertapIdThe CleverTap user identifier.
airshipChannelIdThe Airship channel identifier for the user.
kochavaDeviceIdThe unique Kochava device identifier.
tenjinIdThe Tenjin identifier.
posthogUserIdThe PostHog User identifier.
customerioIdThe Customer.io person's identifier (id).

Usage

Setting a single integration attribute:

await Superwall.shared.setIntegrationAttribute(
  IntegrationAttribute.mixpanelDistinctId,
  'user_123',
);

Setting multiple integration attributes:

await Superwall.shared.setIntegrationAttributes({
  IntegrationAttribute.mixpanelDistinctId: 'user_123',
  IntegrationAttribute.amplitudeUserId: 'amp_456',
  IntegrationAttribute.adjustId: 'adjust_789',
});

Removing an integration attribute:

// Set to null to remove
await Superwall.shared.setIntegrationAttribute(
  IntegrationAttribute.mixpanelDistinctId,
  null,
);

Syncing with analytics providers:

void _syncAnalyticsIds() async {
  // Get IDs from your analytics SDKs
  final mixpanelId = await MixpanelSDK.getDistinctId();
  final amplitudeId = await AmplitudeSDK.getUserId();
  
  // Sync with Superwall
  await Superwall.shared.setIntegrationAttributes({
    IntegrationAttribute.mixpanelDistinctId: mixpanelId,
    IntegrationAttribute.amplitudeUserId: amplitudeId,
  });
}

How is this guide?

Edit on GitHub