I went ahead and published a dead pixel search app to play with intent tracking. For some reason, when I registered two different broadcast receivers (like com.google.android.apps.analytics.AnalyticsReceiver and my own), I never received it myself.
So instead, I registered only my own receiver, processed this information, and transmitted it to Google Analytics. I donβt know how kosher it is, but it works. The following is the code.
public class ZSGoogleInterceptor extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Bundle extras = intent.getExtras(); String referrerString = extras.getString("referrer");
Then, when your application is really running, you can infer the value from the general settings and pass it along with user registration or any other. I used the campaign tag for my purposes, but you can capture any parameters you want from the referrer line created with this tool .
DougW Oct 15 2018-10-18 18:39
source share