Hi Kerem,
Thanks for reaching out. I’m happy to help!
I took a look at your account and saw you’ve got several projects, but only one has AppsFlyer configured, so I’ll assume that’s the one you’re troubleshooting. For privacy i’ve omitted the project name from this conversation.
It looks like the key piece missing is the required identifiers. RevenueCat will only forward events to AppsFlyer if you’ve set the following custom attributes for your customer profiles:
You can set these either manually as attributes, or more easily via our helper methods. Just make sure you call them after you configure the Purchases SDK and before any purchase-related events happen.
1Purchases.configure(withAPIKey: "public_sdk_key")
You can find a detailed guide on sending the required device data to RevenueCat here.
As for naming events feel free to use either the default RevenueCat event names, or you can define your own event names, just be sure the names you enter exactly match the ones defined in AppsFlyer’s event structure so they’ll be recognized correctly.
You can find AppsFlyer docs for In-app events structure here.
Give that a try and let me know if you start seeing your trial/conversion events arrive in AppsFlyer!
Best,
Hussain
Hi @hussain
Thank you so much for all your help. I had already implemented everything you mentioned — but it turns out I had made a really simple and rookie mistake.
Since there’s no specific "Sandbox Developer Key" label in either App Store Connect or AppsFlyer, I didn’t think I needed to configure that field — but apparently, we do need it.
After setting it properly, I can now confirm that AppsFlyer events are being sent successfully from the RevenueCat dashboard. 🙌
Thanks again for your guidance — I really appreciate your support!
Best regards,
Kerem
Hi Kerem,
That’s fantastic news! I’m really happy to hear it was just a simple key configuration and that your events are now flowing into AppsFlyer correctly.
If you run into any other questions or need anything else, feel free to reach out, always happy to help.
Best,
Hussain
@hussain , hello again,
I mentioned that I was able to get events successfully. But this happened during the development process, now in the published version, if I press the “View Detail” button in the trials or subscriptions received by real users, I cannot see that the appsflyer event is going there. By the way, in the published version, appsflyer events are also actively going. What is the reason why the events created by revenuecat with real users are not going to appsflyer at the moment?
Hi Kerem,
Thanks for the update!
I took a look at your project and can confirm that for users whose $appsflyerId custom attribute is set on their customer profile, events are indeed being forwarded successfully to AppsFlyer.
However, I also noticed that a couple of your users don’t have the $appsflyerId attribute populated and because it’s required for sending events to AppsFlyer, RevenueCat isn’t sending any events for these profiles.
You need to make sure that
1Purchases.shared.attribution.setAppsflyerID(afId)
is called before any purchase flows take place in your application. I’d recommend to set it right after you initialize the RevenueCat SDK. For existing users I’d recommend adding some logic in your app that checks to see on every app launch if the user has an appropriate $appsflyerIdassociated with their customer profile and if not sets it.
I would’ve shared the exact customer profiles with you where I’ve seen this problem, but due to the nature of this conversation being on a public forum I haven’t.
Once every user has an $appsflyerId, you’ll see all of their trial, conversion, and renewal events arriving in AppsFlyer as expected.
Hope this helps. Let me know if you have any other questions.
Best,
Hussain