[RELEASED] Android Install Referrer

Android Install Referrer implements Google Play Install Referrer API that securely retrieve referral content from Google Play, such as:

• The referrer URL of the installed package
• The timestamp, of when a referrer click happened (both client- and server-side)
• The timestamp, of when an installation began (both client- and server-side)
• The app’s version at the time when the app was first installed
• Whether the user has interacted with your app’s instant experience in the past 7 days

It is a standard and highly reliable and accurate method to attribute conversions through Google Play. It enables the attribution provider to send attribution parameters to the store, which then passes them back to the source when the app is downloaded.
Also referrer URL is often used to provide rewards to the users.

Asset Store: https://assetstore.unity.com/packages/slug/179422

:heavy_check_mark: Easy to implement, use and test

:heavy_check_mark: Android Studio Project included
You can read and modify all source code

:heavy_check_mark: Well-documented project

:heavy_check_mark: Full C# source code, documentation and example scene included

:heavy_check_mark: Long Term Support
Be sure that you’ll get support for new unity versions and features

Hello and thanks for your great plugin.

I have noticed that it conflicts with Facebook SDK specifically. Gradle starts complaining about duplicate dependencies all of a sudden.

To solve the issue, there has to be a file located in AndroidInstallReferrer/Plugins/Editor/Dependencies.xml with the following contents:

<dependencies>
<androidPackages>
    <androidPackage spec="com.android.installreferrer:installreferrer:2.1" />
</androidPackages>
</dependencies>

And then click “Resolve” in Assets → External Dependency Manager → Android

After that, all the issues are gone. Hope it helps someone who stumbles across the same problem.

It also might be useful if such file was added in the next release of the plugin.

1 Like

Hello! Thank you a lot!

Which Facebook SDK version are you using? I’ll check it and let you know

14.1.0 (which was latest this Saturday)

Thank you!

Unfortunately, Resolve menu item still downloads Play Install Referrer Library (even with Dependencies.xml) and build fails. As a solution I found that after removing resolved library using menu “Assets->External Dependency Manager->Android Resolver->Delete Resolved Libraries” the build will succeed.

Does External Dependency Manager downloads Play Install Referrer Library in your case? Can you check if the file exists by path: Assets/Plugins/Adnroid/com.android.installreferrer.installreferrer-2.2.aar ?

No, I do not have such file. Most likely i pressed “Delete Resolved Libraries” during testing and that could have fixed the issue for me, guess you’re right.

Thank you!

I pushed an update with latest version Play Install Referrer Library 2.2 and with troubleshooting paragraph in manual for this case.

1 Like