Google Analytics(分析)交易中不会跟踪项目数量 [英] Quantities of items are not tracked in google analytics transactions

查看:149
本文介绍了Google Analytics(分析)交易中不会跟踪项目数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用Google标记管理器从我的iOS应用发送电子商务交易,例如此处介绍



现在我可以在Google Analytics(分析)的转换>电子商务>概览面板中看到交易,但所有商品的数量都是0。



我为这样的项目创建了一个NSMutableDictionary:

  
[transaction [@transactionProducts] addObject:@ {@name:item.productName,
@sku :item.reference,
@category:@mobile,
@price:item.shopPrice,
@currency:@EUR,
@quantity:item.quantity}];

$ / code $ / pre
$ b $ item.quantity是一个NSNumber

在分析中,我可以看到名称,sku,类别,价格,但不是数量。



我做错了什么?

编辑:

我在GA库中启用了详细日志功能,所以我可以看到发送的所有内容分析。例如,我使用数量= 1的物品进行交易。



在日志中,我可以看到:

  2014-03-21 08:51:35.948 MyApp [86287:5207] GoogleTagManager详细信息:GoogleAnalytics 3.03  -  [GAIBatchingDispatcher persist:](GAIBatchingDispatcher.m:418):保存命中:{ 
parameters = {
& _u=.7nL;
& _v=mi3.0.3;
& an=MyApp;
& av=3.2;
& cid=c5ae7a50-dc25-4c17-b706-e509af250ab7;
& cu= EUR;
& sr= 320x480;
& t=交易;
& ta= 3240;
& ti=6753864 - 3240;
& tid=UA-XXXXXXX-X;
& tr=18.93;
& ts= 0;
& tt=3.98;
& ul= en;
& v= 1;
& z= 9238494410774743125;
gaiVersion =3.03;
};
timestamp =2014-03-21 07:51:35 +0000;

}

  2014-03-21 08:51:35.950 MyApp [86287:5207] GoogleTagManager详细信息:GoogleAnalytics 3.03  -  [GAIBatchingDispatcher persist:](GAIBatchingDispatcher.m:418):保存命中:{
parameters = {
& _u=.L;
& _v=mi3.0.3;
& an=MyApp;
& av=3.2;
& cid=c5ae7a50-dc25-4c17-b706-e509af250ab7;
& cu= EUR;
& ic=14192_27P;
& in=SLIPPERS \RETRO FLIP \ - ZWART;
& ip=18.93;
& iq= 1;
& iv= mobile;
& sr= 320x480;
& t= item;
& ti=6753864 - 3240;
& tid=UA-XXXXXXX-X;
& ul= en;
& v= 1;
& z= 9238494410774743126;
gaiVersion =3.03;
};
timestamp =2014-03-21 07:51:35 +0000;

}



我也可以看到这个问题是由于库中的一个bug造成的,并且已经在3.0.7的版本中得到了修复。

SDK

更改日志: https://developers.google.com/analytics/devguides/collection/ios/changelog



更多信息: https://productforums.google.com/forum/#!msg/tag-manager/WeiueEi4JDk/ofgq6s1tw30J


I'm trying to send e-commerce transactions from my iOS app using google tag manager like described here

Now I can see transactions in the conversions > e-commerce > overview panel in google analytics but all the items have a quantity of 0.

I'm making a NSMutableDictionary for the items like so:

for (CartItem *item in cart.items) {

    [transaction[@"transactionProducts"] addObject:@{@"name": item.productName,
                                                     @"sku": item.reference,
                                                     @"category": @"mobile",
                                                     @"price": item.shopPrice,
                                                     @"currency": @"EUR",
                                                     @"quantity": item.quantity}];
}

item.quantity is a NSNumber

In analytics I can see the name, sku, category, price but NOT the quantity.

Am I doing anything wrong ?

EDIT:

I enabled verbose logging in the GA library so I'm able to see everything that's sent to analytics. For instance, I made a transaction with an item with quantity = 1.

In the logs I can see :

2014-03-21 08:51:35.948 MyApp[86287:5207] GoogleTagManager verbose: GoogleAnalytics 3.03 -[GAIBatchingDispatcher persist:] (GAIBatchingDispatcher.m:418): Saved hit: {
parameters =     {
    "&_u" = ".7nL";
    "&_v" = "mi3.0.3";
    "&an" = "MyApp";
    "&av" = "3.2";
    "&cid" = "c5ae7a50-dc25-4c17-b706-e509af250ab7";
    "&cu" = EUR;
    "&sr" = 320x480;
    "&t" = transaction;
    "&ta" = 3240;
    "&ti" = "6753864 - 3240";
    "&tid" = "UA-XXXXXXX-X";
    "&tr" = "18.93";
    "&ts" = 0;
    "&tt" = "3.98";
    "&ul" = en;
    "&v" = 1;
    "&z" = 9238494410774743125;
    gaiVersion = "3.03";
};
timestamp = "2014-03-21 07:51:35 +0000";

}

2014-03-21 08:51:35.950 MyApp[86287:5207] GoogleTagManager verbose: GoogleAnalytics 3.03 -[GAIBatchingDispatcher persist:] (GAIBatchingDispatcher.m:418): Saved hit: {
parameters =     {
    "&_u" = ".L";
    "&_v" = "mi3.0.3";
    "&an" = "MyApp";
    "&av" = "3.2";
    "&cid" = "c5ae7a50-dc25-4c17-b706-e509af250ab7";
    "&cu" = EUR;
    "&ic" = "14192_27P";
    "&in" = "SLIPPERS \"RETRO FLIP\" - ZWART";
    "&ip" = "18.93";
    "&iq" = 1;
    "&iv" = mobile;
    "&sr" = 320x480;
    "&t" = item;
    "&ti" = "6753864 - 3240";
    "&tid" = "UA-XXXXXXX-X";
    "&ul" = en;
    "&v" = 1;
    "&z" = 9238494410774743126;
    gaiVersion = "3.03";
};
timestamp = "2014-03-21 07:51:35 +0000";

}

I can also see that the dispatch works.

解决方案

This issue was due to a bug in the library and has been fixed in the version 3.0.7 of the SDK

Changelog: https://developers.google.com/analytics/devguides/collection/ios/changelog

More info: https://productforums.google.com/forum/#!msg/tag-manager/WeiueEi4JDk/ofgq6s1tw30J

这篇关于Google Analytics(分析)交易中不会跟踪项目数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆