2012-04-09 27 views
6

फ़ोन पर मार्केट ऐप के माध्यम से ऐप इंस्टॉल करते समय, ऐप को संदर्भित रेफरर जानकारी सही ढंग से प्राप्त होगी (जैसा कि यहां बताया गया है: http://code.google.com/mobile/analytics/docs/android/#android-market-tracking)।रेफरर इंस्टॉल करें एंड्रॉइड वेब मार्केट पर ट्रैकिंग नहीं कर रहा है

हालांकि, वेब-आधारित मार्केट के माध्यम से एक ही रेफरर के साथ एक ही ऐप इंस्टॉल करते समय, रेफरर जानकारी गिरा दी जाती है और ऐप द्वारा प्राप्त नहीं होती है। यह अभियान को आपके ऐप को वेब से ट्रैक करने के लिए असंभव बनाता है।

क्या एंड्रॉइड वेब बाजार के माध्यम से इंस्टॉल रेफरर को ट्रैक करना संभव है?

उत्तर

6

नहीं, वेब-आधारित Google Play store से इंस्टॉल रेफरर को ट्रैक करना संभव नहीं है। यह a known issue with the latest SDK है।

Google Play अभियान ट्रैकिंग वर्तमान में वेब प्ले डिवाइस से शुरू की गई वेब-टू-डिवाइस इंस्टॉल का समर्थन नहीं करती है।

+2

पर इस तरह की आत्मा से मदद के सबसे मिल गया? – Gem

+2

प्रलेखन लिंक और "ज्ञात समस्याएं" अनुभाग विरासत v2 के लिए है। बाद के संस्करण से, पूरे "ज्ञात मुद्दे" खंड गुम हैं। तो, क्या सुविधा अब काम करनी चाहिए? मेरे लिए, ऐसा नहीं लगता है, यानी, मूल "वेब मार्केट के माध्यम से कोई रेफरर" मुद्दा अभी भी मौजूद नहीं है। –

0

शायद थोड़ा देर हो चुकी है। सौभाग्य से, यह वेब स्टोर से आने वाले इंस्टॉलेशन को ट्रैक करने के लिए हमारे लिए काम करता है।

रिसीवर वर्ग:

private final BroadcastReceiver mUpdateReceiver = new BroadcastReceiver() { 
    @Override 
    public void onReceive(Context context, Intent intent) { 
     someMethod(); //send received data to your method and use it your way 
    } 
}; 

someMethod जहां डेटा प्राप्त हो रहा:

private void someMethod(){ 
    String referrerDataRaw = MyApplication.getReferrerDataRaw(getApplicationContext()); 

    if(referrerDataRaw.toLowerCase().contains(matchx.toLowerCase())){   
     Log.i("true",referrerDataRaw); 
     Toast.makeText(getBaseContext(),"Install referrer found",Toast.LENGTH_SHORT).show(); 
     //postBack(); 
    } 
    else { 
     Log.i("false","no referrer found"); 
     Toast.makeText(getBaseContext(),"no referrer found",Toast.LENGTH_SHORT).show(); 
    } 

} 

बोनस यह एक अगर आप कर रहे हैं

public class OwnReceiver extends BroadcastReceiver { 

public static final String ACTION_UPDATE_DATA = "ACTION_UPDATE_DATA"; 
private static final String ACTION_INSTALL_REFERRER = "com.android.vending.INSTALL_REFERRER"; 
private static final String KEY_REFERRER = "referrer"; 

public OwnReceiver() { 
} 

@Override 
public void onReceive(Context context, Intent intent) { 
    if (intent == null) { 
     Log.e("ReferrerReceiver", "Intent is null"); 
     return; 
    } 
    if (!ACTION_INSTALL_REFERRER.equals(intent.getAction())) { 
     Log.e("ReferrerReceiver", "Wrong action! Expected: " + ACTION_INSTALL_REFERRER + " but was: " + intent.getAction()); 
     return; 
    } 
    Bundle extras = intent.getExtras(); 
    if (intent.getExtras() == null) { 
     Log.e("ReferrerReceiver", "No data in intent"); 
     return; 
    } 

    MyApplication.setReferrerDate(context.getApplicationContext(), new Date().getTime()); 
    //Contro.setReferrerData(context.getApplicationContext(), (String) extras.get(KEY_REFERRER)); 
    MyApplication.setReferrerData(context.getApplicationContext(), (String) extras.get(KEY_REFERRER)); 
    LocalBroadcastManager.getInstance(context).sendBroadcast(new Intent(ACTION_UPDATE_DATA)); 
} 
} 

MainActivity में उपयोग पोस्टबैक

भेजना
public void postBack() { 
    // String postTest = "https://play.google.com/store/apps/details?id=com.neon.myApp&referrer=utm_source=someOne&utm_medium=cpr&utm_term=testytest"; 
    String referrerDataRaw = MyApplication.getReferrerDataRaw(getApplicationContext()); 

    // Toast.makeText(this, "raw : " + postTest, Toast.LENGTH_SHORT).show(); 
    String[] split = referrerDataRaw.split("="); 
    String end = split[split.length - 1]; 

    Toast.makeText(this, AppConstant.lin + end, Toast.LENGTH_SHORT).show(); 

    StringRequest strReq = new StringRequest(Request.Method.POST, 
      AppConstant.lin + end, new Response.Listener<String>() { 

     @Override 
     public void onResponse(String response) { 
      Toast.makeText(getBaseContext(),"postback sent",Toast.LENGTH_SHORT).show(); 

     } 
    }, new Response.ErrorListener() { 

     @Override 
     public void onErrorResponse(VolleyError error) { 

     } 
    }); 

    // Adding request to request queue 
    MyApplication.getInstance().addToRequestQueue(strReq, tag_string_req); 
} 

किसी भी एक के आसपास किसी भी काम बता सकते हैं GitHub https://github.com/SimonMarquis/Android-InstallReferrer

संबंधित मुद्दे