Max
Max

Reputation: 19

How to extract referral code from installation URL in an Ionic app?

I have an Ionic (Angular) Capacitor app. I have links to my app in the Google Play Store and Apple App Store, and I need to retrieve a referral code for each user's app installation.

For example, when a user clicks on my URL "http://market.com/appName?refUrl=code", it opens the respective app market and installs my app. How can I track the installation referral code in this scenario?

I need a plugin that can extract the referral code from the URL parameter, and then I want to send it as an event to Firebase.

I have tried several plugins for this purpose, but they are outdated and not functioning properly.

Upvotes: 1

Views: 409

Answers (1)

Diogo Morais
Diogo Morais

Reputation: 11

I was facing the same issue and found this repo that helped me get that: https://github.com/elasthink/capacitor-referrer

Hope it Helps

Upvotes: 0

Related Questions