Try using Adapty win back campaigns to return subscribers.
Apple/Google will let you know about Trials Restorations via server2server notifications. Handle, store and process them to build custom views with Restores Trials analytics.
Adapty does everything for you automatically. Simple install SDK for your platform, open Advanced Dashboard and you're ready to go!