2

I'm developing an application which can be installed and opened via an AndroidApplicationRecord (AAR, see http://developer.android.com/guide/topics/nfc/nfc.html).

If a user installs the app coming from other sources I'm adding a Google Analytics referrer to the Google Play link in order to track the source of installation.

Is there a way to add this referrer to the AAR or as an additional NDEFRecord so that this source can be tracked as well?

Michael Roland
  • 36,432
  • 10
  • 81
  • 168
sven.b
  • 65
  • 1
  • 6

1 Answers1

0

The process behind the AAR is completely automatic. The AAR contains the package name of the app and nothing else. Android will then search for that package name in the Play Store app. So no way to add anything to that, as far as I can tell.

What you could try instead of sharing an AAR, is sharing an URI record containing a Play store URI with your Google Analytics referrer in it. I don't know much about Google Analytics, but it looks to me like you can catch the referrer upon installation of your app, see e.g Get Android Google Analytics referrer tag and Get referrer after installing app from Android Market.

Yet another approach could be to track the sharing events using Google Analytics in the already installed app when it shares the AAR to another device.

Community
  • 1
  • 1
NFC guy
  • 9,972
  • 3
  • 25
  • 57
  • I also thought about saving a Google Play URL instead, but the problem is that I might easily get into trouble with the 192 Byte storage space of the tags. – sven.b Jun 01 '12 at 10:57
  • You have specific tags in mind? NFC tags are available in various sizes. The biggest one I have can store 8kB (it takes a long time to read all of that data if it is completely filled). – NFC guy Jun 01 '12 at 12:41
  • Yes, I'm using MIFARE Ultralight C Tags and they offer 192 Bytes of storage. Can you recommend tags with some more space which are still affordable? – sven.b Jun 02 '12 at 14:15
  • 1
    Instead of Ultralight C, you can now also use NTAG203: same storage size, but optimized for use with mobile NFC devices. MIFARE Classic 1K would be the next step up (but can perhaps not be read by all NFC devices). Next step after that is DESFire EV1 2K. Other option: URL shortener service (or your own web server). – NFC guy Jun 06 '12 at 21:25