Commit 80cd8a7e authored by 艾娇平's avatar 艾娇平

分享埋点设置

parent 549e4965
......@@ -12,9 +12,6 @@
#import "GMShareConstant.h"
#import <MBProgressHUD/MBProgressHUD.h>
#import <GMPhobos/Phobos.h>
#import <GMPhobos/UIResponder+PhobosPV.h>
#import <GMKit/UIColor+GMTheme.h>
#import <GMKit/Constant.h>
#import <GMKit/GMFont.h>
......@@ -25,7 +22,7 @@
#import <GMKit/UIView+SafeArea.h>
#import <GMKit/GMSafeValue.h>
#import <GMKit/UIView+Layout.h>
@import GMPhobos;
@interface GMDiaryShareView ()
@property (nonatomic, strong) GMView *bgView;
......@@ -183,13 +180,13 @@
- (void)phobosClickShareWithType:(GMSharePlatform)type {
if ([self.delegate isKindOfClass:[UIResponder class]]) {
UIResponder *phobosView = (UIResponder *)self.delegate;
NSDictionary *dic = @{@"page_name": SafeValue(phobosView.pageName),
@"business_id": SafeValue(phobosView.businessId),
@"url": SafeValue(self.shareUrl),
@"share_channel": _getGMShareChannelByType(type),
@"task_type":@"diary",
@"business":@"diary_id"};
[Phobos track:@"page_click_share_channel" attributes:dic];
NSMutableDictionary *paramsM = [NSMutableDictionary dictionaryWithDictionary:[NSObject trackerPageParam:self]];
[paramsM addEntriesFromDictionary:@{@"url":SafeString(self.shareUrl),
@"share_channel":_getGMShareChannelByType(type),
@"task_type":@"diary",
@"business":@"diary_id"}];
[Phobos track:@"page_click_share_channel" attributes:paramsM];
}
}
......
......@@ -493,13 +493,14 @@ static NSString *shareCellIdentifier = @"shareCellIdentifier";
// 配合使用主项目中的“synchronizePVData”可以同步埋点通用参数
pageName = self.pageName;
}
NSDictionary *dic = @{@"page_name": SafeString(pageName),
@"business_id": SafeString(businessId),
@"url": SafeString(self.shareUrl),
// @"service_item_id": SafeString(phobosView.serviceItemId),
};
[Phobos track:@"page_click_share" attributes:dic];
NSMutableDictionary *paramsM = [NSMutableDictionary dictionaryWithDictionary:[NSObject trackerPageParam:self]];
[paramsM addEntriesFromDictionary:@{@"page_name": SafeString(pageName),
@"business_id": SafeString(businessId),
@"url": SafeString(self.shareUrl)}];
if ([self.extraParam isNonEmpty]) {
[paramsM addEntriesFromDictionary:[NSDictionary dictionaryWithJsonString:self.extraParam]];
}
[Phobos track:@"page_click_share" attributes:paramsM];
}
}
......@@ -523,16 +524,15 @@ static NSString *shareCellIdentifier = @"shareCellIdentifier";
}
NSAssert([self.shareUrl isNonEmpty], @"shareView.shareUrl 不应该为空");
NSDictionary *dic = @{@"page_name": SafeString(pageName),
@"business_id": SafeString(businessId),
@"url": SafeString(self.shareUrl),
@"share_channel": _getGMShareChannelByType(type),
@"task_type":SafeString(self.taskType),
@"business":@"channel",
// @"service_item_id": SafeString(phobosView.serviceItemId),
};
[Phobos track:@"page_click_share_channel" attributes:dic];
NSMutableDictionary *paramsM = [NSMutableDictionary dictionaryWithDictionary:[NSObject trackerPageParam:self]];
[paramsM addEntriesFromDictionary:@{@"url": SafeString(self.shareUrl),
@"share_channel": _getGMShareChannelByType(type),
@"task_type":SafeString(self.taskType),
@"business":@"channel"}];
if ([self.extraParam isNonEmpty]) {
[paramsM addEntriesFromDictionary:[NSDictionary dictionaryWithJsonString:self.extraParam]];
}
[Phobos track:@"page_click_share_channel" attributes:paramsM];
}
}
......
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