Figuring out if a Play Store installation was from a Google advert (attribution)

Hi,

I’m struggling with the above.

I used the plugin GitHub - expcapitaldev/cordova-plugin-search-ads: A apple search ads attribution plugin for cordova on the Apple side (i.e. to figure out if an Apple install was from an Apple App Store ad), but I can’t figure out how to do the same for Android installs from Play Store ads.

The only thing I can think to try is to see if the campaign info is passed in the URL so that I can read it with a plugin like cordova-plugin-customurlscheme - npm

Does anyone know if that will work? Do you know of another way?

The reason I want to do this is because I suspect my users from ads are behaving very differently from organic users. I want to flag them so that I can analyze this.

I think I could probably also do this analysis inside Google Analytics (I think it can distinguish between users with a campaign attached and not), but I really hate that product and would prefer to do my own analysis.

Thanks!
G

Hello,
Yes that is possible we actually did it for one of our apps and it works well.
You can use this plugin: github:elasthink/capacitor-referrer

It’s based on the Referrer API provided by google.
Afterward you will be able to do something like const referrerDetails = await Referrer.getReferrerDetails();

When a user is coming from google ads, you will see something like the follwing.
{"referrerUrl":"gclid=CjwKCAjw4f6zBhBVEiwATEHFVmv8x1P1nhJ_EIP64Q5ulhRm8JPZofcuoyiHwB3rhQMq5QvRXPhhZRoC2_AQAvD_BwE","referrerClickTime":1719705463,"appInstallTime":1719705465,"instantExperienceLaunched":false}

The “gclid” attribute really means that is coming from ads?