Commit 039fc56a authored by 艾娇平's avatar 艾娇平

之前没有进行实时上报的埋点,采用后端控制是否进行实时上报

parent c772fde9
......@@ -397,11 +397,11 @@ static NewPhobos *_sharedClient;
}
+ (void)track:(NSString *)eventName{
[self track:eventName attributes:@{} sendNow:[NewPhobos sharedClient].isGraySendNow currentAPI:_sharedClient.serverAPI];
[self track:eventName attributes:@{} sendNow:NO currentAPI:_sharedClient.serverAPI];
}
+ (void)track:(NSString *)eventName attributes:(NSDictionary *)attributes{
[self track:eventName attributes:attributes sendNow:[NewPhobos sharedClient].isGraySendNow currentAPI:_sharedClient.serverAPI];
[self track:eventName attributes:attributes sendNow:NO currentAPI:_sharedClient.serverAPI];
}
+ (void)track:(NSString *)eventName attributes:(NSDictionary *)attributes sendNow:(BOOL)sendNow{
......@@ -409,16 +409,18 @@ static NewPhobos *_sharedClient;
}
+ (void)track:(NSString *)eventName currentAPI:(NSString *)currentAPI {
[self track:eventName attributes:@{} sendNow:[NewPhobos sharedClient].isGraySendNow currentAPI:currentAPI];
[self track:eventName attributes:@{} sendNow:NO currentAPI:currentAPI];
}
+ (void)track:(NSString *)eventName attributes:(NSDictionary *)attributes currentAPI:(NSString *)currentAPI {
[self track:eventName attributes:attributes sendNow:[NewPhobos sharedClient].isGraySendNow currentAPI:currentAPI];
[self track:eventName attributes:attributes sendNow:NO currentAPI:currentAPI];
}
+ (void)track:(NSString *)eventName attributes:(NSDictionary *)attributes sendNow:(BOOL)sendNow currentAPI:(NSString *)currentAPI {
NSDictionary *dataDict = [_sharedClient prepareDictionaryForEvent:eventName attributes:attributes];
// 之前没有进行实时上报的埋点,采用后端控制是否进行实时上报
sendNow = sendNow?:[NewPhobos sharedClient].isGraySendNow;
@try {
NSData *JSON = [PhobosUtil encodeJSON:dataDict];
[[PhobosDataManager sharedPhobosDataManager] insertData:dataDict sendAPI:currentAPI phobosType:eventName immediately:sendNow];
......
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