[ios] Changed events format for myTracker.

This commit is contained in:
Ilya Grechuhin 2016-09-20 15:45:48 +03:00 committed by Vladimir Byko-Ianko
parent f0a13640c2
commit 48378b149c

View file

@ -37,9 +37,15 @@ void setMarketingSender()
if (tag.empty())
return;
NSMutableDictionary<NSString *, NSString *> * eventParams = [@{} mutableCopy];
NSMutableString * myTrackerEvent = [@(tag.c_str()) mutableCopy];
for (auto const & param : params)
eventParams[@(param.first.c_str())] = @(param.second.c_str());
[MRMyTracker trackEvent:@(tag.c_str()) eventParams:eventParams];
{
NSString * key = @(param.first.c_str());
NSString * value = @(param.second.c_str());
eventParams[key] = value;
[myTrackerEvent appendString:[NSString stringWithFormat:@"_%@_%@", key, value]];
}
[MRMyTracker trackEvent:myTrackerEvent eventParams:nil];
});
}