2012-04-09 1 views
6

휴대 전화의 마켓 앱을 통해 앱을 설치할 때 앱은 여기에 설명 된대로 (http://code.google.com/mobile/analytics/docs/android/#android-market-tracking) 전달 된 리퍼러 정보를 올바르게 수신합니다.설치 리퍼러가 안드로이드 웹 마켓에서 추적하지 않습니다

그러나 웹 기반 마켓을 통해 동일한 리퍼러를 사용하여 같은 앱을 설치하면 리퍼러 정보가 삭제되어 앱에서받지 못합니다. 이렇게하면 웹에서 앱을 타겟팅하는 캠페인을 추적 할 수 없습니다.

안드로이드 웹 마켓을 통해 설치 리퍼러를 추적 할 수 있습니까?

답변

6

아니요, 웹 기반 Google Play 스토어의 설치 리퍼러를 추적 할 수 없습니다. 이것은 a known issue with the latest SDK입니다.

Google Play 캠페인 추적 기능은 현재 웹 재생 스토어에서 시작된 웹 간의 기기 설치를 지원하지 않습니다.

+2

GitHub의 https://github.com/SimonMarquis/Android-InstallReferrer에 이런 종류의 영혼의 도움의 대부분이 있으십니까? – Gem

+2

문서 링크 및 "알려진 문제"섹션은 기존 v2에 대한 것입니다. 최신 버전에서 전체 "알려진 문제"섹션이 누락되었습니다. 이제 기능이 작동해야합니까? 저에게있어서, 원래의 "웹 시장을 통한 리퍼러 없음"문제는 여전히 존재합니다. –

0

아마도 조금 늦었을 것입니다. 다행히도 웹 스토어에서 가져온 설치를 추적 할 수 있습니다.

수신기 클래스 :

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(); 
    } 

} 

보너스 당신이 있다면이 하나 : 당신이 데이터를 수신하고

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 : MainActivity에서

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)); 
} 
} 

사용 다시 게시 보내기

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); 
} 

6,어느 한 주위에 모든 작업을 제안 할 수