Send INSTALL_REFERRER message from app

I want to emulate google play transmission.

My app installing another app, when the installation is finished, I want to broadcast INSTALL_REFERRER like google play, so the installed app will send the campaign data to google analytics.

I followed all the Google Analytics tutorials and looked at this implementation:

When sending a broadcast from the ADB wrapper, everything works fine, the analytics receiver is getting the data and sending it to Google Analytics, so sending it from the app seems to be unworkable.

This is what I get when I pass INSTALL_REFERRER from my application:

Subject [GAThread, 5, main]: No campaign data found.

Broadcasting application:

Intent i = new Intent("");


the application receiving the broadcast: Manifest.xml:

<service android:name="" />
<receiver android:name=""
        <action android:name="" />



 synchronized Tracker getTracker(TrackerName trackerId) {
    if (!mTrackers.containsKey(trackerId)) {

        GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
        Tracker t = (trackerId == TrackerName.APP_TRACKER) ? analytics.newTracker(R.xml.global_tracker)
                : (trackerId == TrackerName.GLOBAL_TRACKER) ? analytics.newTracker(R.xml.global_tracker)
                : analytics.newTracker(R.xml.global_tracker);

        mTrackers.put(trackerId, t);

    return mTrackers.get(trackerId);



    Tracker t = ((App) getApplication()).getTracker(App.TrackerName.APP_TRACKER);
    t.send(new HitBuilders.AppViewBuilder().build());


please help me to solve this problem. is it even possible or am I wasting my time here?



source to share

All Articles