Commit 38380072 authored by 艾娇平's avatar 艾娇平

Merge branch 'ajp/dev' into 'master'

修复部分埋点不实时的问题

See merge request !82
parents 01e910ae c772fde9
......@@ -397,11 +397,11 @@ static NewPhobos *_sharedClient;
}
+ (void)track:(NSString *)eventName{
[self track:eventName attributes:@{} sendNow:NO currentAPI:_sharedClient.serverAPI];
[self track:eventName attributes:@{} sendNow:[NewPhobos sharedClient].isGraySendNow currentAPI:_sharedClient.serverAPI];
}
+ (void)track:(NSString *)eventName attributes:(NSDictionary *)attributes{
[self track:eventName attributes:attributes sendNow:NO currentAPI:_sharedClient.serverAPI];
[self track:eventName attributes:attributes sendNow:[NewPhobos sharedClient].isGraySendNow currentAPI:_sharedClient.serverAPI];
}
+ (void)track:(NSString *)eventName attributes:(NSDictionary *)attributes sendNow:(BOOL)sendNow{
......@@ -409,11 +409,11 @@ static NewPhobos *_sharedClient;
}
+ (void)track:(NSString *)eventName currentAPI:(NSString *)currentAPI {
[self track:eventName attributes:@{} sendNow:NO currentAPI:currentAPI];
[self track:eventName attributes:@{} sendNow:[NewPhobos sharedClient].isGraySendNow currentAPI:currentAPI];
}
+ (void)track:(NSString *)eventName attributes:(NSDictionary *)attributes currentAPI:(NSString *)currentAPI {
[self track:eventName attributes:attributes sendNow:NO currentAPI:currentAPI];
[self track:eventName attributes:attributes sendNow:[NewPhobos sharedClient].isGraySendNow currentAPI:currentAPI];
}
+ (void)track:(NSString *)eventName attributes:(NSDictionary *)attributes sendNow:(BOOL)sendNow currentAPI:(NSString *)currentAPI {
......
......@@ -84,16 +84,9 @@ static BOOL isGray = YES;
+ (void)track:(NSString *)eventId attributes:(NSDictionary *)attributes {
if (isGray) {
//埋点处如果没传sendNow 取灰度字段去控制
if ([NewPhobos sharedClient].isGraySendNow == nil) {
[NewPhobos track:eventId attributes:attributes sendNow:YES];
}else{
if ([NewPhobos sharedClient].isGraySendNow == YES) {
[NewPhobos track:eventId attributes:attributes sendNow:YES];
}else{
[NewPhobos track:eventId attributes:attributes sendNow:NO];
}
}
// 新埋点库支持实时上报数据,取灰度字段去控制
NewPhobos *phobos = [NewPhobos sharedClient];
[NewPhobos track:eventId attributes:attributes sendNow:phobos.isGraySendNow];
} else {
[OldPhobos track:eventId attributes:attributes];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment