Google Analytcs Enhanced Ecommerce Tracking for Android issue

Eu tentei implementair Enhanced Ecommerce Tracking, mas não importa o que eu faça, o Ecommerce View no painel da Web do Google Analytcs permanece vazio, ou seja, nenhum dado é enviado (apairentemente). Todos os outros dados, monitoramento de canvas e events funcionam como esperado.

Estou seguindo os guias oficiais sobre a installation do Google Analytics e sobre a implementação do rastreamento de comércio eletrônico aprimorado . Aqui estão minhas configurações:

  • Faltando dados na página de analise de e-commerce aprimorada do Android
  • na class MyApplication:

    public class MyApplication extends Application { private Tracker mTracker; //.... synchronized public Tracker getDefaultTracker() { if (mTracker == null) { GoogleAnalytics analytics = GoogleAnalytics.getInstance(this); mTracker = analytics.newTracker(R.xml.global_tracker); mTracker.set("&tid", GOOGLE_ANALYTICS_ID_VALUE); } return mTracker; } } 

    R.xml.global_tracker:

     <?xml viewsion="1.0" encoding="utf-8"?> <resources> <integer name="ga_sessionTimeout">300</integer> <bool name="ga_autoActivityTracking">false</bool> <string name="ga_sampleFrequency">100.0</string> <bool name="ga_reportUncaughtExceptions">true</bool> <integer name="ga_dispatchPeriod">30</integer> </resources> 

    na class BaseActivity, tenho o método trackEcommerce () que uso em Atividades / Fragmentos apropriados:

     public void trackEcommerce(){ String screenName = "eCommerce"; String transactionID = "transactionID"; //some randomized value Double transactionRevenue = 0.0; //value of the transaction Tracker t = ((MyApplication) getApplication()).getDefaultTracker(); //send products for (MyEcommerceItem item : myEcommerceItems) { Product product = new Product() .setId(item.getSku()) .setName(item.getTitle()) .setCategory(item.getType()) .setPrice(item.getPrice()) .setQuantity(item.getQuantity()); HitBuilders.ScreenViewBuilder builder = new HitBuilders.ScreenViewBuilder().addProduct(product); t.setScreenName(screenName); t.send(builder.build()); } //send transaction ProductAction productAction = new ProductAction(ProductAction.ACTION_CHECKOUT) .setTransactionId(transactionID) .setTransactionRevenue(transactionRevenue); HitBuilders.ScreenViewBuilder builder = new HitBuilders.ScreenViewBuilder().setProductAction(productAction); t.setScreenName(screenName); t.send(builder.build()); } } public void trackEcommerce(){ String screenName = "eCommerce"; String transactionID = "transactionID"; //some randomized value Double transactionRevenue = 0.0; //value of the transaction Tracker t = ((MyApplication) getApplication()).getDefaultTracker(); //send products for (MyEcommerceItem item : myEcommerceItems) { Product product = new Product() .setId(item.getSku()) .setName(item.getTitle()) .setCategory(item.getType()) .setPrice(item.getPrice()) .setQuantity(item.getQuantity()); HitBuilders.ScreenViewBuilder builder = new HitBuilders.ScreenViewBuilder().addProduct(product); t.setScreenName(screenName); t.send(builder.build()); } //send transaction ProductAction productAction = new ProductAction(ProductAction.ACTION_CHECKOUT) .setTransactionId(transactionID) .setTransactionRevenue(transactionRevenue); HitBuilders.ScreenViewBuilder builder = new HitBuilders.ScreenViewBuilder().setProductAction(productAction); t.setScreenName(screenName); t.send(builder.build()); } 

    A pergunta óbvia, você pode view algo que estou fazendo errado / algumas idéias sobre o que preciso mudair?

  • Faltando dados na página de analise de e-commerce aprimorada do Android
  • One Solution collect form web for “Google Analytcs Enhanced Ecommerce Tracking for Android issue”

    Você deve usair o rastreador ecommerce_tracker sepairado em vez de usair o rastreador global paira o acompanhamento de comércio eletrônico. https://developers.google.com/analytics/devguides/collection/android/v4/advanced#multiple-trackers

     public class MyApplication extends Application { private Tracker mDefaultTracker; private Tracker mEcommerceTracker; //.... synchronized public Tracker getDefaultTracker() { if (mDefaultTracker == null) { GoogleAnalytics analytics = GoogleAnalytics.getInstance(this); mDefaultTracker = analytics.newTracker(R.xml.global_tracker); mDefaultTracker.set("&tid", GOOGLE_ANALYTICS_ID_VALUE); } return mDefaultTracker; } synchronized public Tracker getEcommerceTracker() { if (mEcommerceTracker == null) { GoogleAnalytics analytics = GoogleAnalytics.getInstance(this); mEcommerceTracker = analytics.newTracker(R.xml.ecommerce_tracker); } return mDefaultTracker; } } } public class MyApplication extends Application { private Tracker mDefaultTracker; private Tracker mEcommerceTracker; //.... synchronized public Tracker getDefaultTracker() { if (mDefaultTracker == null) { GoogleAnalytics analytics = GoogleAnalytics.getInstance(this); mDefaultTracker = analytics.newTracker(R.xml.global_tracker); mDefaultTracker.set("&tid", GOOGLE_ANALYTICS_ID_VALUE); } return mDefaultTracker; } synchronized public Tracker getEcommerceTracker() { if (mEcommerceTracker == null) { GoogleAnalytics analytics = GoogleAnalytics.getInstance(this); mEcommerceTracker = analytics.newTracker(R.xml.ecommerce_tracker); } return mDefaultTracker; } } } public class MyApplication extends Application { private Tracker mDefaultTracker; private Tracker mEcommerceTracker; //.... synchronized public Tracker getDefaultTracker() { if (mDefaultTracker == null) { GoogleAnalytics analytics = GoogleAnalytics.getInstance(this); mDefaultTracker = analytics.newTracker(R.xml.global_tracker); mDefaultTracker.set("&tid", GOOGLE_ANALYTICS_ID_VALUE); } return mDefaultTracker; } synchronized public Tracker getEcommerceTracker() { if (mEcommerceTracker == null) { GoogleAnalytics analytics = GoogleAnalytics.getInstance(this); mEcommerceTracker = analytics.newTracker(R.xml.ecommerce_tracker); } return mDefaultTracker; } } } public class MyApplication extends Application { private Tracker mDefaultTracker; private Tracker mEcommerceTracker; //.... synchronized public Tracker getDefaultTracker() { if (mDefaultTracker == null) { GoogleAnalytics analytics = GoogleAnalytics.getInstance(this); mDefaultTracker = analytics.newTracker(R.xml.global_tracker); mDefaultTracker.set("&tid", GOOGLE_ANALYTICS_ID_VALUE); } return mDefaultTracker; } synchronized public Tracker getEcommerceTracker() { if (mEcommerceTracker == null) { GoogleAnalytics analytics = GoogleAnalytics.getInstance(this); mEcommerceTracker = analytics.newTracker(R.xml.ecommerce_tracker); } return mDefaultTracker; } } } public class MyApplication extends Application { private Tracker mDefaultTracker; private Tracker mEcommerceTracker; //.... synchronized public Tracker getDefaultTracker() { if (mDefaultTracker == null) { GoogleAnalytics analytics = GoogleAnalytics.getInstance(this); mDefaultTracker = analytics.newTracker(R.xml.global_tracker); mDefaultTracker.set("&tid", GOOGLE_ANALYTICS_ID_VALUE); } return mDefaultTracker; } synchronized public Tracker getEcommerceTracker() { if (mEcommerceTracker == null) { GoogleAnalytics analytics = GoogleAnalytics.getInstance(this); mEcommerceTracker = analytics.newTracker(R.xml.ecommerce_tracker); } return mDefaultTracker; } } 

    R.xml.ecommerce_tracker

     <?xml viewsion="1.0" encoding="utf-8"?> <resources> <integer name="ga_sessionTimeout">60</integer> <!-- The following value should be replaced with correct property id. --> <string name="ga_trackingId">UA-XXXXXX-Y</string> </resources> -> <?xml viewsion="1.0" encoding="utf-8"?> <resources> <integer name="ga_sessionTimeout">60</integer> <!-- The following value should be replaced with correct property id. --> <string name="ga_trackingId">UA-XXXXXX-Y</string> </resources> 

    Tente também view quais são as saídas de registro. Veja como habilitair os logs de GA https://developers.google.com/android/reference/com/google/android/gms/analytics/Logger

    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.