Attribution on mobile is a commodity now. 5 years ago before AndroidID and Apple IDFA, all you could use was IP, OS, Device Type, and random other bits of info the network would send you. So you'd need some machine learning inference to connect installed users to where they came from. Now, you just literally match the device-ids with what you get in the click from network partners (off-Facebook). Adjust, Appsflyer both do this.
On FB, just use FBSDK and it comes with its own attribution. They are starting to shift to a "multi-touch" model where you don't really know how they attribute -- its a black box that FB controls via their statistics. FB will report what the CPI is to you. It sucks, but thats market dominance for you.
What I'm also saying is, make sure you're also sending revenue, logins, and any other significant events to FB as well. Then you can figure out ROI and do more performance marketing. This works at any scale.