Skip to main content
Question

AppsflyerID not defaulting to user ID and remaining NULL


Forum|alt.badge.img+3

Prevously my appsflyerID in revenue cat events integrations would be set to the user ID as I did not set it manually. As of March 25th this stopped happening and the integration is broken as the appsflyer id is required for it to work. 

Why did the appsflyer IDs stop auto populating?

 

hussain
RevenueCat Staff
Forum|alt.badge.img+3
  • RevenueCat Staff
  • June 4, 2025

Hi Christopher,

Thanks for reaching out. I’m sorry for the confusion around your AppsFlyer integration.

Here’s what’s happening:

Although our documentation has always stated that $appsflyerId is required for the integration to work, we previously set the App User ID as the AppsFlyer ID if a value wasn’t provided. In mid-March, we learned from AppsFlyer that we shouldn’t be doing that, and that the $appsflyerId should be explicitly defined. Hence, we removed the automatic substitution. That’s why your AppsflyerID suddenly stopped defaulting to the user ID and now remains null.

Going forward, you must explicitly set $appsflyerId in your RevenueCat SDK configuration. If you leave it null, no events will be sent to AppsFlyer and the integration will remain broken. For example, in your SDK setup you’d do something like:

Purchases.configure(withAPIKey: "public_sdk_key")

// Automatically collect the $idfa, $idfv, and $ip values
Purchases.shared.attribution.collectDeviceIdentifiers()

// Set the Appsflyer Id
Purchases.shared.attribution.setAppsflyerID(AppsFlyerLib.shared().getAppsFlyerUID())

Once appsflyerID is set to a valid AppsFlyer identifier, RevenueCat will include it on every event and your integration should resume working as expected.

You can view a detailed guide on settings up AppsFlyer integration here.

Please let me know if you run into any trouble setting $appsflyerID or have any other questions. We’re here to help.

Best,

Hussain


Forum|alt.badge.img+3

Thats what I suspected. If a flutterflow revenue cat integration is being used do you know of a way to include this parameter from within flutterflow?


hussain
RevenueCat Staff
Forum|alt.badge.img+3
  • RevenueCat Staff
  • June 5, 2025

Hi Christopher,


I have limited experience with FlutterFlow, but I still took some time to look into this issue for you. The following approach might work to get the AppsFlyer integration working for your app again.

 

1. Enable plugins

In FlutterFlow’s Settings, make sure you’ve enabled the AppsFlyer and RevenueCat Flutter packages. And ensure you are using the latest versions of appsflyer_sdk and purchases_flutter for your project.

 

2. Create Custom Action
In FlutterFlow’s “Custom Functions & Actions” panel, create a new Dart Action called something like setAppsflyerIdForRC.

Use code similar to:

import 'package:appsflyer_sdk/appsflyer_sdk.dart';
import 'package:purchases_flutter/purchases_flutter.dart';

Future<void> setAppsflyerIdForRC() async {
  // Make sure AppsFlyer has initialized first
  final appsflyer = AppsFlyerSdk(/* your AppsFlyerOptions here */);
  // Wait until AppsFlyer has a UID
  final afId = await appsflyer.getAppsFlyerUID();
  if (afId != null && afId.isNotEmpty) {
    await Purchases.attribution.setAppsflyerID(afId);
  }
}

 

3. Call Your Custom Action at Startup

 

In your main app screen (or wherever you configure RevenueCat), add an “On Page Load” action to first call setAppsflyerIdForRC.

After that runs, RevenueCat will have $appsflyerId set and will attach it to all subsequent events.

 

That’s it—once you add that custom action, FlutterFlow will explicitly pass the AppsFlyer ID into RevenueCat, and the integration should work as expected.

 

Let me know if you hit any snags!

 

Best,

Hussain


Forum|alt.badge.img+3

Thanks that makes sense, I just implemented some code and its working but now I am noticing there are no events for my integration since Apil 1. I deleted and recreated the integration but not seeing events. With other integrations these seem to show right away. What am I missing?

 

Thanks


hussain
RevenueCat Staff
Forum|alt.badge.img+3
  • RevenueCat Staff
  • June 9, 2025

Hi Christopher,

I took a look at your project and it looks like your AppsFlyer integration is now working as expected—events are flowing through successfully. Just keep in mind that any events which failed to send won’t be backfilled, so those will remain missing. Going forward, though, all new events should arrive normally.

Let me know if anything else comes up!

Best,

Hussain


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings