【发布时间】:2015-12-01 18:43:15
【问题描述】:
我们有一个带有应用内购买功能的 iOS 应用,我们希望使用 Google Analytics(增强型电子商务)跟踪交易。我们已经对 priceLocal 进行了适当的处理,这不是问题……我们需要告诉 GA 用户使用的具体货币代码。此信息似乎无法直接获得,我们宁愿不自己查找。
当前代码摘要:
// Set locale
NSLocale *storeLocale = product.priceLocale;
// instead of storeCountry we need storeCurrency, like USD, CAD, EUR, GBP...
NSString *storeCountry = (NSString *)CFLocaleGetValue((CFLocaleRef)storeLocale, kCFLocaleCountryCode);
[ecommerced setObject:storeCountry forKey:@"currencyCode"];
【问题讨论】:
标签: ios google-analytics google-tag-manager itunes-store google-analytics-sdk