Android 通过使用firebase捆绑包的GTM v5增强电子商务标签

Android 通过使用firebase捆绑包的GTM v5增强电子商务标签,android,firebase,google-tag-manager,enhanced-ecommerce,Android,Firebase,Google Tag Manager,Enhanced Ecommerce,我正在开发一个电子商务Android应用程序,我希望通过GTM v5(包括在Firebase SDK中)跟踪Google Analytics上增强的电子商务事件 为此,为了发送一个“印象”事件,我尝试将旧的数据层转换为GTM v5与Firebase SDK一起接受的bundle对象 因此,下面的数据层 DataLayer.mapOf( "currencyCode", "EUR", // Lo

我正在开发一个电子商务Android应用程序,我希望通过GTM v5(包括在Firebase SDK中)跟踪Google Analytics上增强的电子商务事件

为此,为了发送一个“印象”事件,我尝试将旧的数据层转换为GTM v5与Firebase SDK一起接受的bundle对象

因此,下面的数据层

DataLayer.mapOf(
                    "currencyCode", "EUR",                                  // Local currency is optional.
                    "impressions", DataLayer.listOf(
                            DataLayer.mapOf(
                                    "name", produitsDispo.get(0).name,             // Name or ID is required.
                                    "id", produitsDispo.get(0).sku,
                                    "price", produitsDispo.get(0).price,
                                    "brand", produitsDispo.get(0).brand,
                                    "category", produitsDispo.get(0).category,
                                    "variant", produitsDispo.get(0).variant,
                                    "list", produitsDispo.get(0).category,
                                    "position", 1),
                            DataLayer.mapOf(
                                    "name", produitsDispo.get(1).name,
                                    "id", produitsDispo.get(1).sku,
                                    "price", produitsDispo.get(1).price,
                                    "brand", produitsDispo.get(1).brand,
                                    "category", produitsDispo.get(1).category,
                                    "variant", produitsDispo.get(1).variant,
                                    "list", produitsDispo.get(1).category,
                                    "position", 2),
                            DataLayer.mapOf(
                                    "name", produitsDispo.get(2).name,
                                    "id", produitsDispo.get(2).sku,
                                    "price", produitsDispo.get(2).price,
                                    "brand", produitsDispo.get(2).brand,
                                    "category", produitsDispo.get(2).category,
                                    "variant", produitsDispo.get(2).variant,
                                    "list", produitsDispo.get(2).category,
                                    "position", 3)));
现在是:

Bundle myBundle = new Bundle();
myBundle.putString("currencyCode", "EUR");
myBundle.putParcelableArrayList("impressions", constructBundleImpressions(produitsDispo));
mFirebaseAnalytics.logEvent("ecommerce", myBundle);

  public ArrayList<Bundle> constructBundleImpressions(ArrayList<Item> produitsDispo){
    ArrayList<Bundle> bundleImpressions = new ArrayList<Bundle>();
    Bundle tempBundle = new Bundle();
    for (int i=0; i<produitsDispo.size();i++){
        tempBundle.clear();
        tempBundle.putString("name", produitsDispo.get(i).name);
        Log.d("AAAAA ; ", produitsDispo.get(i).name);
        tempBundle.putString("id", produitsDispo.get(i).sku);
        tempBundle.putString("price", produitsDispo.get(i).price.toString());
        tempBundle.putString("brand", produitsDispo.get(i).brand);
        tempBundle.putString("category", produitsDispo.get(i).category);
        tempBundle.putString("variant", produitsDispo.get(i).variant);
        tempBundle.putString("list", produitsDispo.get(i).category);
        tempBundle.putInt("position", i+1);
        bundleImpressions.add(tempBundle);
    }
Bundle myBundle=新Bundle();
myBundle.putString(“货币代码”、“欧元”);
myBundle.putParcelableArrayList(“印象”,ConstructionBundleImpressions(produitsDispo));
logEvent(“电子商务”,myBundle);
公共ArrayList构造BundleImpressions(ArrayList产品显示){
ArrayList bundleImpressions=新建ArrayList();
Bundle tempBundle=新Bundle();
对于(inti=0;i根据该页

电子商务阵列:稍后将提供对需要数据阵列的电子商务标签的支持(例如Google Analytics增强型电子商务)

发行说明中没有关于该主题的进一步进展:

您是否发现了有关GTM v5和电子商务的信息?本发行说明是否涵盖了这一点?-2017年9月6日推出了从使用Firebase SDK的Android和iOS应用程序向Universal Analytics properties发送增强电子商务数据的功能。