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.